abhinayrathore/jQuery-YouTube-Popup-Player-Plugin

Start playing at a specific time

Opened this issue · 0 comments

Hi,

Great plugin! Using it on our website, nextcloud.com...

I've been trying to get the plugin to start playing at a specific time but something like id="Yjqd7MX434I?time=1593" doesn't work.

I managed to make it work, adding:

if(obj.attr("id")) {
youtubeId = obj.attr("id");

below

youtubeId = options.youtubeId;

The id has to be in the format Yjqd7MX434I?time=1593 with the time in seconds. In a youtu.be share URL you can also have time, in a different format: https://youtu.be/Fe1I7wYW6hA?t=1m11s which I can't turn into seconds, calling me a total n00b in javascript would already be over-estimating my skills.