diff --git a/src/webgpu/web_platform/util.ts b/src/webgpu/web_platform/util.ts index 84ac6b31d1e1..5c8670c68cfa 100644 --- a/src/webgpu/web_platform/util.ts +++ b/src/webgpu/web_platform/util.ts @@ -267,6 +267,10 @@ export async function getVideoFrameFromVideoElement( * */ export function getVideoElement(t: GPUTest, videoName: VideoName): HTMLVideoElement { + if (typeof HTMLVideoElement === 'undefined') { + t.skip('HTMLVideoElement not available'); + } + const videoElement = document.createElement('video'); const videoInfo = kVideoInfo[videoName];