GUYGLICK Posted May 27, 2015 Share Posted May 27, 2015 Hey, i have a webpage that has some 15 embedded youtube vids (all working flawlessly). i'd like to control their overall behavior so that only one video can play at any given time (if one video is pressed (to play..) then any other video that may have been played would stop).The problem is that i know absolutely nothing about js... (and i believe therein lies the solution... correct?)Am i over my head with this or is there a relatively nice and elegant solution?thanks in advance! Link to comment Share on other sites More sharing options...
justsomeguy Posted May 27, 2015 Share Posted May 27, 2015 What code are you using to embed the videos? Link to comment Share on other sites More sharing options...
GUYGLICK Posted May 27, 2015 Author Share Posted May 27, 2015 I'm using the link given by YouTube to embed (using iframe);<div id="vid"> <iframe width="560" height="315" src="https://www.youtube.com/embed/C6kn6nXMWF0?rel=0&showinfo=0" frameborder="0" allowfullscreen></iframe></div> Link to comment Share on other sites More sharing options...
justsomeguy Posted May 27, 2015 Share Posted May 27, 2015 I don't think that you'll be able to use Javascript to control that, there will be a security problem because it is an iframe pointing to another domain. There might be documentation on Youtube that would show you how to maybe embed something using HTML 5 video tags which you could control with Javascript. Link to comment Share on other sites More sharing options...
GUYGLICK Posted May 28, 2015 Author Share Posted May 28, 2015 I see. Ok. Two quick question though: 1. Is html5 supported through all web browsers/platforms out there? Cause that's my biggest setback of using html5. 2. if I already have an HTML-based website, what should I do to switch it to html5-based? How's it going to affect the current HTML?If this question sounds weird it's because I don't have a firm basis or any extensive knowledge regarding web stuff..). Sorry.. Link to comment Share on other sites More sharing options...
justsomeguy Posted May 28, 2015 Share Posted May 28, 2015 It's supported by all modern browsers, yes. Not older ones.http://caniuse.com/#search=videoThe differences aren't major, one of the big differences is that HTML 5 adds semantic elements to describe specific parts of the page. So there are defined elements for header, footer, nav, article, section, etc. There's a page here which describes some of the changes:http://www.w3schools.com/html/html5_migration.aspThere's a section on HTML 5 also:http://www.w3schools.com/html/html5_intro.asp Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now