M3u8 with relative path

Jun 13, 2013 at 11:34 AM
Edited Jun 15, 2013 at 2:22 AM
The code is great, but I am trying to play an audio stream from radio that generate m3u8 files with relative path as
#EXTM3U
#EXT-X-MEDIA-SEQUENCE:4683
#EXT-X-ALLOW-CACHE:NO
#EXT-X-VERSION:2
#EXT-X-TARGETDURATION:8
#EXTINF:8,
../../../../hls-live/radio-live/_definst_/streamNum4683.ts
#EXTINF:8,
../../../../hls-live/radio-live/_definst_/streamNum4684.ts
#EXTINF:8,
../../../../hls-live/radio-live/_definst_/streamNum4685.ts
#EXTINF:8,
../../../../hls-live/radio-live/_definst_/streamNum4686.ts
#EXTINF:8,
../../../../hls-live/radio-live/_definst_/streamNum4687.ts
#EXTINF:8,
../../../../hls-live/radio-live/_definst_/streamNum4688.ts
then the code does not work!
Maybe replacing "../../../../" by domain will work but I don´t where I have to change this issue...
Coordinator
Jun 14, 2013 at 10:05 AM
Edited Jun 14, 2013 at 10:09 AM
Relative paths should work. Could you take a look at where it is actually trying to go with something like Fiddler2?

If you are working with the latest source, then the place to look is HttpClient's GetSegmentClient().
Jun 14, 2013 at 12:08 PM
Edited Jun 15, 2013 at 2:12 AM
I will check HttpClient's GetSegmentClient().
Coordinator
Jun 14, 2013 at 4:17 PM
I tried the link, and while it didn't have any trouble reading the streams, it did stay in "Buffering" mode far, far too long. Take a look at this changeset; it should help.
Jun 14, 2013 at 9:04 PM
I am using now the last commited code... still "openning" mode , doesn't play... I will look changeset...
Coordinator
Jun 15, 2013 at 1:23 AM
Ok, I think I know what's going on.

There's an evil hack in TsMediaManager.cs to deal with some deficiencies in the SM.TsParser API. The stuff in SM.Media gets a callback for every detected stream, but does not get told how many streams to expect or any other "go configure the MediaElement" indication. For now, it is counting the callbacks and expecting one stream for .mp3 playlists and two for .ts playlists. Since this is a .ts playlist with only one stream (audio-only), the open never completes.

If you change the line in TsMediaManager.cs that reads
reader.ExpectedStreamCount = 2;
to
reader.ExpectedStreamCount = 1;
then the open should complete.

Sorry about that; I should have remembered earlier...
Jun 15, 2013 at 2:20 AM
You are great!!!!!!!!!!!!!!!!!
Coordinator
Sep 12, 2013 at 8:25 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.