HLS Live streams, how to "Go Live"?

Jun 19, 2014 at 11:44 AM
Edited Jun 19, 2014 at 11:44 AM
Hi, I'm just testing our HLS Live stream, and no matter what I do, the "Go Live" button in MediaPlayer is always disabled, even calling manually the SeekToLive does nothing.

So the question is: is the GoLive button and SeekToLive method wired with the StreamingMediaPlugin and is it indicating properly, whether I am live or not?
Jun 21, 2014 at 3:26 AM
I think what is going on is that phonesm is forbidding seek on the stream (likely because it is not getting a duration for the program), so the "CanSeek" is false, which makes Player Framework's IsGoLiveAllowed false.

The last time I looked at this, I didn't find a good way of testing the #EXT-X-PLAYLIST-TYPE:EVENT case, where the playlist changes, but segments are never removed from the beginning. As long as there is some way to test this, I'm pretty sure that getting it working with phonesm would be simple.

I have not really looked into the more general case of dealing with a live stream with a window large enough to make seeks useful (which should be seekable, but does not have a finite duration).
Jun 23, 2014 at 1:51 PM
Hi, thanks for the response. I guess detecting whether I am live or won't work right now.
But do you know how to at least manually Go To Live position in the stream, because this should be possible even in HLS stream? When I tried the SeekToLive method, it did nothing.
Jun 23, 2014 at 8:08 PM
Edited Jun 23, 2014 at 8:22 PM
You might try changing this line in TsMediaStreamSource:
    var canSeek = duration.HasValue;
    var canSeek = true;
to see what happens. I don't think I've mucked with that code since before WP8 was out, so I'm not sure, but it may help.

If you want to know if phonesm thinks it is a live stream, then I think you can look at your MediaElement's NaturalDuration property.