Is it possible to run your script on a specific time span of a YouTube video (api v3)?

  • 0
    There is a desire to show the button at a certain minute + second of video playback from YouTube, is it possible to implement it? Didn't find information on the docks or looked in the wrong place. I only found how to get information about the video, but I couldn't find how to work with it. If this can be implemented, please give a link to the dock and / or a small example of implementation
    JavaScript Anonymous, Oct 12, 2020

  • 1 Answers
  • 0
    You can subscribe to the onReady event through the YT.Player configuration and inside this event trigger setInterval which will receive the player's time value through player.getCurrentTime (). Well, and iskhola from this to run the functions you need.

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!