From 72de8445e49b8b46d17db9eefc09b6193e604145 Mon Sep 17 00:00:00 2001 From: Mike Wyrzykowski Date: Tue, 10 Sep 2024 07:54:18 -0700 Subject: [PATCH] Some mobile browsers require playsInline to be set to true for the video to play with the rest of the content. To avoid WebGPU samples testing differences between mobile and desktop browsers, set playsInline = true prior to playing the video. --- sample/videoUploading/main.ts | 1 + sample/videoUploading/video.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/sample/videoUploading/main.ts b/sample/videoUploading/main.ts index 93d5ddb8..91cda303 100644 --- a/sample/videoUploading/main.ts +++ b/sample/videoUploading/main.ts @@ -10,6 +10,7 @@ quitIfWebGPUNotAvailable(adapter, device); // Set video element const video = document.createElement('video'); video.loop = true; +video.playsInline = true; video.autoplay = true; video.muted = true; video.src = '../../assets/video/pano.webm'; diff --git a/sample/videoUploading/video.ts b/sample/videoUploading/video.ts index 22481556..fadde5d9 100644 --- a/sample/videoUploading/video.ts +++ b/sample/videoUploading/video.ts @@ -7,6 +7,7 @@ export default async function ({ useVideoFrame }: { useVideoFrame: boolean }) { // Set video element const video = document.createElement('video'); video.loop = true; + video.playsInline = true; video.autoplay = true; video.muted = true; video.src = '../../assets/video/pano.webm';