Renamed rewriteRemotePlaylist (#3313)

* Add support for remote serving endpoint on local storage

* Renamed rewriteRemotePlaylist
This commit is contained in:
Tom Funken 2023-09-22 02:58:02 +02:00 committed by Gabe Kangas
parent e4a7a337a3
commit ef04c1fd86
2 changed files with 4 additions and 2 deletions

View File

@ -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
}

View File

@ -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)