[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 252
  • Last Modified:

How to jump to a video time using javascript

I'm playing a video on a webpage and I'd like to be able to click on a link/button that will jump the video to that time.

ie: I click on a link that references something 2min into the video, I'd like the video to jump to the 2min mark.

I've seen things for html 5 but I can't seem to get them working.

I've tried using the <embed> and <objects> tags as well as <video>.
  • 2
1 Solution
Michel PlungjanIT ExpertCommented:
Something like

<a href="http://youtu.be/MEkS_mQ0GlI?t=2m00s" onclick="document.getElementById('video').src=this.href; return false">2:00</a>
JPClaudeAuthor Commented:
Exactly. My boss wants to do something like that for a project and until HTML 5 comes out, I'm not sure how to proceed.
Michel PlungjanIT ExpertCommented:
I just showed you
Add the embed with an ID of video

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now