Audio/video (test) page for http://eendracht.freei.me/audiovideo.html
(Listening to a Romanian Folk Dance)
This wiki is used for:
- on-the-fly-storage of music links, to be tested more thoroughly after storage (click on to be (musically) tested yet below);
- storing audio- / video-scripts
You may use this wiki's scripts or other material. If you use my personal scripts online, please provide a link to this wiki.
I already have lots of music here. As I already tested that music, it's not on this wiki (anymore).
Comments are wellcome here.
.
AUDIO/VIDEO SCRIPT (In Internet Explorer, this does not display correctly if the link having to be (musically tested) yet (above) is 'open; so close that first):
I wrote an audio/video-script for the music page of http://www.eendracht-ezinge.tk. The script is a slightly modified version of another script that I posted on this forum (DynamicDrive). Details here.
The generic code written for the eendracht-site contains the following:
<script type="text/javascript">
function stop_audio_video(Tag,Class) {//needed for hiding audio/video by clicking on hide button
for (i=0;i<document.getElementsByTagName(Tag).length; i++) {
if (document.getElementsByTagName(Tag).item(i).className == Class){
var the_item=document.getElementsByTagName(Tag).item(i);
the_item.innerHTML = "";
}
}
}
/* If we use this function, we use urls like:
http://www.youtube.com/v/ROVy9PC8_8A&hl=nl&autoplay=1&rel=0&start=4
*/
function get_movie(id,url,style,content)
{
var inserted=document.getElementById(id);
if(/*@cc_on!@*/false)
{
inserted.innerHTML='<object type="application/x-shockwave-flash" style="'+ style +'">'+'<param name="movie" value="' + url + '" \/>'+'<\/object>'+'<button style="'+ style +';height:25px;margin-top:-26px;font-family:comic sans ms;z-index:1;margin-left:70px;width:72%" onclick="stop_audio_video(\'div\',\'audiovideo\')">KLIK IN DEZE BALK OM FILM (GEHEEL) TE STOPPEN<\/button>'+'<div style="'+ style +';position:absolute;top:25px;left:5px;width:19%;height:auto;background: #dedede;text-align:center;border:1px solid black; font-family: arial; font-size:11px;font-style:italic;font-weight:normal;color:#111;z-index:1">'+ content +'<\/div>'
}
else inserted.innerHTML='<object type="application/x-shockwave-flash" data="' + url + '" style="'+ style +'"><\/object>'+'<button style="'+ style +';height:25px;margin-top:-25px;font-family:comic sans ms;z-index:1;margin-left:70px;width:72%" onclick="stop_audio_video(\'div\',\'audiovideo\')">KLIK IN DEZE BALK OM FILM (GEHEEL) TE STOPPEN<\/button>'+'<div style="'+ style +';position:absolute;top:25px;left:5px;width:19%;height:auto;background: #dedede;text-align:center;border:1px solid black; font-family: arial; font-size:11px;font-style:italic;font-weight:normal;color:#111;z-index:1">'+ content +'<\/div>'
}
/* This function uses just a normal text/html-object or an iframe, allowing us to load the pop version of youtube movies. We need this if the //get_movie// function above loads movies containing Google ads. But with this //get_movie_pop// function, we can't use things like:
&autoplay=1&rel=0&start=1 */
function get_movie_pop(id,url,style,content)
{
var inserted=document.getElementById(id);
if(/*@cc_on!@*/false)
{
inserted.innerHTML='<iframe style="'+ style +'" src="' + url + '">'+'<\/iframe>'+'<button style="'+ style +';height:25px;margin-top:-26px;font-family:comic sans ms;z-index:1;margin-left:70px;width:72%" onclick="stop_audio_video(\'div\',\'audiovideo\')">KLIK IN DEZE BALK OM FILM (GEHEEL) TE STOPPEN<\/button>'+'<div style="'+ style +';position:absolute;top:25px;left:5px;width:19%;height:auto;background: #dedede;text-align:center;border:1px solid black; font-family: arial; font-size:11px;font-style:italic;font-weight:normal;color:#111;z-index:1">'+ content +'<\/div>'
}
else inserted.innerHTML='<object type="text/html" data="' + url + '" style="'+ style +'"><\/object>'+'<button style="'+ style +';height:25px;margin-top:-25px;font-family:comic sans ms;z-index:1;margin-left:70px;width:72%" onclick="stop_audio_video(\'div\',\'audiovideo\')">KLIK IN DEZE BALK OM FILM (GEHEEL) TE STOPPEN<\/button>'+'<div style="'+ style +';position:absolute;top:25px;left:5px;width:19%;height:auto;background: #dedede;text-align:center;border:1px solid black; font-family: arial; font-size:11px;font-style:italic;font-weight:normal;color:#111;z-index:1">'+ content +'<\/div>'
}
function get_audio_mediaplayer(which)
{
stop_audio_video('div','audiovideo'); //close audio/video, if there's any
var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
if(is_chrome)
{
audio=window.open(which,'','left=10000px,width=1px,height=1px');
audio.resizeTo(screen.width,screen.height);
}
else {
audio=window.open(which,'','left=10000px,width=1px,height=1px');setTimeout('audio.close()',3000);}
}
function get_audio_custom(id,url,style,content_height,content)
{
var insert_audio=document.getElementById(id);
if(/*@cc_on!@*/false)
{
insert_audio.innerHTML='<object data="' + url + '" style="'+ style +';z-index:1">'+'<param name="src" value="' + url + '">'+'<param name="autoStart" value="0">'+'<\/object>'+ '<div style="'+ style +';text-align:center"><br><br>Laden kan enige tijd duren. <br>Wacht tot speelknop (links) zwart (of wit) wordt<\/div>' +'<button class="audiobutton" style="'+ style +'" onclick="stop_audio_video(\'div\',\'audiovideo\')"><a style="position:relative;top:-10px">KLIK IN DEZE BALK OM OPNAME (GEHEEL) TE STOPPEN<\/a><\/button>'+'<div class="audiodiv" style="'+ style +';position:absolute;top:0px;background: transparent; border:0px; font-family: Copperplate Gothic Bold; height:auto">'+ content +'<\/div>'
}
else insert_audio.innerHTML='<object data="' + url + '" style="'+ style +'">'+'<param name="autoStart" value="0">'+''+'<\/object>'+'<div style="'+ style +';text-align:center"><br><br>Laden kan enige tijd duren. <br>Wacht tot speelknop (links) zwart (of wit) wordt<\/div>'+'<button class="audiobutton" style="'+ style +'" onclick="stop_audio_video(\'div\',\'audiovideo\')"><a style="position:relative;top:0px">KLIK IN DEZE BALK OM OPNAME (GEHEEL) TE STOPPEN<\/a><\/button>'+'<div class="audiodiv" style="'+ style +';position:absolute;top:0px;background: transparent; border:0px; font-family: Copperplate Gothic Bold; height:auto">'+ content + '<\/div>'
}
</script>
Usage function get_movie:
<a href="#null" onclick=
"get_movie('container','http://www.youtube.com/v/veTI2DTkQxY&hl=nl&fs=1&&autoplay=1&rel=0&start=3', 'position:absolute; width:79%; left:20.5%; top:7%; height:93%;background:black;color:white; font-weight: bold','<span style=\'font-size:10px; \'>Bach: Badinerie, <b>German Brass</b>. DIT SWINGT DUS 100 MAAL MEER DAN ELK KUNSTMATIG TOEGEVOEGD PERCUSSIE-RITME.</span>'); return false;">
<i>Badinerie</i></a>
(This function requires the body section to contain a div-section with id="container" and class="audiovideo")
Usage function get_movie_pop:
<a href="#null" onclick=
"get_movie_pop('container','http://www.youtube.com/watch_popup?v=ROVy9PC8_8A', 'position:absolute; width:79%; left:20.5%; top:7%; height:93%;background:black;color:white; font-weight: bold','<span style=\'font-size:11px; \'>Chopin: Étude op. 10/1. Piano: <b>Valentina Lisitsa</b>. </span>'); return false;">
<i> Étude nr. 1</i></a>
(This function requires the body section to contain a div-section with id="container" and class="audiovideo")
Usage function get_audio_custom:
<a href="#null" onclick=
"get_audio_custom('container','http://cgi.omroep.nl/cgi-bin/streams?/avro/klassiek/week_cd/klankkast0310_sb.wma', 'position:absolute; width:50%; left:30%; top:49%; height:20px','60px', '<div style=\'text-align: center\'>Bach: \'<i>Wachet auf, ruft uns die Stimme</i>\'<br>Juan José Chuquisengo, piano.</div>');return false">
<b>Bach</b>: <i>Wachet auf</i></a>
Usage function get_audio_mediaplayer:
<a href="#null" onclick="get_audio_mediaplayer('http://cgi.omroep.nl/cgi-bin/streams?/avro/klassiek/zoc/zoc_960331_bb.wma'); return false"><i>Beethoven / Respighi</i></a>
If you want to use this code, please start copying and pasting. A link to this page or to one of the sites mentioned above would be very much appeciated.





