[SOLVED]Can someone explain the synchronous Javascript playback API

and how it works. I’m trying to have it so onclick of an element it jumps to the timestamp but im not sure if i put my code and the elements being clicked inside the script or outside the script

<script src= "https://player.twitch.tv/js/embed/v1.js"></script>
<div id="<player div ID>"></div>
<script type="text/javascript">
  var options = {
    width: <width>,
    height: <height>,
    channel: "<channel ID>",
    video: "<video ID>",
    collection: "<collection ID>",
    // only needed if your site is also embedded on embed.example.com and othersite.example.com 
    parent: ["embed.example.com", "othersite.example.com"]
  };
  var player = new Twitch.Player("<player div ID>", options);
  player.setVolume(0.5);
</script>

Here is an example I wrote that implements most (if not all) the functions

https://barrycarlyon.github.io/twitch_misc/player/html/index.html

That should help you out

Ok thanks will look now :slight_smile:

Am I on the right track, this is what i’m trying to achieve, not working right now but just so you see some sample code

Nevermind, I changed it to addEventListener instead of onclick after looking at your link. Thanks so much.