Repository navigation
Conversation
<h1>Rationale:</h1> Support in ExoPlayer for HLS live streaming is not as polished as for non-live streaming. A number of issues exist against seeking (which implies DVR) in particular. This commit builds on the good work done in PR#848 (and others) to address these issues in the following way: * A live stream is added to the Demo samples for HLS. * The Demo player uses the available seek range to bracket the sliding DVR window. * Chunk processing takes into account the live edge on start. * A bug in live seeking is fixed. <h1>Changes to be committed:</h1> demo/src/main/java/com/google/android/exoplayer/demo/Samples.java - Add a live stream (the Israeli i24 TV news feed) demo/src/main/java/com/google/android/exoplayer/demo/player/DemoPlayer.java (From PR#848) - Add an event listener for Chunk events. - Update the player on changes to the available seek range. demo/src/main/java/com/google/android/exoplayer/demo/player/HlsRendererBuilder.java (From PR#848) - Inject the player and main handler into the chunk source object (using a new HlsChunkSource constructor). library/src/main/java/com/google/android/exoplayer/hls/HlsChunkSource.java (Mostly from PR#848) - Extend the EventListener interface to handle changes to the available seek range. - Provide a constructor that injects the player and a handler to deal with available seek range changes. In getChunkOperation(): - Obtain the live start chunk media sequence only when seeking to playback position 0. - Fix a bug in live sseking that causes all chunks preceding the one containing the desired seem position to be loaded (which causes a huge delay in seeking towards the live edge). In setMediaPlaylist(): - Process changes to the available seek range. library/src/main/java/com/google/android/exoplayer/util/PlayerControl.java (From PR#848) - Provide support for handling changes to the available seek range.
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
|
Fwiw, I have signed CLAs under both email addresses I typically use when committing changes to Github. But I may have to add another commit to trigger a check to catch the CLA I signed this morning. |
|
CLAs look good, thanks! |
|
@pajatopmr, I played with your patched files and it's a very good start to live HLS. I have a few suggestions to improve the result in the demo app:
|
|
Thanks @fredx21 (and @thasso).
|
|
@fredx21 In testing my fix for your first point, your second point became clearer,especially to the extent that my representation of the stream showed one end as the current playhead position and the other end of the seekbar as the fixed window size. I am now inclined to change that to show playhead positions on both ends. I think this makes more sense. |
<h1>Rationale:</h1> This commit attempts to resolve the following issues: - get the key changes required to support Live/DVR merged to master by separating them from changes supporting Live/EVENT (PR#848) in the hope that smaller is better in the eyes of the maintainers, - address an @ojw28 concern that the Demo app not be made more complicated with additional features, - the PR comment from @fredx21 that the Live/DVR demo has issues with the seek bar behavior: to fix this requires a more robust Demo app. <h1>Changes to be committed:</h1> demo/src/main/java/com/google/android/exoplayer/demo/Samples.java demo/src/main/java/com/google/android/exoplayer/demo/player/DemoPlayer.java demo/src/main/java/com/google/android/exoplayer/demo/player/HlsRendererBuilder.java library/src/main/java/com/google/android/exoplayer/util/PlayerControl.java - Revert PR google#848 changes. library/src/main/java/com/google/android/exoplayer/hls/HlsChunkSource.java - Prune out PR google#848 changes and ensure that seeking cannot enter the region beyond the live edge (the last three segments in the media playlist).
|
When using this patch, the playlists don't seem to be updated frequently. This makes it possible to request very old segments by seeking after pausing. Furthermore, it makes it difficult to seek to "live". |
|
when will this be merged to master branch? I've been using Pajatopmr's branch because on that variant LIVE streams can be rewinded, which is not true for current master branch |
Rationale:
Support in ExoPlayer for HLS live streaming is not as polished as for non-live streaming. A number of issues exist against seeking (which implies DVR) in particular. This commit builds on the good work done in PR#848 (and others) to address these issues in the following way:
Changes to be committed:
demo/src/main/java/com/google/android/exoplayer/demo/Samples.java
demo/src/main/java/com/google/android/exoplayer/demo/player/DemoPlayer.java (From PR#848)
demo/src/main/java/com/google/android/exoplayer/demo/player/HlsRendererBuilder.java (From PR#848)
library/src/main/java/com/google/android/exoplayer/hls/HlsChunkSource.java (Mostly from PR#848)
In getChunkOperation():
In setMediaPlaylist():
library/src/main/java/com/google/android/exoplayer/util/PlayerControl.java (From PR#848)