View Full Version : Having only one youtube player, but load other videos?
03-07-2007, 02:04 AM
03-07-2007, 02:11 AM
Basically, you would just replace the src of the video, or just switch out the divs.
however, this is not a great idea in that you would need to reload the video each time.
However, one possible issue here is sound and that the sound would likely continue from any hidden yet invisible movies.
03-07-2007, 04:50 AM
I thought about that, using layers. Okay here is something.
Here is the sample code for a youtube video.
<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/pfLjLo3mclg"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/pfLjLo3mclg" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>
Only thing that would change in the next video is the src url. Couldn't we write something that would dynamically change the url when a link is pressed.
03-07-2007, 05:58 AM
Flash is tricky. Using flash to display video is a little different than other flash applications like menus and what are called 'movies'. I've been playing with a flash version of a video and have found that the only sure fire way to get rid of it is to have it in an iframe and change the src of the iframe.
That is what I would suggest here. Have an iframe on your page. Target it by name with links to pages, each containing one of the various flash videos.
Trying to get them all on one page as a sort of effort at preloading may seem like a good idea but, even short videos are pretty big files so you are better off just letting each one stream in turn.
Flash video (for the most part) is only for broadband anyway.
03-08-2007, 04:22 AM
It would be reliable but also force the video to reload each time.
I think looking at a different solution would make sense.
03-16-2007, 03:24 PM
What about something like Facebook.com's shared videos? I'm trying to achieve the same thing but their code is waaay too complicated for me to understand.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.