Show YP configuration in the config API
This commit is contained in:
parent
268085e41f
commit
aac7fa2476
@ -23,7 +23,7 @@ type config struct {
|
|||||||
VersionInfo string `yaml:"-"` // For storing the version/build number
|
VersionInfo string `yaml:"-"` // For storing the version/build number
|
||||||
VideoSettings videoSettings `yaml:"videoSettings"`
|
VideoSettings videoSettings `yaml:"videoSettings"`
|
||||||
WebServerPort int `yaml:"webServerPort"`
|
WebServerPort int `yaml:"webServerPort"`
|
||||||
YP yp `yaml:"yp"`
|
YP YP `yaml:"yp"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// InstanceDetails defines the user-visible information about this particular instance.
|
// InstanceDetails defines the user-visible information about this particular instance.
|
||||||
@ -57,11 +57,11 @@ type videoSettings struct {
|
|||||||
HighestQualityStreamIndex int `yaml:"-"`
|
HighestQualityStreamIndex int `yaml:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Registration to the central Owncast YP (Yellow pages) service operating as a directory.
|
// YP allows registration to the central Owncast YP (Yellow pages) service operating as a directory.
|
||||||
type yp struct {
|
type YP struct {
|
||||||
Enabled bool `yaml:"enabled"`
|
Enabled bool `yaml:"enabled" json:"enabled"`
|
||||||
InstanceURL string `yaml:"instanceURL"` // The public URL the directory should link to
|
InstanceURL string `yaml:"instanceURL" json:"instanceUrl"` // The public URL the directory should link to
|
||||||
YPServiceURL string `yaml:"ypServiceURL"` // The base URL to the YP API to register with (optional)
|
YPServiceURL string `yaml:"ypServiceURL" json:"-"` // The base URL to the YP API to register with (optional)
|
||||||
}
|
}
|
||||||
|
|
||||||
// StreamQuality defines the specifics of a single HLS stream variant.
|
// StreamQuality defines the specifics of a single HLS stream variant.
|
||||||
|
@ -18,6 +18,7 @@ func GetServerConfig(w http.ResponseWriter, r *http.Request) {
|
|||||||
SegmentLengthSeconds: config.Config.GetVideoSegmentSecondsLength(),
|
SegmentLengthSeconds: config.Config.GetVideoSegmentSecondsLength(),
|
||||||
NumberOfPlaylistItems: config.Config.GetMaxNumberOfReferencedSegmentsInPlaylist(),
|
NumberOfPlaylistItems: config.Config.GetMaxNumberOfReferencedSegmentsInPlaylist(),
|
||||||
},
|
},
|
||||||
|
YP: config.Config.YP,
|
||||||
S3: config.Config.S3,
|
S3: config.Config.S3,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,6 +32,7 @@ type serverConfigAdminResponse struct {
|
|||||||
WebServerPort int `json:"webServerPort"`
|
WebServerPort int `json:"webServerPort"`
|
||||||
S3 config.S3 `json:"s3"`
|
S3 config.S3 `json:"s3"`
|
||||||
VideoSettings videoSettings `json:"videoSettings"`
|
VideoSettings videoSettings `json:"videoSettings"`
|
||||||
|
YP config.YP `json:"yp"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type videoSettings struct {
|
type videoSettings struct {
|
||||||
|
15
openapi.yaml
15
openapi.yaml
@ -118,6 +118,19 @@ components:
|
|||||||
version:
|
version:
|
||||||
type: string
|
type: string
|
||||||
example: Owncast v0.0.2-macOS (ef3796a033b32a312ebf5b334851cbf9959e7ecb)
|
example: Owncast v0.0.2-macOS (ef3796a033b32a312ebf5b334851cbf9959e7ecb)
|
||||||
|
|
||||||
|
YP:
|
||||||
|
type: object
|
||||||
|
description: Configuration of the instance's registration to the Owncast Directory (YP API)
|
||||||
|
properties:
|
||||||
|
enabled:
|
||||||
|
type: boolean
|
||||||
|
description: If YP support is on or off. Must be enabled to show in the directory.
|
||||||
|
default: false
|
||||||
|
instanceUrl:
|
||||||
|
type: string
|
||||||
|
description: The public URL of this owncast server, used for registration and linking with the directory. Must be publicly available.
|
||||||
|
|
||||||
S3:
|
S3:
|
||||||
type: object
|
type: object
|
||||||
description: Configuration of external storage using S3-compatible providers.
|
description: Configuration of external storage using S3-compatible providers.
|
||||||
@ -537,6 +550,8 @@ paths:
|
|||||||
numberOfPlaylistItems:
|
numberOfPlaylistItems:
|
||||||
type: integer
|
type: integer
|
||||||
description: The maximum number of HLS video segments we will keep referenced in the playlist.
|
description: The maximum number of HLS video segments we will keep referenced in the playlist.
|
||||||
|
yp:
|
||||||
|
$ref: "#/components/schemas/YP"
|
||||||
|
|
||||||
/api/admin/viewersOverTime:
|
/api/admin/viewersOverTime:
|
||||||
get:
|
get:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user