kim-company / membrane_hls_plugin

Plugin providing a `Membrane.HLS.Source` element for HTTP Live Streaming (HLS).
Apache License 2.0
8 stars 5 forks source link

Call `HLS.Helper.merge_uri/2` to save uri host on remote m3u8 files #5

Closed alexandremcosta closed 10 months ago

alexandremcosta commented 10 months ago

Issue Link

If a master playlist with HTTP urls contains relative paths, it cannot find the media playlists because the host is lost.

22:35:45.768 [error] GenServer #PID<0.1329.0> terminating
** (MatchError) no match of right hand side value: {:error, {:no_scheme}}
    (kim_hls 0.1.0) lib/hls/playlist/media/tracker.ex:56: HLS.Playlist.Media.Tracker.read_media_playlist/2
    (kim_hls 0.1.0) lib/hls/playlist/media/tracker.ex:62: HLS.Playlist.Media.Tracker.handle_refresh/2

Solution: call URI.merge/2 to keep the host of the target.

I would like to confirm with you if this is the correct solution before I focus on writing a test.

Example of failing m3u8 file.

alexandremcosta commented 10 months ago

Closing the issue, this is not relevant anymore. I didn't understand the lib, I just need to call HLS.Playlist.Master.build_media_uri(master.uri, stream.uri) to solve my problem.