Solved

How to jump to a video time using javascript

Posted on 2012-04-04
5
220 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will learn how to count occurrences of each item in an array.

747 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now