mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
Renamed rewriteRemotePlaylist (#3313)
* Add support for remote serving endpoint on local storage * Renamed rewriteRemotePlaylist
This commit is contained in:
parent
e4a7a337a3
commit
ef04c1fd86
@ -16,6 +16,7 @@ import (
|
|||||||
// LocalStorage represents an instance of the local storage provider for HLS video.
|
// LocalStorage represents an instance of the local storage provider for HLS video.
|
||||||
type LocalStorage struct {
|
type LocalStorage struct {
|
||||||
streamID string
|
streamID string
|
||||||
|
host string
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewLocalStorage returns a new LocalStorage instance.
|
// NewLocalStorage returns a new LocalStorage instance.
|
||||||
@ -30,6 +31,7 @@ func (s *LocalStorage) SetStreamId(streamID string) {
|
|||||||
|
|
||||||
// Setup configures this storage provider.
|
// Setup configures this storage provider.
|
||||||
func (s *LocalStorage) Setup() error {
|
func (s *LocalStorage) Setup() error {
|
||||||
|
s.host = data.GetVideoServingEndpoint()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -12,8 +12,8 @@ import (
|
|||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
// rewriteRemotePlaylist will take a local playlist and rewrite it to have absolute URLs to remote locations.
|
// rewritePlaylistLocations will take a local playlist and rewrite it to have absolute URLs to a specified location.
|
||||||
func rewriteRemotePlaylist(localFilePath, remoteServingEndpoint, pathPrefix string) error {
|
func rewritePlaylistLocations(localFilePath, remoteServingEndpoint, pathPrefix string) error {
|
||||||
f, err := os.Open(localFilePath) // nolint
|
f, err := os.Open(localFilePath) // nolint
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalln(err)
|
log.Fatalln(err)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user