stamat / youtube-background

ESM / jQuery plugin for creating video backgrounds from YouTube, Vimeo or video file links.
https://stamat.github.io/youtube-background/
MIT License
176 stars 54 forks source link

Start-at and end-at won't work #40

Closed adepani1 closed 11 months ago

adepani1 commented 2 years ago

$(document).ready(function() { $('[data-vbg]').youtube_background({ 'start-at': 7, 'end-at': 161, 'load-background': true,

    });

});

bantunesm commented 2 years ago

Have you tried passing params directly in the tag ? data-vbg-start-at="7" data-vbg-end-at="161"

stamat commented 11 months ago

@adepani1 hey, sorry for the late reply!

The code you've sent probably had some issues at the time you've sent it. I've reiterated the script in the past few days and refactored and fixed (hopefully) all of the issues. Do try the latest version v1.1.0 ☺️

So I can confirm that end-at and start-at properties now work as intended, and in the case of your code they will set the start and end time of all of your video background.

To set the start and end times for individual background instances, you canuse the attributes that @bantunesm suggested. Thanks @bantunesm for replying to this issue!

Cheers! ✨