diff --git a/src/pages/samples/[slug].tsx b/src/pages/samples/[slug].tsx index a8f74d13..52487ee9 100644 --- a/src/pages/samples/[slug].tsx +++ b/src/pages/samples/[slug].tsx @@ -24,7 +24,9 @@ export const pages = { computeBoids: dynamic(() => import('../../sample/computeBoids/main')), animometer: dynamic(() => import('../../sample/animometer/main')), videoUploading: dynamic(() => import('../../sample/videoUploading/main')), - videoUploadingWebCodecs: dynamic(() => import('../../sample/videoUploadingWebCodecs/main')), + videoUploadingWebCodecs: dynamic( + () => import('../../sample/videoUploadingWebCodecs/main') + ), imageBlur: dynamic(() => import('../../sample/imageBlur/main')), shadowMapping: dynamic(() => import('../../sample/shadowMapping/main')), reversedZ: dynamic(() => import('../../sample/reversedZ/main')), diff --git a/src/sample/videoUploadingWebCodecs/main.ts b/src/sample/videoUploadingWebCodecs/main.ts index ed466d30..91830040 100644 --- a/src/sample/videoUploadingWebCodecs/main.ts +++ b/src/sample/videoUploadingWebCodecs/main.ts @@ -101,7 +101,7 @@ const init: SampleInit = async ({ canvas, pageState }) => { { binding: 2, resource: device.importExternalTexture({ - source: videoFrame as HTMLVideoElement, + source: videoFrame as any, // eslint-disable-line @typescript-eslint/no-explicit-any }), }, ], @@ -145,7 +145,7 @@ const init: SampleInit = async ({ canvas, pageState }) => { const VideoUploading: () => JSX.Element = () => makeSample({ name: 'Video Uploading with WebCodecs', - description: 'This example shows how to upload video frame from WebCodecs to WebGPU.', + description: 'This example shows how to upload VideoFrame to WebGPU.', init, sources: [ { diff --git a/src/types.d.ts b/src/types.d.ts index 38b5c201..b12b0998 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -7,10 +7,6 @@ declare module '*.module.css' { interface HTMLCanvasElement extends HTMLElement { getContext(contextId: 'webgpu'): GPUPresentationContext | null; } -interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase { - source: HTMLVideoElement | VideoFrame; - colorSpace?: PredefinedColorSpace; -} declare const __SOURCE__: string;