Releases: stamat/youtube-background
v1.1.8
v1.1.7
Setting injected scripts for YouTube and Vimeo to be async so to minimize initial main thread blocking
Full Changelog: v1.1.6...v1.1.7
v1.1.6
v1.1.5
Minimal update of the experimental controls feature - VideoBackgroundGroup. Fixing the issue where video was played by force without checking if it's visible and autoplayable. Also adding states to the groups
Full Changelog: v1.1.4...v1.1.5
v1.1.4
HTML5 video mute property fix for Chrome/FF/Edge detected by @kirillstar1 in issue #58
Issue and solution descriptnion here: #58 (comment)
Full Changelog: v1.1.3...v1.1.4
v1.1.3
v1.1.2
There was an issue on mobile when the tab changes #57, the videos pause and they don't resume playing once you go back on the tab.
Adding the visibilitychange
event listener together with shouldPlay
function we can now detect when the user returns to the page and resume playing the videos if they should play that is. YouTube and Video Element work perfectly.
Though Vimeo has some issues, and becomes unresponsive at times, but only on mobile. I wasn't able to deduce why except probably due it using async functions something gets stuck in the player itself and the functions triggered are never performed, althoguh it actually resolves the promisse?! What is even more weird is that this doesn't trigger "onError" event, it just stays stuck. https://developer.vimeo.com/player/sdk/reference
This issue was probably happening cause we abandoned the "autoplay" due pausing and playing videos on intersection, meaning the videos not in viewprt will be paused. This is probably why the videos were not continuing the playback when you would return to the tab.
@steve-s-eightball-media Thanks bud for reporting the issue!
What's Changed
Full Changelog: v1.1.1...v1.1.2
v1.1.1
Finally fixed the properties parsing when you pass properties as an object. There were several issues reporting this and I was just failing to see it, sorry about that. Fixed backwards compatibility issues back to Safari 10.
Full Changelog: v1.1.0...v1.1.1
v1.1.0
duration
property now mindful ofend-at
setSource
function of the instance to change the source programaticallydestroy
function of the instance that destroys the instance and returns the element to the preinitialization stateSeekBar
class that adds the seekbar functionality to the background when initialized
Full Changelog: v1.0.22...v1.1.0
v1.0.22
- Moved majority of redundant code in a superclass
- Fixed issues with disabling on mobile #53
- Fixed UID to match the correct ID/Class name rule, ID and class names shouldn't start with a numbe. UIDs now contain the video ID or video filename sanitized as a class name.
get
function of the factory classVideoBackgrounds
, so we can externalize the controls- Player now gets visible only if the play runs, which means if the autoplay fails the player won't hang in there frozen
- State propety, and state events. All are synced with YouTube state changes, though the YouTube instance got a simlated
timeupdate
event. More on the events usage can be found in the README.md. Solves the issues on: #51 - Duration property of the instances and core functionality for enabling the seek bar constuction
- Added
lazyloading
option. Thanks for the reminder @jiang-yuan in the issue you submitted #37 force-on-low-battery
, I've got startled that the script didin't work all of a sudden on mobile iOS, turned out I had a low battery... I've added a setting that will run the videos on the first user interaction if enabled so your background can run even if the autoplay is disabled by the low battery.- Like so many small fixes, renames, moving arround... I've lost count...
Full Changelog: v1.0.21...v1.0.22