ActivityPub Tests / federation-test (push) Failing after 4s
ActivityPub Tests / chat-sanitization-test (push) Failing after 3s
ActivityPub Tests / follower-validation-test (push) Failing after 4s
Extract Default Translations / extract-and-commit (push) Successful in 4m21s
Automated API tests / test (push) Has been cancelled
Browser Tests / cypress-run (push) Has been cancelled
Chromatic / chromatic-deployment (push) Has been cancelled
CSS Lint and Formatting / css-lint (push) Has been cancelled
javascript-packages / Generate API Documentation (push) Has been cancelled
Lint / Go linter (push) Has been cancelled
Go Tests / test (push) Has been cancelled
Go Tests / test-bsds (map[name:freebsd version:12.2]) (push) Has been cancelled
Go Tests / test-bsds (map[name:openbsd version:6.8]) (push) Has been cancelled
HLS tests / tests (push) Has been cancelled
105 lines
2.5 KiB
Go
105 lines
2.5 KiB
Go
package config
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/owncast/owncast/models"
|
|
"github.com/owncast/owncast/webserver/handlers/generated"
|
|
)
|
|
|
|
// Defaults will hold default configuration values.
|
|
type Defaults struct {
|
|
PageBodyContent string
|
|
|
|
FederationGoLiveMessage string
|
|
|
|
Summary string
|
|
ServerWelcomeMessage string
|
|
Logo string
|
|
YPServer string
|
|
|
|
Title string
|
|
|
|
DatabaseFilePath string
|
|
|
|
FederationUsername string
|
|
WebServerIP string
|
|
Name string
|
|
AdminPassword string
|
|
StreamKeys []generated.StreamKey
|
|
|
|
StreamVariants []models.StreamOutputVariant
|
|
|
|
Tags []string
|
|
RTMPServerPort int
|
|
SegmentsInPlaylist int
|
|
|
|
SegmentLengthSeconds int
|
|
WebServerPort int
|
|
|
|
ChatEstablishedUserModeTimeDuration time.Duration
|
|
|
|
YPEnabled bool
|
|
}
|
|
|
|
// GetDefaults will return default configuration values.
|
|
func GetDefaults() Defaults {
|
|
defaultStreamKey := "abc123"
|
|
defaultStreamKeyComment := "Default stream key"
|
|
return Defaults{
|
|
Name: "New Owncast Server",
|
|
Summary: "This is a new live video streaming server powered by Owncast.",
|
|
ServerWelcomeMessage: "",
|
|
Logo: "logo.svg",
|
|
AdminPassword: "abc123",
|
|
StreamKeys: []generated.StreamKey{
|
|
{Key: &defaultStreamKey, Comment: &defaultStreamKeyComment},
|
|
},
|
|
Tags: []string{
|
|
"owncast",
|
|
"streaming",
|
|
},
|
|
|
|
PageBodyContent: `
|
|
# Welcome to Owncast!
|
|
|
|
- This is a live stream powered by [Owncast](https://owncast.online), a free and open source live streaming server.
|
|
|
|
- To discover more examples of streams, visit [Owncast's directory](https://owncast.directory).
|
|
|
|
- If you're the owner of this server you should visit the admin and customize the content on this page.
|
|
|
|
<hr/>
|
|
|
|
<video id="video" controls preload="metadata" style="width: 60vw; max-width: 600px; min-width: 200px;" poster="https://videos.owncast.online/t/xaJ3xNn9Y6pWTdB25m9ai3">
|
|
<source src="https://assets.owncast.tv/video/owncast-embed.mp4" type="video/mp4" />
|
|
</video>
|
|
`,
|
|
|
|
DatabaseFilePath: "data/owncast.db",
|
|
|
|
YPEnabled: false,
|
|
YPServer: "https://owncast.directory",
|
|
|
|
WebServerPort: 8080,
|
|
WebServerIP: "0.0.0.0",
|
|
RTMPServerPort: 1935,
|
|
|
|
ChatEstablishedUserModeTimeDuration: time.Minute * 15,
|
|
|
|
StreamVariants: []models.StreamOutputVariant{
|
|
{
|
|
IsAudioPassthrough: true,
|
|
VideoBitrate: 1200,
|
|
Framerate: 24,
|
|
CPUUsageLevel: 2,
|
|
VideoCodec: "h264",
|
|
AudioCodec: "aac",
|
|
},
|
|
},
|
|
|
|
FederationUsername: "streamer",
|
|
FederationGoLiveMessage: "I've gone live!",
|
|
}
|
|
}
|