fix(player): unload the video when its src is cleared (#7466)

* fix(player): unload the video when its src is cleared

* docs(player): keep source-reset guidance within the package budget
This commit is contained in:
Akshar Patel
2026-11-09 23:12:04 +00:00
committed by GitHub
parent 9e346f9bb7
commit e5e79e59ea
4 changed files with 38 additions and 2 deletions
+2
View File
@@ -81,6 +81,8 @@ With a `video/...` `type`, `src` plays in a `<video>` behind the same playback A
events. `scenes`, `setRuntimeData()`, `setColorGrading()`, `iframeElement` and `stopMedia()`
are composition-only, and `srcdoc` wins over a video `src`, as it does in an iframe.
Removing a video player's `src` attribute or setting it to an empty string unloads the film and resets playback to paused at 0:00. Set a new `src` to load another video.
## JavaScript API
The main API follows familiar media-player behavior: