[REQUIRED] Use case description
Current implementation of HlsMediaSource starts with default position:
We attempt to set the default start position to be at least twice the target duration behind the live edge.
So, if HLS has lots of segments or they are long enough - default start position will be pretty far from it's 0. This is desired behavior when playing "live" media.
But, for example, "catchup" of IPTV services is implemented in the way, when url identifies specific time (wall clock), and when player starts playback - it should start from 0 instead of "live edge" to match target wall clock.
Alternatives considered
I have tried:
Proposed solution
I have tried:
I think that some functionality can be provided by library itself:
- fully functional
CustomStartPositionSource
- or at least easy-to-extend delegating media source. Otherwise
CompositeMediaSource should be used (the same as it's used by ClippingMediaSource), which looks a bit of overkill.
[REQUIRED] Use case description
Current implementation of
HlsMediaSourcestarts with default position:So, if HLS has lots of segments or they are long enough - default start position will be pretty far from it's 0. This is desired behavior when playing "live" media.
But, for example, "catchup" of IPTV services is implemented in the way, when url identifies specific time (wall clock), and when player starts playback - it should start from 0 instead of "live edge" to match target wall clock.
Alternatives considered
I have tried:
MediaItem.ClippingProperties- does not work (since it clips only)Proposed solution
I have tried:
Window.defaultPositionUs(based on Allow the app to override the start position when playback transitions to another source #2403 (comment)) - worksI think that some functionality can be provided by library itself:
CustomStartPositionSourceCompositeMediaSourceshould be used (the same as it's used byClippingMediaSource), which looks a bit of overkill.