| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2026-08-30 | 1.5 kB | |
| v1.2.1 source code.tar.gz | 2026-08-30 | 211.7 kB | |
| v1.2.1 source code.zip | 2026-08-30 | 232.4 kB | |
| Totals: 3 Items | 445.5 kB | 0 | |
setSource() replaced the player's src and left everything else standing. The new
video came back muted after the visitor had unmuted, it no longer looped, and a plain
video file did not change at all.
Fixed
-
setSource()goes through the player API, not the iframesrc. A newsrcnavigates the iframe away from the document the YouTube and Vimeo APIs shook hands with, so state changes stopped arriving and the loop went with them. YouTube now swaps withloadVideoById, orcueVideoByIdfor a video neither playing nor due to start, and Vimeo withloadVideo— the player survives, and so do its mute state and volume. -
A swap before the player exists carries the live state into the URL. That one path still assigns
src, but it now reads the current mute and pause state rather than themutedandautoplayparameters the instance started with. -
A
<video>file actually changes.setSource()swapped the<source>child, which the browser only reads while running its load algorithm, so the old file played on; the element is reloaded now,autoplaytaken off it first when it is to wait, and resumes playing if it was playing. -
The replaced video leaves no duration behind. Duration and progress carried over from the old video, so a longer replacement was cut short at the old length.
Full Changelog: https://github.com/stamat/youtube-background/compare/v1.2.0...v1.2.1