View Full Version : Embedded multi player (video)
igotregistered
07-12-2011, 06:47 PM
Not sure if this is actually what it's called.
I'm also not sure if it's flash. Basically I'd like one video player which can play a youtube playlist, or list I code to play in it.
It's here on this site www - dot - tsn.ca
It's a sports site which has a single video player on the right hand side play news stories the guests click on. You never leave the page though, no matter what news story is clicked.
Is there something like that, here? Closest I've found is the content glider, but that's for graphics.
Thank you
Beverleyh
07-12-2011, 07:37 PM
There's a download in this thread that might help: http://www.dynamicdrive.com/forums/showthread.php?t=47803
igotregistered
07-12-2011, 10:30 PM
Hi BeverlyH, thank you for responding.
I'm going to give this a shot after the gym. And see how it goes. I'll update either later on this evening or tomorrow.
Thank you
igotregistered
07-13-2011, 12:04 PM
There's a download in this thread that might help: http://www.dynamicdrive.com/forums/showthread.php?t=47803
Unfortunately, this isn't what I'm looking for. Though your page ultimately is how I'd like my video player to be setup, (with the ability to play all videos on the page in one player).
My goal is to have my player play streaming video....a.k.a [youtube]
I don't host any video because the video I play is copyrighted material. If I host it on my server I can be prosecuted.
Beverleyh
07-13-2011, 12:12 PM
The latest version of JW Player can stream youtube videos - never tried it myself though: http://www.longtailvideo.com/players/jw-flv-player/
molendijk
07-13-2011, 12:32 PM
If you're looking for something like THIS (http://www.let.rug.nl/molendyk/include_vid_raw.html) (raw version), I can make something for you.
(HERE (http://www.let.rug.nl/molendyk/music/music.html)'s a sophisticated example of the technique)
===
Arie Molendijk
igotregistered
07-13-2011, 01:42 PM
Hi Molendijk, thank you for reply.
Well....yes and no. Ultimately I'd like for my player to be 352x240 size with 4-5 video links below it. If a guest clicks any link. Each one will play in the same player.
All of the links would be hotlinked youtube videos. It doesn't need to be very extravagant either.
Is that possible?
Thank you
molendijk
07-13-2011, 02:38 PM
That's possible. I'll come back to you in a couple of hours (have to leave now).
===
Arie.
igotregistered
07-13-2011, 02:48 PM
That's possible. I'll come back to you in a couple of hours (have to leave now).
===
Arie.
Excellent, I appreciate your help. I'll look for you later. Have a nice day.
molendijk
07-13-2011, 08:13 PM
You can try something like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<title></title>
<style type="text/css">
body {font-family: verdana; font-size:12px}
#video_container, #hider1, #hider2
{position:absolute; left:50%; top:50%; margin-top:-170px; margin-left:-176px; width: 352px; height:240px; overflow:hidden}
#hider1, #hider2{background:black;color:white; display:none;}
</style>
<script type="text/javascript">
function include_video_prep(url)
{
video='<object id="the_video" type="application/x-shockwave-flash" style="position:absolute;width:100%;height:100%;" data='+'"'+url+'"'+'><param name="movie" value='+'"'+url+'"'+'><param name="allowFullScreen" value="true"><param name="flashvars" value="autoplay=1"><param name="wmode" value="window"><param name="allowNetworking" value="all" ><param name="allowscriptaccess" value="always"><\/object>'
setTimeout("document.getElementById('video_container').innerHTML=video",0);
}
function include_video(which)
{
document.getElementById('hider1').style.display='block';
document.getElementById('hider2').style.display='block';
include_video_prep(which);
setTimeout("document.getElementById('hider1').style.display='none'; document.getElementById('hider2').style.display='none'",500);
}
</script>
</head>
<body ><div>
<div id="video_container"></div>
<div id="hider1">
<iframe style="position:absolute;width:100%;height:100%;" src="http://www.youtube.com/apiplayer" frameborder="0"></iframe>
</div>
<div id="hider2" ></div>
<div style="position:absolute; top:50%; left:50%; margin-top:90px; margin-left: -225px">
Click on a link ->
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/1CZpRG4oMms?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Fiddler</a>
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/g32oijfkhH4?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Errol</a>
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/jUvcyyU7UB4?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Arkansas</a>
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/vt4X7zFfv4k?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Soccer</a>
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/Wz1W_omigwg?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Spooky</a>
<a href="javascript: void(0)" onclick="document.getElementById('video_container').innerHTML=''">Hide</a>
</div>
</div></body>
</html>
The styles are just examples. I made it so that there's no flicker on video-transition.
The links have the following form:
onclick="include_video('http://www.youtube.com/v/1CZpRG4oMms?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')"
where the red part is the ID of a YouTube video.
I hope this helps.
===
Arie.
Hello Molendijk,...
I like all videos system which you make.
Many different function video system,..and I have many question.But now just one question:
For this script above about video,...it is possible that you can make button "hide" on the corner player.It is easy to STOP.
Thank you.
molendijk
07-10-2012, 10:29 AM
If you want the size and position of the script I've given above, you could do something like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<title></title>
<style type="text/css">
body {font-family: verdana; font-size:12px}
#video_container, #hider1, #hider2
{position:absolute; left:50%; top:50%; margin-top:-170px; margin-left:-176px; width: 352px; height:240px; overflow:hidden}
#hider1, #hider2{background:black;color:white; display:none;}
#hide_button{position: absolute; left: 50%; top:50%; margin-top:-170px; margin-left: 125px; display: none; z-index:1; cursor: pointer; width:50px}
</style>
<script type="text/javascript">
function include_video_prep(url)
{
video='<object id="the_video" type="application/x-shockwave-flash" style="position:absolute;width:100%;height:100%;" data='+'"'+url+'"'+'><param name="movie" value='+'"'+url+'"'+'><param name="allowFullScreen" value="true"><param name="flashvars" value="autoplay=1"><param name="wmode" value="transparent"><param name="allowNetworking" value="all" ><param name="allowscriptaccess" value="always"><\/object>'
setTimeout("document.getElementById('video_container').innerHTML=video",0);
}
function include_video(which)
{
document.getElementById('hide_button').style.display='block';
document.getElementById('hider1').style.display='block';
document.getElementById('hider2').style.display='block';
include_video_prep(which);
setTimeout("document.getElementById('hider1').style.display='none'; document.getElementById('hider2').style.display='none'",3500);
}
</script>
</head>
<body ><div>
<button id="hide_button" onclick="this.style.display='none';document.getElementById('video_container').innerHTML=''">HIDE</button>
<div id="video_container"></div>
<div id="hider1">
<iframe style="position:absolute;width:100%;height:100%;" src="http://www.youtube.com/apiplayer" frameborder="0"></iframe>
</div>
<div id="hider2" ></div>
<div style="position:absolute; top:50%; left:50%; margin-top:90px; margin-left: -225px">
Click on a link ->
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/Cux1bM35e1c?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Sibelius</a>
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/LB3VfxfBlnY?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Errol</a>
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/jUvcyyU7UB4?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Arkansas</a>
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/jTls82o-ChA?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Chimp</a>
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/Wz1W_omigwg?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Spooky</a>
</div>
</div></body>
</html>
Arie.
I am not think directly about original "button".
I want put my text,..for exmp. ("stop",..."close video",..."hide",.."X").
I sow ,you have something on another system video.
So,if can't be like that,.."hide button" will be OK.
Thank You.
molendijk
07-10-2012, 05:50 PM
You mean like this(?):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<title></title>
<style type="text/css">
body {font-family: verdana; font-size:12px}
#video_container, #hider1, #hider2
{position:absolute; left:50%; top:50%; margin-top:-170px; margin-left:-176px; width: 352px; height:240px; overflow:hidden; }
#hider1, #hider2{background:black;color:white; display:none;}
#hide_button{position: absolute; left: 50%; top:50%; margin-top:-170px; margin-left: 158px; display: none; z-index:1; font-family: verdana; font-size: 12px; cursor: pointer; font-weight: bold; background: black; color: white}
</style>
<script type="text/javascript">
function include_video_prep(url)
{
video='<object id="the_video" type="application/x-shockwave-flash" style="position:absolute;width:100%;height:100%;" data=\''+url+'&vq=large\'><param name="movie" value='+'"'+url+'"'+'><param name="allowFullScreen" value="true"><param name="flashvars" value="autoplay=1"><param name="wmode" value="transparent"><param name="allowNetworking" value="all" ><param name="allowscriptaccess" value="always"><\/object>'
setTimeout("document.getElementById('video_container').innerHTML=video",0);
}
function include_video(which)
{
document.getElementById('hide_button').style.display='block';
document.getElementById('hider1').style.display='block';
document.getElementById('hider2').style.display='block';
document.getElementById('video_container').style.background='black';
document.getElementById('video_container').style.color='white';
include_video_prep(which);
setTimeout("document.getElementById('hider1').style.display='none'; document.getElementById('hider2').style.display='none'",0);
}
</script>
</head>
<body ><div>
<div id="hide_button" title="Stop video" onclick="this.style.display='none';document.getElementById('video_container').innerHTML=''; document.getElementById('video_container').style.background='';document.getElementById('video_container').style.color='';"> X </div>
<div id="video_container"></div>
<div id="hider1">
<iframe style="position:absolute;width:100%;height:100%;" src="http://www.youtube.com/apiplayer" frameborder="0"></iframe>
</div>
<div id="hider2" ></div>
<div style="position:absolute; top:50%; left:50%; margin-top:90px; margin-left: -225px">
Click on a link →
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/Cux1bM35e1c?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Sibelius</a>
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/LB3VfxfBlnY?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Errol</a>
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/jUvcyyU7UB4?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Arkansas</a>
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/jTls82o-ChA?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Chimp</a>
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/Wz1W_omigwg?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Spooky</a>
</div>
</div></body>
</html>
Arie.
Yes,..that is perfect.
Mr.Molendijk,..thank you very-very much for your time for me.
Also I will ask you in the future about your other bigger video system which has huge menu link music.I will ask you if is possible when I click on the menu ("menu") on the player that open box-menu ( like content box ),..but no HTML web page.I have no web site,..I have just blog.
Thank you,..have good time.
If you're looking for something like THIS (http://www.let.rug.nl/molendyk/include_vid_raw.html) (raw version), I can make something for you.
(HERE (http://www.let.rug.nl/molendyk/music/music.html)'s a sophisticated example of the technique)
===
Arie Molendijk
Hello Mr.Molendijk,...
I want ask you abut position menu.It is possible to put menu on the left top corner of video?.
On the same position on video like "X" which is on the left.
I am using classic open-close panel which I make content box for menu.You can see if you open "source" my page bellow.
Also I have problem with menu if I looking with Explorer,..When I have video on the blog,..Explorer can not see menu over video,..just under video.But with Firefox is OK .
But now on the empty page working good with Explorer...( usually on the blog no ).
Have solution to see content box-menu over video with Explorer???
This is page (http://ddr4.blogger.ba/).
molendijk
07-14-2012, 11:58 AM
You mean this?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<title></title>
<!--
Contractible Headers script-Dynamic Drive (www.dynamicdrive.com)
This notice must stay intact for legal use. Last updated Mar 23rd, 2004.
Visit http://www.dynamicdrive.com/ for full source code
-->
<!--DROPDOWN PANEL BEGINING -->
<script type="text/javascript">
var enablepersist="on" //Enable saving state of content structure using session cookies? (on/off)
var collapseprevious="no" //Collapse previously open content when opening present? (yes/no)
if (document.getElementById){
document.write('<style type="text/css">')
document.write('.switchcontent{display:none;}')
document.write('<\/style>')
}
function getElementbyClass(classname){
ccollect=new Array()
var inc=0
var alltags=document.all? document.all : document.getElementsByTagName("*")
for (i=0; i<alltags.length; i++){
if (alltags[i].className==classname)
ccollect[inc++]=alltags[i]
}
}
function contractcontent(omit){
var inc=0
while (ccollect[inc]){
if (ccollect[inc].id!=omit)
ccollect[inc].style.display="none"
inc++
}
}
function expandcontent(cid){
if (typeof ccollect!="undefined"){
if (collapseprevious=="yes")
contractcontent(cid)
document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"
}
}
function revivecontent(){
contractcontent("omitnothing")
selectedItem=getselectedItem()
selectedComponents=selectedItem.split("|")
for (i=0; i<selectedComponents.length-1; i++)
document.getElementById(selectedComponents[i]).style.display="block"
}
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
function getselectedItem(){
if (get_cookie(window.location.pathname) != ""){
selectedItem=get_cookie(window.location.pathname)
return selectedItem
}
else
return ""
}
function saveswitchstate(){
var inc=0, selectedItem=""
while (ccollect[inc]){
if (ccollect[inc].style.display=="block")
selectedItem+=ccollect[inc].id+"|"
inc++
}
document.cookie=window.location.pathname+"="+selectedItem
}
function do_onload(){
uniqueidn=window.location.pathname+"firsttimeload"
getElementbyClass("switchcontent")
if (enablepersist=="on" && typeof ccollect!="undefined"){
document.cookie=(get_cookie(uniqueidn)=="")? uniqueidn+"=1" : uniqueidn+"=0"
firsttimeload=(get_cookie(uniqueidn)==1)? 1 : 0 //check if this is 1st page load
if (!firsttimeload)
revivecontent()
}
}
if (window.addEventListener)
window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
window.attachEvent("onload", do_onload)
else if (document.getElementById)
window.onload=do_onload
if (enablepersist=="on" && document.getElementById)
window.onunload=saveswitchstate
</script>
<!--DROPDOWN PANEL END -->
<style type="text/css">
body {font-family: verdana; font-size:12px;}
#video_container, #hider1, #hider2
{position:absolute; left:50%; top:50%; margin-top:-170px; margin-left:-276px; width: 550px; height:300px; overflow:hidden;}
#hider1, #hider2{background:black;color:white; display:none;}
#hide_button{position: absolute; left: 50%; top:50%; margin-top:-170px; margin-left: 256px; display: none; z-index:1; font-family: verdana; font-size: 12px; cursor: pointer; font-weight: bold; background: black; color: white}
</style>
<script type="text/javascript">
function include_video_prep(url)
{
video='<object id="the_video" type="application/x-shockwave-flash" style="position:absolute;width:100%;height:100%;" data=\''+url+'&vq=large\'><param name="movie" value='+'"'+url+'"'+'><param name="allowFullScreen" value="true"><param name="flashvars" value="autoplay=1"><param name="wmode" value="transparent"><param name="allowNetworking" value="all" ><param name="allowscriptaccess" value="always"><\/object>'
setTimeout("document.getElementById('video_container').innerHTML=video",0);
}
function include_video(which)
{
document.getElementById('hide_button').style.display='block';
document.getElementById('hider1').style.display='block';
document.getElementById('hider2').style.display='block';
document.getElementById('video_container').style.background='black';
document.getElementById('video_container').style.color='white';
include_video_prep(which);
setTimeout("document.getElementById('hider1').style.display='none'; document.getElementById('hider2').style.display='none'",0);
}
</script>
</head>
<body >
<div id="hider1">
<iframe style="position:absolute;width:100%;height:100%;" src="http://www.youtube.com/apiplayer" frameborder="0"></iframe>
</div>
<div id="hider2" ></div>
<div id="hide_button" title="Stop video" onclick="this.style.display='none';document.getElementById('video_container').innerHTML=''; document.getElementById('video_container').style.background='';document.getElementById('video_container').style.color='';"> X </div>
<div id="video_container"></div>
<div style=" CURSOR: pointer" onclick="expandcontent('K6')"><font size="2" color="#111111">MENU</div>
<div id="K6" class="switchcontent" style="position:absolute;z-index:100">
<div style='position:fixed; left:50%; top:50%; margin-top:-170px; margin-left:-276px;WIDTH: 100px;height:200px;background-color:#D1CAC0;padding:15px;border:#000000 1px solid;-moz-border-radius: 10px;-khtml-border-radius: 10px;-webkit-border-radius: 10px;border-radius: 10px;'>
<div style="position:relative; CURSOR: pointer; margin-top:-10px" onclick="expandcontent('K6'); "><font face="Tw Cen MT"><font size="2" color="#808080"> c l o s e - X</font></font></div><br>
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/Cux1bM35e1c?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Sibelius</a><br > <br >
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/LB3VfxfBlnY?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Errol</a><br > <br >
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/jUvcyyU7UB4?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Arkansas</a><br > <br >
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/jTls82o-ChA?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Chimp</a><br > <br >
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/Wz1W_omigwg?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Spooky</a><br>
</div>
</div>
</body >
</html>
Arie
Thank You,..this is also good idea,...but I am not think about that.
I want sign "MENU" that is on the place when you put now content box.No problem about content box with links,..I can make position left or right,or top and bottom.
For example,..when I click on the "MENU" on the left corner,..will be open content box with this links,..and when click any link,will be show video,and on video on the left corner will be "MENU" also.
So ,..one more "MENU" will be on the left corner video,..just like on the right corner "X".,..but this is same (id) code ( MENU) from open-close panel.
Sorry for confusion.
Thanks,...
molendijk
07-15-2012, 05:44 PM
I'm afraid I dont't quite understand what you mean. Could you give me some screenshots for clarification?
Arie.
Thank You for your time.
I can make some screenshot,but I think this will be just lost your time because I am discovered one big problem.
Generally,..your all system about video is very good on plain page ( empty page ) which has not under links.
I sow new problem on my blog when I test this system,that on the center place where show video,..even no video,..there is problem,I can not click any link on the post,..menu.
This is normal when show video that I can not click link under,because I can not see it,..but when I disconnect this video,..on the place when was video,..under can not click any links.
What you think about that,and any experience about.
Thank lots.
molendijk
07-16-2012, 11:35 AM
There should not be a problem if you have access to the post links. I can draw a line on top of the video, see this (http://mesdomaines.nu/rexi_hulp.html).
So the problem may be caused by the fact that you don't have programmatical access to the post links.
Good luck,
Arie.
Hello Mr.Molendijk,...
Thank you for all.
Sorry if you can't understand me.Now I will give example this problem on the page bottom.
If I looking links with IE,..it's working normal,..but I am using FF,..and I tested with Google browser,..same problem like FF,..
Could be problem with "display block" ????
On this page you will see when you move on link "HOME",..this is working,..but all links right side no work "click" because video is there even not show it.Just is block all dimension how is video.
This is page (http://ddr4.blogger.ba/).
molendijk
07-16-2012, 10:55 PM
Just replace
<div style="margin-top:40px;margin-bottom:40px;">
<ul class="semiopaquemenu">
with:
<div style="position:relative; z-index:1; margin-top:40px;margin-bottom:40px;">
<ul class="semiopaquemenu">
Arie.
Yes,..over mouse link working,..but now this menu is over video when is on.
molendijk
07-17-2012, 09:06 AM
That's a question of zIndexing. The following will work. I left your original file intact as much as possible, but I had to correct quite a few errors. Also, I had to remove some styles in order for this post not to exceed the allowed length.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
<title>ddr4</title>
<style type="text/css">
body {font-family: verdana; font-size:12px; color: #333; background-color:#ccc; text-align:center;}
#video_container, #hider1, #hider2
{position:absolute; left:50%; top:50%; margin-top:-170px; margin-left:-310px; width: 550px; height:300px; overflow:hidden;}
#hider1, #hider2{background:black;color:white; display:none;}
#hide_button{position: absolute; left: 50%; top:50%; margin-top:-170px; margin-left: 225px; display: none; z-index:2; font-family: verdana; font-size: 12px; cursor: pointer; font-weight: bold; background: black; color: white}
ul.semiopaquemenu{ /* main menu UL */
font: normal 13px Georgia; width: 600px; background: #98A877; padding: 5px 0 5px 0; margin: 0; text-align: left; border:#444444 1px solid;
}
ul.semiopaquemenu li{display: inline;}
ul.semiopaquemenu li a {color:#444444; cursor:pointer; padding: 4px 8px 4px 8px; text-decoration: none; margin-left: 10px; border-left:#98A877 1px solid; border-right:#98A877 1px solid;}
ul.semiopaquemenu li a:hover, ul.semiopaquemenu li a.selected3 {color: #000000; background: url(http://i46.tinypic.com/rc99n5.jpg); border:#444444 1px solid; padding-top: 12px; padding-bottom: 12px;
}
div#kontejner { text-align:left; }
div#footer { text-align:center; }
div#kontejner { width:800px; margin:0 auto; background-color:#fff;border:#6E6E6E 1px solid; margin: 40px;margin-left:100px;margin-top:200px;}
div#blog { float:left; width:780px; padding:10px 0; margin-left:20px;}
</style>
<script type="text/javascript">
/*Contractible Headers script-Dynamic Drive (www.dynamicdrive.com)
This notice must stay intact for legal use. Last updated Mar 23rd, 2004.
Visit http://www.dynamicdrive.com/ for full source code*/
var enablepersist="on" //Enable saving state of content structure using session cookies? (on/off)
var collapseprevious="no" //Collapse previously open content when opening present? (yes/no)
if (document.getElementById){
document.write('<style type="text/css">')
document.write('.switchcontent{display:none;}')
document.write('<\/style>')
}
function getElementbyClass(classname){
ccollect=new Array()
var inc=0
var alltags=document.all? document.all : document.getElementsByTagName("*")
for (i=0; i<alltags.length; i++){
if (alltags[i].className==classname)
ccollect[inc++]=alltags[i]
}}
function contractcontent(omit){
var inc=0
while (ccollect[inc]){
if (ccollect[inc].id!=omit)
ccollect[inc].style.display="none"
inc++
}}
function expandcontent(cid){
if (typeof ccollect!="undefined"){
if (collapseprevious=="yes")
contractcontent(cid)
document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"
}}
function revivecontent(){
contractcontent("omitnothing")
selectedItem=getselectedItem()
selectedComponents=selectedItem.split("|")
for (i=0; i<selectedComponents.length-1; i++)
document.getElementById(selectedComponents[i]).style.display="block"
}
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}}
return returnvalue;
}
function getselectedItem(){
if (get_cookie(window.location.pathname) != ""){
selectedItem=get_cookie(window.location.pathname)
return selectedItem
}
else
return ""
}
function saveswitchstate(){
var inc=0, selectedItem=""
while (ccollect[inc]){
if (ccollect[inc].style.display=="block")
selectedItem+=ccollect[inc].id+"|"
inc++
}
document.cookie=window.location.pathname+"="+selectedItem
}
function do_onload(){
uniqueidn=window.location.pathname+"firsttimeload"
getElementbyClass("switchcontent")
if (enablepersist=="on" && typeof ccollect!="undefined"){
document.cookie=(get_cookie(uniqueidn)=="")? uniqueidn+"=1" : uniqueidn+"=0"
firsttimeload=(get_cookie(uniqueidn)==1)? 1 : 0 //check if this is 1st page load
if (!firsttimeload)
revivecontent()
}}
if (window.addEventListener)
window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
window.attachEvent("onload", do_onload)
else if (document.getElementById)
window.onload=do_onload
if (enablepersist=="on" && document.getElementById)
window.onunload=saveswitchstate
</script>
<script type="text/javascript">
function include_video_prep(url)
{
video='<object id="the_video" type="application/x-shockwave-flash" style="position:absolute;width:100%;height:100%;" data=\''+url+'&vq=large\'><param name="movie" value='+'"'+url+'"'+'><param name="allowFullScreen" value="true"><param name="flashvars" value="autoplay=1"><param name="wmode" value="transparent"><param name="allowNetworking" value="all" ><param name="allowscriptaccess" value="always"><\/object>'
setTimeout("document.getElementById('video_container').innerHTML=video",0);
}
function include_video(which)
{
document.getElementById('hide_button').style.display='block';
document.getElementById('hider1').style.display='block';
document.getElementById('hider2').style.display='block';
document.getElementById('video_container').style.background='black';
document.getElementById('video_container').style.color='white';
document.getElementById('video_container').style.zIndex=1;
include_video_prep(which);
setTimeout("document.getElementById('hider1').style.display='none'; document.getElementById('hider2').style.display='none'",0);
}
</script>
</head>
<body>
<div id="kontejner">
<div id="zaglavlje"></div>
<div id="blog">
<div id="hide_button" title="Stop video" onclick="this.style.display='none';document.getElementById('video_container').innerHTML=''; document.getElementById('video_container').style.background='';document.getElementById('video_container').style.color=''; document.getElementById('video_container').style.zIndex=0;"> X </div>
<div id="video_container" ></div>
<div id="hider1">
<iframe style="position:absolute;width:100%;height:100%;" src="http://www.youtube.com/apiplayer" frameborder="0"></iframe>
</div>
<div id="hider2" ></div>
<div style=" CURSOR: pointer" onclick="expandcontent('K6')"><font size="2" color="#800000">MENU</font></div>
<div id="K6" class="switchcontent" style="position:absolute;z-index:100">
<div style='position:fixed; left:50%; top:50%; margin-top:-170px; margin-left:-310px;WIDTH: 100px;height:120px;background-color:#C7CFB4;padding:15px;border:#353B27 1px solid;'>
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/Cux1bM35e1c?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Sibelius</a><br >
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/LB3VfxfBlnY?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Errol</a><br >
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/jUvcyyU7UB4?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Arkansas</a><br >
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/jTls82o-ChA?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Chimp</a><br >
<a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/Wz1W_omigwg?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Spooky</a>
<div style="position:relative; CURSOR: pointer; margin-top:10px;text-align:right;"onclick="expandcontent('K6'); "><font face="Tw Cen MT"><font size="2" color="#873800">close</font></font></div>
</div></div>
<div style="position:relative;margin-top:40px;margin-bottom:40px;">
<ul class="semiopaquemenu">
<li><a href="http://ddr4.blogger.ba/">Home</a></li>
<li><a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/Wz1W_omigwg?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Spooky</a></li>
<li><a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/jTls82o-ChA?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Chimp</a></li>
<li><a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/jUvcyyU7UB4?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Arkansas</a></li>
<li><a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/LB3VfxfBlnY?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Errol</a></li>
<li><a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/Cux1bM35e1c?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')">Sibelius</a></li>
</ul>
<div class="bottombar"></div>
</div></div>
<div id="footer">
<p>2012</p>
</div>
</div>
</body>
</html>
Arie
OK,..you had lots work about that.Thank you.
Now is working normal on the changed HTML cod..I will check how is working on the post.
Thank you so much for all.
Hello Mr.Molendijk,...
Sorry,but it is not working on the blog.
So,even video is not show on the page,..the any link which is on the location when is show video,not working.Links is disable.
When is page move down,..same problem on same location which need be video,..links is not over mouse work.
Please don't change anything with CSS HTML code blog.Because after blog loosing something,and not working normal.
With IE is OK,..but other browser not working.
This page (http://ddr8.blogger.ba/).
molendijk
08-03-2012, 09:30 AM
Hello Rexi,
I'm afraid I don't understand what you mean. Your music links are working on my machine with both IE and Firefox.
Arie.
===
Hello,..
Sorry for confusion,..video working,..links music working.
But location where video show,..under links on the post not working because block video ,even it is not show.
Tray move mouse on all links on the post,..you will find that links not working on the place where need be video.This is same situation when page move down.
So,..no problem about video,..it working good,..problem is links on the page/post ,..or any mouse over link is block,because place under show video,even no video there.
I am wrote this problem above on: ( 07-16-2012, 02:58 PM ).
If you still not understood me,..sorry,no problem, I am not need answer...THANKS.
molendijk
08-03-2012, 06:54 PM
OK, I understand you now.
Replace this part:
<style type="text/css">
{font-family: verdana; font-size:12px}
#video_container, #hider1, #hider2
{position:fixed; left:50%; top:50%; margin-top:-100px; margin-left:-286px; width: 500px; height:250px; overflow:hidden; }
#hider1, #hider2{background:black;color:white; display:none;}
#hide_button{position: fixed; left: 50%; top:50%; margin-top:-98px; margin-left: 190px; display: none; z-index:1; font-family: verdana; font-size: 12px; cursor: pointer; font-weight: bold; background: black; color: white;}
</style>
<script type="text/javascript">
function include_video_prep(url)
{
video='<object id="the_video" type="application/x-shockwave-flash" style="position:fixed;width: 500px; height:250px;" data=\''+url+'&vq=large\'><param name="movie" value='+'"'+url+'"'+'><param name="allowFullScreen" value="true"><param name="flashvars" value="autoplay=1"><param name="wmode" value="transparent"><param name="allowNetworking" value="all" ><param name="allowscriptaccess" value="always"><\/object>'
setTimeout("document.getElementById('video_container').innerHTML=video",0);
}
function include_video(which)
{
document.getElementById('hide_button').style.display='block';
document.getElementById('hider1').style.display='block';
document.getElementById('hider2').style.display='block';
document.getElementById('video_container').style.background='black';
document.getElementById('video_container').style.color='white';
include_video_prep(which);
setTimeout("document.getElementById('hider1').style.display='none'; document.getElementById('hider2').style.display='none'",0);
}
</script>
<div id="hide_button" title="Stop video" onclick="this.style.display='none';document.getElementById('video_container').innerHTML=''; document.getElementById('video_container').style.background='';document.getElementById('video_container').style.color='';"> X </div>
with this:
<style type="text/css">
{font-family: verdana; font-size:12px}
#video_container, #hider1, #hider2
{position:fixed; left:50%; top:50%; margin-top:-100px; margin-left:-286px; width: 500px; height:250px; overflow:hidden; z-index:-1}
#hider1, #hider2{background:black;color:white; display:none;}
#hide_button{position: fixed; left: 50%; top:50%; margin-top:-98px; margin-left: 190px; display: none; z-index:1; font-family: verdana; font-size: 12px; cursor: pointer; font-weight: bold; background: black; color: white;}
</style>
<script type="text/javascript">
function include_video_prep(url)
{document.getElementById('video_container').style.zIndex=0
video='<object id="the_video" type="application/x-shockwave-flash" style="position:fixed;width: 500px; height:250px;" data=\''+url+'&vq=large\'><param name="movie" value='+'"'+url+'"'+'><param name="allowFullScreen" value="true"><param name="flashvars" value="autoplay=1"><param name="wmode" value="transparent"><param name="allowNetworking" value="all" ><param name="allowscriptaccess" value="always"><\/object>'
setTimeout("document.getElementById('video_container').innerHTML=video",0);
}
function include_video(which)
{
document.getElementById('hide_button').style.display='block';
document.getElementById('hider1').style.display='block';
document.getElementById('hider2').style.display='block';
document.getElementById('video_container').style.background='black';
document.getElementById('video_container').style.color='white';
include_video_prep(which);
setTimeout("document.getElementById('hider1').style.display='none'; document.getElementById('hider2').style.display='none'",0);
}
</script>
</head>
<body>
<div id="hide_button" title="Stop video" onclick="this.style.display='none';document.getElementById('video_container').innerHTML=''; document.getElementById('video_container').style.background='';document.getElementById('video_container').style.color='';document.getElementById('video_containe r').style.zIndex=-1;"> X </div>
That should work.
===
Arie.
Wow,that is working perfect.
You are genies.Your machine is great for blog,..web site.
What I have say,...THANK YOU very,very much for your time you spend for me.
Have great time,..God bless you.
Hello Mr.Molendijk,...
Sorry,I am again.I found that this machine has one more problem.It working perfect,..but I think one more problem is there.
When I make video big size,..the sound on video going before speach/move lips on the mouth.So for example, someone say hello,..and after few second I can see how move lips on this person who speaking.I am using FF browser,..but I sow sometime same problem on IE.
Example this page (http://ddr4.blogger.ba/).
But when I use another sistem your machine ,..there is not problem.You can see example on this page (http://ddr3.blogger.ba/).
No problem when I watching any video on YouTube.
Thanks.
molendijk
08-09-2012, 09:46 AM
Hello Rexi,
On my computer, both pages work fine. On both pages, vision and sound are perfectly synchronized (on my computer). So I don't know what's going on on your computer.
I'm pretty sure the problem on your computer is not caused by my code; that's impossible.
Try another video than the Dawkins one and verify if the same problem occurs.
Do you have the latest version of Flash on your computer?
Arie.
Hello,..
I have Adobe Flash Player 11 ActiveX.
I think Flash is OK,...because I know when I watching YouTube there is no problem any video.
Any video has same problem,..big size ,..much problem.
Could be problem with my system,...This mean that is machine OK.I had many times crash Flash player,..but I am not sure that this case cause problem.
Anyway thank you very much.Have great time.
molendijk
08-09-2012, 09:14 PM
Rexi,
Just to be sure: does any of the following links create synchronization problems on your computer?
1.
http://www.youtube.com/v/YUe0_4rdj0U?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0
2.
http://www.youtube.com/embed/YUe0_4rdj0U?rel=0&autoplay=1&showinfo=0&start=0&autohide=0
3.
http://s.ytimg.com/yt/swfbin/watch_as3-vflAbHIrh.swf?video_id=YUe0_4rdj0U&rel=0&autoplay=1&showinfo=0&start=0&autohide=0&controls=1&modestbranding=1
===
Arie
===
Thanks,..
I cant see problem on this videos,..its working normal,..(but third link is disable).
williamsun
08-11-2012, 09:48 PM
If anybody can find some use from my variation. Thanks to Molendijk for the JS.
Screen capture (http://imageshack.us/photo/my-images/577/scplaylist.jpg)
Pull thumbnails (http://www.reelseo.com/youtube-thumbnail-image/) from YouTube videos.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="../data/js/jquery-1.7.2.min.js" language="javascript"></script>
<script type="text/javascript" src="../data/js/jquery.tools.min.js" language="javascript"></script>
<script type="text/javascript">
function include_video_prep(url)
{
video='<object id="the_video" type="application/x-shockwave-flash" style="position:relative;width:610px;height:458px;" data=\''+url+'&vq=large\'><param name="movie" value='+'"'+url+'"'+'><param name="allowFullScreen" value="true"><param name="flashvars" value="autoplay=1"><param name="wmode" value="transparent"><param name="allowNetworking" value="all" ><param name="allowscriptaccess" value="always"><\/object>'
setTimeout("document.getElementById('video_container').innerHTML=video",0);
}
function include_video(which)
{
document.getElementById('hide_button').style.display='block';
document.getElementById('hider1').style.display='block';
document.getElementById('hider2').style.display='block';
document.getElementById('video_container').style.background='black';
document.getElementById('video_container').style.color='white';
include_video_prep(which);
setTimeout("document.getElementById('hider1').style.display='none'; document.getElementById('hider2').style.display='none'",0);
}
</script>
</head>
<body>
<!-- SNIP -->
<style text/css> // CSS prolly needs polishing and a spit shine
#video_container, #hider1, #hider2 {
width:610px; // 610px wide because that is what the parent div width is in my page section
height:458px;
overflow:hidden;
}
#hider1, #hider2 {
background:black;
color:white;
display:none;
}
#hide_button {
float:right;
position:relative;left:0px;top:-2px;
display:none;
z-index:150;
font-family:"Times New Roman";
font-size:11px;
cursor:pointer;
font-weight:normal;
color:red;
}
#playlist ul {
list-style:none;
padding:0px 0px 0px 0px;
margin:15px 0px 30px 0px;
width:610px;
max-height:165px; // increase to allow more video links to show
clear:both;
overflow-y:scroll;
}
#playlist ul li {
list-style:none;
margin:0;
padding:4px 0px 4px 4px;
background-color:#030303;
border:1px solid #0f0f0f;
height:45px;
font-size:11px;
line-height:14px;
color:#aaa;
overflow:hidden;
}
#playlist ul li a {
font-size:13px;
line-height:19px;
}
#playlist ul li img {
float:left;
margin-right:8px;
border:0px;
width:60px;
height:45px;
}
</style>
<div id="videoplayer">
<p> </p>
<div>
<div id="hide_button" title="Close Video Window" onclick="this.style.display='none';document.getElementById('video_container').innerHTML=''; document.getElementById('video_container').style.background='';document.getElementById('video_container').style.color='';"> Close </div>
<div id="video_container"><iframe width="610" height="458" src="http://www.youtube.com/embed/F_sM9Bl1YKs?rel=0" frameborder="0" allowfullscreen></iframe></div>
<!-- I stuck one of the video link in the "video_container" to be the default video to show on page load.
Click one of the links and the selected video replaces this one. Click the "close" and video window closes. Refresh the page and the default video shows again. -->
<div id="hider1">
<iframe style="position:relative;width:610px;height:458px;" src="http://www.youtube.com/apiplayer" frameborder="0"></iframe>
</div>
<div id="hider2"></div>
</div>
</div>
<div id="playlist">
<ul>
<li><a href="javascript:void(0);" onclick="include_video('http://www.youtube.com/v/igUy2DvlVtw?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0');"><img src="http://img.youtube.com/vi/igUy2DvlVtw/3.jpg">Leave A Message</a>
<br />The group of talented grils includes surfers Carissa Moore (Hawaii), Lakey Peterson (USA), Laura Enever (Australia), Coco Ho (Hawaii), Byrne-Wickey Monyca (Hawaii) and Malia Manuel (Hawaii).</li>
<li><a href="javascript:void(0);" onclick="include_video('http://www.youtube.com/v/gPQZd5Cl8fc?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0');"><img src="http://img.youtube.com/vi/gPQZd5Cl8fc/2.jpg">Shimmer</a>
<br />When the Roxy girls light up the best surf spots on the globe, the SHIMMER is blinding...Join superstars Megan Abubo, Chelsea Georgeson, and Sofia Mulanovich as they create sparks in Indonesia, Fiji, Australia, and Hawaii.</li>
<li><a href="javascript:void(0);" onclick="include_video('http://www.youtube.com/v/F_sM9Bl1YKs?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0');"><img src="http://img.youtube.com/vi/F_sM9Bl1YKs/2.jpg">Miss Reef</a>
<br />HD video of the 2011-2012 Miss Reef Calendar girls</li>
<!-- add as many <li> items as you like. The YouTube API streams Vimeo also. Just replace the whole video link with something like: ('http://vimeo.com/moogaloop.swf?clip_id=32886912&server=vimeo.com&color=00adef&fullscreen=1') -->
</ul>
</div>
</body>
</html>
molendijk
08-11-2012, 11:03 PM
Nice. Two remarks, though:
1. You say that the YouTube API streams Vimeo also (commented line in the code).
That's not true. It's rather the script that also accepts non-YouTube URLS (like the vimeo URL you mention). You could also insert other URLS like:
Google video:
http://video.google.com/googleplayer.swf?docid=1581799606882331863&fs=true
DailyMotion:
http://www.dailymotion.com/swf/x4x8lx&related=0&autoplay=1&start=0&chromeless=0&expandVideo=0
etc.
They are not streamed by YouTube, but by themselves.
2. Your videos 'jump' when I click on an image link.
===
Arie.
williamsun
08-11-2012, 11:27 PM
Oh, ok.
Does it jump in IE? It's smooth for me in Firefox. (I hate IE and never use it except to test. I'm not a pro like you.) Didn't someone say something about the jumping or flickering before, and you fixed it for them? What does this need to fix that? Make all the corrections you want.
Edit: I tried a couple of things, and it seems to only jump when switching from the default video window to transition to one of the playlist links. I like having the default video showing, and I don't know of a way to fix it. Oh well. If you have a solution, speak up.
molendijk
08-12-2012, 02:44 PM
Hello Williamsun,
Sorry, I forgot your post.
You could try this. Experiment with it:
<!doctype html>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
<title> </title>
<style type="text/css">
{font-family: verdana; font-size:12px}
#video_container, #hider1, #hider2
{position:absolute; left:50%; top:30px; margin-left:-305px; width: 610px; height:458px; overflow:hidden; z-index:-1}
#hider1, #hider2{background:black;color:white; display:none;}
#hide_button{position: absolute; left: 50%; top:30px; margin-left: 260px; display: none; z-index:1; font-family: verdana; font-size: 12px; cursor: pointer; font-weight: bold; background: black; color: white;}
#playlist{position:absolute;left: 50%; margin-left: -305px; top:480px; }
#playlist ul {
list-style:none;
padding:0px 0px 0px 0px;
margin:15px 0px 30px 0px;
width:610px;
max-height:165px; // increase to allow more video links to show
clear:both;
overflow-y:auto;
}
#playlist ul li {
list-style:none;
margin:0;
padding:4px 0px 4px 4px;
background-color:#030303;
border:1px solid #0f0f0f;
height:45px;
font-size:11px;
line-height:14px;
color:#aaa;
overflow:hidden;
}
#playlist ul li a {
font-size:13px;
line-height:19px;
}
#playlist ul li img {
float:left;
margin-right:8px;
border:0px;
width:60px;
height:45px;
}
</style>
<script type="text/javascript">
function include_video_prep(url)
{document.getElementById('video_container').style.zIndex=0
video='<object id="the_video" type="application/x-shockwave-flash" style="position:absolute;width: 610px; height:458px;" data=\''+url+'&vq=large\'><param name="movie" value='+'"'+url+'"'+'><param name="allowFullScreen" value="true"><param name="flashvars" value="autoplay=1"><param name="wmode" value="transparent"><param name="allowNetworking" value="all" ><param name="allowscriptaccess" value="always"><\/object>'
setTimeout("document.getElementById('video_container').innerHTML=video",0);
}
function include_video(which)
{
document.getElementById('hide_button').style.display='block';
document.getElementById('hider1').style.display='block';
document.getElementById('hider2').style.display='block';
document.getElementById('video_container').style.background='black';
document.getElementById('video_container').style.color='white';
include_video_prep(which);
setTimeout("document.getElementById('hider1').style.display='none'; document.getElementById('hider2').style.display='none'",0);
}
</script>
</head>
<body onload="include_video('http://www.youtube.com/v/igUy2DvlVtw?version=3&rel=0&autoplay=0&showinfo=0&start=0&autohide=0')"><div>
<div style="position:absolute; left:50%; top:30px; margin-left:-305px; width: 610px; height:458px; overflow:hidden; z-index:-1; background:black">
<div style="position: absolute; top: 49%; left: 49%; color: white; font-family: verdana; font-size: 11px;width:150px; margin-left: -75px; margin-top: -30px">Choose a video from the list below or refresh the page</div>
</div>
<div id="hide_button" title="Stop video" onclick="this.style.display='none';document.getElementById('video_container').innerHTML=''; document.getElementById('video_container').style.background='';document.getElementById('video_container').style.color='';document.getElementById('video_containe r').style.zIndex=-1;">Close</div>
<div id="video_container" ></div>
<div id="hider1">
<iframe style="position:absolute;width:100%;height:100%;" src="http://www.youtube.com/apiplayer" frameborder="0"></iframe>
</div>
<div id="hider2" ></div>
<div id="playlist" >
<ul >
<li><a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/igUy2DvlVtw?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')"><img src="http://img.youtube.com/vi/igUy2DvlVtw/3.jpg" alt="">Leave A Message</a><br >The group of talented grils includes surfers Carissa Moore (Hawaii), Lakey Peterson (USA), Laura Enever (Australia), Coco Ho (Hawaii), Byrne-Wickey Monyca (Hawaii) and Malia Manuel (Hawaii).</li>
<li><a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/gPQZd5Cl8fc?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')"><img src="http://img.youtube.com/vi/gPQZd5Cl8fc/2.jpg" alt="">Shimmer</a><br >When the Roxy girls light up the best surf spots on the globe, the SHIMMER is blinding...Join superstars Megan Abubo, Chelsea Georgeson, and Sofia Mulanovich as they create sparks in Indonesia, Fiji, Australia, and Hawaii.</li>
<li><a href="javascript: void(0)" onclick="include_video('http://www.youtube.com/v/F_sM9Bl1YKs?version=3&rel=0&autoplay=1&showinfo=0&start=0&autohide=0')"><img src="http://img.youtube.com/vi/F_sM9Bl1YKs/2.jpg" alt="">Miss Reef</a><br >HD video of the 2011-2012 Miss Reef Calendar girls</li>
</ul>
</div>
</div>
</body>
</html>
Arie.
williamsun
08-12-2012, 03:57 PM
Using the <body onLoad is better. I like that. Thanks.
MildSun
02-05-2013, 05:01 PM
Thank you, Mr Molendijk. This was exactly what I needed.
My website: www.nilsdumortier.com (it's my first website and I still have a lot of work cut out for me)
I still have one problem though. I have this features-slider which is replaced by the player when a video in gallery is clicked. That works perfectly, thanks to your advice.
However, I still have one problem (that I am aware of at least). When a video from the features-slider is playing it doesn't stop when you click one in the gallery. How would I be able to fix that?
Groeten uit Antwerpen!
Nils
edit: sorry for the hotlink
molendijk
02-06-2013, 01:02 AM
That's strange. There's no such problem here on my machine.
Groeten uit Ezinge, Groningen, Holland.
(It's silly that we are talking English to each other since we both have Dutch as our mother tongue. Well, that's the way it is. Leve de Revolutie).
MildSun
02-08-2013, 09:05 AM
Thanks for the reply!
That is indeed strange because I still have that problem. I think I'm just going to rewrite that slider part and embed those video's the same way as I did the others.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.