defaults.go 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. package config
  2. import "github.com/owncast/owncast/models"
  3. // Defaults will hold default configuration values.
  4. type Defaults struct {
  5. Name string
  6. Title string
  7. Summary string
  8. ServerWelcomeMessage string
  9. Logo string
  10. Tags []string
  11. PageBodyContent string
  12. DatabaseFilePath string
  13. WebServerPort int
  14. WebServerIP string
  15. RTMPServerPort int
  16. StreamKey string
  17. YPEnabled bool
  18. YPServer string
  19. SegmentLengthSeconds int
  20. SegmentsInPlaylist int
  21. StreamVariants []models.StreamOutputVariant
  22. }
  23. // GetDefaults will return default configuration values.
  24. func GetDefaults() Defaults {
  25. return Defaults{
  26. Name: "Owncast",
  27. Title: "My Owncast Server",
  28. Summary: "This is brief summary of whom you are or what your stream is. You can edit this description in the admin.",
  29. ServerWelcomeMessage: "",
  30. Logo: "logo.svg",
  31. Tags: []string{
  32. "owncast",
  33. "streaming",
  34. },
  35. PageBodyContent: "# This is your page content that can be edited from the admin.",
  36. DatabaseFilePath: "data/owncast.db",
  37. YPEnabled: false,
  38. YPServer: "https://directory.owncast.online",
  39. WebServerPort: 8080,
  40. WebServerIP: "0.0.0.0",
  41. RTMPServerPort: 1935,
  42. StreamKey: "abc123",
  43. StreamVariants: []models.StreamOutputVariant{
  44. {
  45. IsAudioPassthrough: true,
  46. VideoBitrate: 1200,
  47. Framerate: 24,
  48. CPUUsageLevel: 2,
  49. },
  50. },
  51. }
  52. }