This project has moved and is read-only. For the latest updates, please go here.

How can i seek Live streaming audio that is playing from a m3u8 source ?

Apr 6, 2016 at 1:48 PM
Is it possible to seek time 10 seconds backward or forward in such a way that I will be able to hear the sound which played in the background audio player agent again 10 seconds before or after?, I have tried the following with the audio player agent
var x = BackgroundAudioPlayer.Instance.Position.Subtract(new TimeSpan(0, 0, 5)); BackgroundAudioPlayer.Instance.Position = x;
Apr 13, 2016 at 5:24 PM
Unfortunately, while possible in theory, the way the code is structured, this would be tricky to achieve. The least painful way to achieve this would probably be to get the current timestamp, stop playback, then start playback at the desired offset. The complicated part is that there is code that finds an offset for the timestamp such that that playback always starts at zero. This would need to be modified to either keep the existing timestamp offset or to let one compare the difference between the new and old offsets. Then one would need to have some code to let the playback start at the desired point instead of at zero (most of the code to do so should be there since this is done for non-live streams).

Doing this "right" would involve managing the buffering more intelligently. This is non-trivial not least since such changes would be preceded by removing pre-VS2015 platforms, removing the old compatibility code, and such (I haven't been able to test on old phones for a while). Incidentally, which platforms are you targeting?
Apr 14, 2016 at 1:07 AM
As of 3f03ac2, everything has been moved over to VS2015 and the Silverlight and WP7 legacy code is gone (well, there is a legacy branch).

This wasn't quite as painful as I thought it would be. However, getting a handle on buffering for live streams is still decidedly non-trivial.