Bug 258450
| Summary: | Constructing a VideoFrame from a video element inside the loadeddata event does not always succeed in Safari | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | youenn fablet <youennf> |
| Component: | Media | Assignee: | youenn fablet <youennf> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | karlcow, webkit-bug-importer |
| Priority: | P2 | Keywords: | BrowserCompat, InRadar, WPTImpact |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
youenn fablet
It seems to work well for Chrome.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
youenn fablet
Snippet from WPT webcodecs.
promise_test(async t => {
// Test only valid for Window contexts.
if (!('document' in self))
return;
let video = document.createElement('video');
video.src = 'vp9.mp4';
video.autoplay = true;
video.controls = false;
video.muted = false;
document.body.appendChild(video);
const loadVideo = new Promise((resolve) => {
if (video.requestVideoFrameCallback) {
video.requestVideoFrameCallback(resolve);
return;
}
video.onloadeddata = () => resolve();
});
await loadVideo;
let frame = new VideoFrame(video, {timestamp: 10});
assert_equals(frame.codedWidth, 320, 'codedWidth');
assert_equals(frame.codedHeight, 240, 'codedHeight');
assert_equals(frame.timestamp, 10, 'timestamp');
frame.close();
}, 'Test we can construct a VideoFrame from a <video>.');
Radar WebKit Bug Importer
<rdar://problem/111216678>
youenn fablet
Pull request: https://github.com/WebKit/WebKit/pull/15238
EWS
Committed 265574@main (fe5c478d8625): <https://commits.webkit.org/265574@main>
Reviewed commits have been landed. Closing PR #15238 and removing active labels.