Skip to content

Commit

Permalink
Unload HTMLVideoElement actively after cases finished (#3312)
Browse files Browse the repository at this point in the history
* Unload HTMLVideoElement actively after cases finished

This PR unload HTMLVideoElement by setting src to null string.

Issue:#3301

* Also set srcObject to null
  • Loading branch information
shaoboyan authored Jan 24, 2024
1 parent 25959c1 commit b433131
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/webgpu/web_platform/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,8 @@ export function startPlayingAndWaitForVideo(
try {
await callback();
resolve();
video.src = '';
video.srcObject = null;
} catch (ex) {
reject(ex);
}
Expand Down

0 comments on commit b433131

Please sign in to comment.