Bug 236755
| Summary: | [compat] seeked event should be fired once the current frame has been displayed. | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Jean-Yves Avenard [:jya] <jean-yves.avenard> |
| Component: | Media | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Other | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=236754 | ||
Jean-Yves Avenard [:jya]
Consider the following page:
```
<html>
<script>
async function init()
{
let canvas = document.getElementsByTagName('canvas')[0];
let ms = new MediaSource();
let v = document.createElement("video");
v.src = URL.createObjectURL(ms);
await once(ms, 'sourceopen');
let videosb = ms.addSourceBuffer("video/webm; codecs=vp8");
v.currentTime = 1.0;
await Promise.all([fetchAndLoad(videosb, 'content/test-vp8-hiddenframes', [''], '.webm') , once(v, 'loadedmetadata'), once(v, 'seeked')]);
canvas.width = v.videoWidth;
canvas.height = v.videoHeight;
let ctx = canvas.getContext("2d");
ctx.drawImage(v, 0, 0);
}
</script>
<body onload="init();">
<canvas/>
</body>
```
This will create a video element, attach media source, seek to 1s and wait for the seek to complete to then copy the video frame to the canvas.
With Firefox and Chrome, the frame display in the canvas is the video frame at t=1s as expected
However, in Safari, the frame displayed is of t=0s.
This makes it difficult to create reftest for checking bug 236754 as you can't ever guarantee which frame is currently displayed on screen.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/89070387>
Jean-Yves Avenard [:jya]
Note that the problem as described (with MSE) has been fixed and now the seeker event will only be fired once the video frame has been painted.
Same with WebM.
However, the MediaPlayerPrivateAVFObjC doesn't provide this guarantee