Solved

How to jump to a video time using javascript

Posted on 2012-04-04
5
232 Views
Last Modified: 2014-09-07
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>.
0
Comment
Question by:JPClaude
  • 2
5 Comments
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 500 total points
ID: 37809663
Something like

<a href="http://youtu.be/MEkS_mQ0GlI?t=2m00s" onclick="document.getElementById('video').src=this.href; return false">2:00</a>
0
 

Author Comment

by:JPClaude
ID: 37813205
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.
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 37813244
I just showed you
Add the embed with an ID of video
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question