diff --git a/core/storageproviders/local.go b/core/storageproviders/local.go index 31d517a46..9f4406b16 100644 --- a/core/storageproviders/local.go +++ b/core/storageproviders/local.go @@ -16,6 +16,7 @@ import ( // LocalStorage represents an instance of the local storage provider for HLS video. type LocalStorage struct { streamID string + host string } // NewLocalStorage returns a new LocalStorage instance. @@ -30,6 +31,7 @@ func (s *LocalStorage) SetStreamId(streamID string) { // Setup configures this storage provider. func (s *LocalStorage) Setup() error { + s.host = data.GetVideoServingEndpoint() return nil } diff --git a/core/storageproviders/rewriteLocalPlaylist.go b/core/storageproviders/rewriteLocalPlaylist.go index 76ad57c44..c94c1f42a 100644 --- a/core/storageproviders/rewriteLocalPlaylist.go +++ b/core/storageproviders/rewriteLocalPlaylist.go @@ -12,8 +12,8 @@ import ( log "github.com/sirupsen/logrus" ) -// rewriteRemotePlaylist will take a local playlist and rewrite it to have absolute URLs to remote locations. -func rewriteRemotePlaylist(localFilePath, remoteServingEndpoint, pathPrefix string) error { +// rewritePlaylistLocations will take a local playlist and rewrite it to have absolute URLs to a specified location. +func rewritePlaylistLocations(localFilePath, remoteServingEndpoint, pathPrefix string) error { f, err := os.Open(localFilePath) // nolint if err != nil { log.Fatalln(err)