Blink may emit 'ended' for MSE playback without endOfStream() being set |
|||||||||
Issue descriptionHTMLMediaElement emits 'ended' when timeChanged() is called and the current time is >= the media duration. This happens, for example, when seeking to duration. The implementation is in HTMLMediaElement::timeChanged(), currently https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp&l=2806. This event should only be emitted when OnPipelineEnded occurs (although currently this path notifies Blink by also via timeChanged()). This path is how ended events are currently being emitted in media/test/data/mse_different_containers.html browser_tests, such as MSE_ClearKey/EncryptedMediaTest.Playback_EncryptedVideo_MP4_ClearAudio_WEBM/0.
,
Mar 10 2016
Thanks for filing. We also have a converse case (bug 530698) where, if endOfStream is marked too soon, and the app changes its mind, if the renderers have already received the "EOS" buffer, the "unmarking" of endOfStream doesn't reach them and playback stalls. Platforms with large depth (that read lots of buffers well in advance of actual current playback time) in the pipeline between demuxerstream and rendering eventually decoded output encounter this converse case more (since it's essentially a race between the EOS read from the demuxer and the app unnmarking EOS before playback actually reaches the original EOS.
,
Mar 21 2016
Renaming Blink>Video to Blink>Media>Video for better characterization
,
Apr 26 2016
,
May 20 2016
Early findings: While EOS is not explicitly checked in HTMLMediaElement::timeChanged, it does seem that failing to set EOS for MSE streams does actually prevent the ended event from being raised. What happens is the ChunkDemuxer will not perform the seek callback because it finds it is waiting for more data to be appended. The related issue (audio and video of different lengths) does seem to check out. I find that OnPipelineEnded does not occur (only of the streams sees its EOS), but the seek callback is still made from ChunkDemuxer (not blocked by waiting for more data), which works its way through WMPI to trigger HTMLMediaElement::timeChanged, ultimately firing the ended event. I'm still digging into whether this has any real impact for web developers and what cleanup is right for this.
,
May 20 2016
I found this old bug that makes some recommendations about how to better surface 'ended' - https://bugs.chromium.org/p/chromium/issues/detail?id=409280
,
Aug 9 2016
,
Dec 1 2016
,
Dec 11 2017
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Dec 13 2017
,
Dec 13 2017
Chris, is this issue fixed?
,
Dec 13 2017
Probably not, but I'll have to take another look since some things changed in this code path. |
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by sande...@chromium.org
, Mar 5 2016