Bug 303126
| Summary: | [MSE] ended event may never be fired | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Jean-Yves Avenard [:jya] <jean-yves.avenard> |
| Component: | Media | Assignee: | Jean-Yves Avenard [:jya] <jean-yves.avenard> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=303130 | ||
Jean-Yves Avenard [:jya]
The MediaPlayerPrivateMediaSourceAVFObjC monitors for gaps in the buffered ranges and set the AudioVideoRenderer to stall on the start of the gap. The observer for the time is set whenever the buffered changes.
However, if the currentTime is slightly before the start of the buffered range ;
https://searchfox.org/wubkat/source/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm#675-676
the condition
```
size_t index = ranges.find(currentTime);
if (index == notFound)
return;
// Find the next gap (or end of media)
```
index is always notFound and so we won't ever set the time observer, and so playback will continue past the duration, and the `ended` event will never be fired.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/165429948>
Jean-Yves Avenard [:jya]
An example can be observed with the video in LayoutTests/media/media-source/content/content/test-vp8-24fps.web ; it starts at 0.007
Radar WebKit Bug Importer
<rdar://problem/165430052>
Jean-Yves Avenard [:jya]
Pull request: https://github.com/WebKit/WebKit/pull/54473
EWS
Committed 303596@main (cf7ea924ed64): <https://commits.webkit.org/303596@main>
Reviewed commits have been landed. Closing PR #54473 and removing active labels.