<!doctype HTML>
<html>
<head>
<title>Play Audio and/or Video on Major Browsers - RJM Programming - October, 2014</title>
<script type='text/javascript'>
function presstn() {
var iv=document.getElementById('ivideo');
var ia = document.getElementById("iaudio");
iv.src = "./video_generic.php?filename=Nala_HideAndSeek";
ia.src = "./audio_generic.php?filename=Thunder_Mike_Koenig_315681025";
}
function pressdbeg() {
var iv=document.getElementById('ivideo');
var ia = document.getElementById("iaudio");
iv.src = "./video_generic.php?filename=Loveatfirstbite.jpg&path=&domain=http://www.rjmprogramming.com.au/TESOL/ListeningTask2/";
ia.src = "./audio_generic.php?filename=Love_at_first_bite.ogg&path=&domain=http://www.rjmprogramming.com.au/TESOL/ListeningTask2/";
}
function pressnc() {
var iv=document.getElementById('ivideo');
var ia = document.getElementById("iaudio");
iv.src = "./video_generic.php?filename=Nala_Catch";
ia.src = "./audio_generic.php?filename=Nala_Catch";
}
function presswn() {
var iv=document.getElementById('ivideo');
var ia = document.getElementById("iaudio");
iv.src = "./video_generic.php?filename=Nala_HideAndSeek";
ia.src = "./audio_generic.php?filename=Wind-SoundBible";
}
function pressboth() {
var iv=document.getElementById('ivideo');
var yiv = (iv.contentWindow || iv.contentDocument);
var ia = document.getElementById("iaudio");
var yia = (ia.contentWindow || ia.contentDocument);
//window.nvideo.myvform.submit();
//window.naudio.myaform.submit();
var bia=yia.document.getElementById('submit');
var biv=yiv.document.getElementById('submit');
biv.click();
bia.click();
}
</script>
</head>
<body>
<table style="width:100%;">
<tr><th><input type='button' onclick='document.getElementById("iaudio").src="./audio_generic.php";' value='Audio'</input></th><th><input type='button' onclick='document.getElementById("iaudio").src="./audio_generic.php"; document.getElementById("ivideo").src="./video_generic.php";' value='-'></input></th><th><input type='button' onclick='document.getElementById("ivideo").src="./video_generic.php";' value='Video'></input></th></tr>
<tr><td style=width:40%;><iframe width='100%' height='900px' id='iaudio' name='naudio' src='./audio_generic.php'></iframe></td><td align='center' style=width:4%;><input align='center' onclick='pressboth(); return false;' type='button' name='submit' id='submit' value='Synchronize Play' title='Play both audio and video together'></input><br><br><input align='center' onclick='presswn(); return false;' type='button' name='submitwn' id='submitwn' value='Windy Nala' title='Audio thanks to http://soundbible.com'></input><br><input align='center' onclick='presstn(); return false;' type='button' name='submittn' id='submittn' value='Stormy Nala' title='Audio thanks to http://soundbible.com'></input><br><input align='center' onclick='pressnc(); return false;' type='button' name='submitnc' id='submitnc' value='Nala Catch'></input><br><input align='center' onclick='pressdbeg(); return false;' type='button' name='submitdbeg' id='submitdbeg' value='Love at First Bite'></input></td><td style=width:40%;><iframe width='100%' height='900px' id='ivideo' name='nvideo' src='./video_generic.php'></iframe></td></tr>
</table>
</body>
</html>