mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-06 20:11:38 +08:00
With WebCodecs allowed to exist in worker contexts, the media tab has to attach to targets which represent a frame or a dedicated worker. Bug: 1151005 Change-Id: Ie731b6afc04a38fa601a92a92d6d771dbcd8aac5 R=tvanderlippe@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2915876 Commit-Queue: Ted Meyer <tmathmeyer@chromium.org> Reviewed-by: Sigurd Schneider <sigurds@chromium.org> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
19 lines
466 B
JavaScript
19 lines
466 B
JavaScript
const defaultInit = {
|
|
output: () => {},
|
|
error: () => {},
|
|
}
|
|
|
|
const videoDecoder = new VideoDecoder(defaultInit);
|
|
const videoEncoder = new VideoEncoder(defaultInit);
|
|
const audioDecoder = new AudioDecoder(defaultInit);
|
|
const audioEncoder = new AudioEncoder(defaultInit);
|
|
|
|
videoDecoder.configure({
|
|
codec: 'vp8',
|
|
codedWidth: 1920,
|
|
codedHeight: 1088,
|
|
visibleRegion: {left: 0, top: 0, width: 1920, height: 1080},
|
|
displayWidth: 1920,
|
|
displayHeight: 1080
|
|
});
|