Replies: 1 comment
-
Just found that there was (and still is, but unused) the It feels like it used to work, is it a regression? If so, I can file another issue about it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The problem
Currentrly, if we have a paused live stream and issue
MEDIA_PLAY_REQUEST
(i.e. via pressingplay
button), we are thrown straight to the end of seekable range:Unfortunatelly, this often causes a live stream to stall afterwards (not necessary immediately) due to the fact that it's playing too close to the edge - new video fragments just don't catch up in time, especially if poor network conditions are in place.
Proposed solution
The first thing that comes to mind is to use
liveEdgeOffset
withinMEDIA_PLAY_REQUEST
handler:But this may lead up to the other issue: if we are close enough to the moment of the next video segment arrival, as soon as it arrives we will fall back behind the
liveEdgeOffset
(i.e.duration
/seekableEnd
jump forward by the amount of the segment length). This will causemedia-live-button
to show that we are "not live" (i.e. become gray), but in a few moments the playback will catch up withliveEdgeOffset
so themedia-live-button
becomes "live" (i.e. red). This process will continue to repeat and themedia-live-button
will "flicker". This is especially the case for segments with small durations (i.e. 3-5 seconds).So, it's more reasonable to introduce another attribute called
SEEK_TO_LIVE_OFFSET: 'seektoliveoffset'
(with default of+this.getAttribute(Attributes.LIVE_EDGE_OFFSET)
for example) and use it withinMEDIA_PLAY_REQUEST
nahdler.In this case we could provide, for example of a 3-seconds video fragment length, the following values
<media-controller liveedgeoffset="15" seektoliveoffset="11">
and get both: reliablemedia-live-button
indication and enough segments ahead to overcome network problems.In case this proposal is accepted, I can make a PR.
P.S.
We used to "hack" this behaviour in previous versions of
media-chrome
in the following way:Beta Was this translation helpful? Give feedback.
All reactions