From b433131b07cccfcee23af5f7b210dd9bfa822e61 Mon Sep 17 00:00:00 2001 From: "Yan, Shaobo" Date: Thu, 25 Jan 2024 05:49:09 +0800 Subject: [PATCH] Unload HTMLVideoElement actively after cases finished (#3312) * Unload HTMLVideoElement actively after cases finished This PR unload HTMLVideoElement by setting src to null string. Issue:#3301 * Also set srcObject to null --- src/webgpu/web_platform/util.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/webgpu/web_platform/util.ts b/src/webgpu/web_platform/util.ts index 20fdca59c638..aa92c90f3d7c 100644 --- a/src/webgpu/web_platform/util.ts +++ b/src/webgpu/web_platform/util.ts @@ -386,6 +386,8 @@ export function startPlayingAndWaitForVideo( try { await callback(); resolve(); + video.src = ''; + video.srcObject = null; } catch (ex) { reject(ex); }