Linking to a timestamp in a twitch broadcast

Hi Guys,

I am trying everything to link to a timestamp in an embedded video, but nothing seems to work. Is there a possibility to do so? If yes could you please provide me with an example?

Thank you very much for your help!

kind regards, Alex

Edit - misread, my apologies. Although I still don’t understand what you mean. If you are asking how to embed a video at a certain time, just right click on the player and click “Copy video URL at current time.” Example: http://www.twitch.tv/theloyalpatriot/v/7760996?t=48m42s. Otherwise, if you want to do this dynamically, I have no idea.

hey, thanks for your answer anyway but what i mean is embedding the video as an object, for your video it would be:

…object… param name=“flashvars” value=“channel=theloyalpatriot&auto_play=false&start_volume=25&videoId=v7760996&device_id=c8527fe4d76d8f74”…

(you get this by clicking on “share” when you open a broadcast on the twitch page)

as you see there is no timestamp variable, and I would like to know if its possible to link to a certain time if you embed the broadcast as an object.

Have you tried using the Twitch Player API to set the timestamp dynamically with JS?

Once loaded you could select the player by id and store it into a player variable and then
just call player.videoSeek(X); where X is a number of seconds you want to seek to.

Hope this helps :smile:

thanks for the tip it actually works, the problem I have now is when to call the videoSeek function. I try to call it after the videoLoaded event but the videoLoaded event never fires, maybe im doing something wrong. I just see this three events that fire:

  • playerInit
  • videoLoading
  • videoPlaying

and I cant use any of them for my purposes :confused:

videoLoaded definitely does fire when I try. You can try out this test code and watch the JavaScript console in your browser: https://gist.github.com/night/0d9a281bbf791be34afa

thanks a lot! with your code it works as I wanted it to work, withe the videoLoaded firing.

Thank you very much for helping!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.