I am using plyr.js, using this player iframe I am loading a youtube live stream video. I need to show the Live button on the player.
if a user is not watching the current live minutes, show this button and click it go current live stream point. same as in youtube player Live button.
Please help me.
I have been trying to find a solution for this as well and after asking ChatGPT for help and nothing it gave me really worked I played with a lot of different options and here is what I came up with that I think is working for me:
I tried many other things before this but this is what has been working consistently. I add the 6 million seconds (~1,700 hours) because when I look at the output of getCurrentTime anywhere on the seek bar (which seems to only go back ~12 hours) of this live video it is over 43 million seconds or ~12,120 hours (which must be the uptime of the stream?) so I add 6mil seconds to whatever the current time is and it should always be more than enough which takes you to the current live point. (video I've been testing with: https://www.youtube.com/embed/jfKfPfyJRdk)
hope this works for you or at least helps you get in the right direction.
(edit: pasted the wrong code, sorry)