|
|
@ -18,7 +18,12 @@ |
|
|
|
<!-- Player Audio --> |
|
|
|
<!-- Player Audio --> |
|
|
|
<div style="display:table;position: absolute; right: 0; bottom: 0;margin:10px;" id="dummy"> |
|
|
|
<div style="display:table;position: absolute; right: 0; bottom: 0;margin:10px;" id="dummy"> |
|
|
|
<div id="songName" style="display:table-cell;vertical-align:middle">Clau M.& Nect<br />House of Dreams</div> |
|
|
|
<div id="songName" style="display:table-cell;vertical-align:middle">Clau M.& Nect<br />House of Dreams</div> |
|
|
|
<img style="float:right" src="img/play.png" name="Bottom-1" width="30" height="30" border="0" onclick="playSound(this, 'audio/Clau _M_Nect_-_House_Of_Dreams.mp3');diffImage(this);" /> |
|
|
|
<img id="audioButton" style="float:right" src="img/play.png" name="Bottom-1" width="30" height="30" border="0" /> |
|
|
|
|
|
|
|
<audio id="audioSource" preload="none"> |
|
|
|
|
|
|
|
<source src="audio/Clau _M_Nect_-_House_Of_Dreams.ogg" type="audio/ogg"> |
|
|
|
|
|
|
|
<source src="audio/Clau _M_Nect_-_House_Of_Dreams.mp3" type="audio/mpeg"> |
|
|
|
|
|
|
|
Your browser does not support the audio element. |
|
|
|
|
|
|
|
</audio> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- Tape Credits --> |
|
|
|
<!-- Tape Credits --> |
|
|
@ -29,27 +34,28 @@ |
|
|
|
|
|
|
|
|
|
|
|
<!-- Video is muted & autoplays --> |
|
|
|
<!-- Video is muted & autoplays --> |
|
|
|
<video autoplay loop id="video-background" muted plays-inline poster="img/beammm_thumbnail.jpg"> |
|
|
|
<video autoplay loop id="video-background" muted plays-inline poster="img/beammm_thumbnail.jpg"> |
|
|
|
<source src="video/beammm_loop.mp4"> |
|
|
|
<source src="video/beammm_loop.webm" type="video/webm"> |
|
|
|
|
|
|
|
<source src="video/beammm_loop.mp4" type="video/mp4"> |
|
|
|
</video> |
|
|
|
</video> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
function playSound(el, soundfile) { |
|
|
|
audioButton = document.getElementById("audioButton") |
|
|
|
if (el.mp3) { |
|
|
|
audioSource = document.getElementById("audioSource") |
|
|
|
if (el.mp3.paused) el.mp3.play(); |
|
|
|
audioButton.onclick = function() {audioButtonClick(audioButton, audioSource)}; |
|
|
|
else el.mp3.pause(); |
|
|
|
|
|
|
|
} else { |
|
|
|
function audioButtonClick(audioButton, audioSource) { |
|
|
|
el.mp3 = new Audio(soundfile); |
|
|
|
if (audioSource.paused) { |
|
|
|
el.mp3.play(); |
|
|
|
audioSource.play(); |
|
|
|
|
|
|
|
audioButton.src = "img/pause.png"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else { |
|
|
|
|
|
|
|
audioSource.pause(); |
|
|
|
|
|
|
|
audioButton.src = "img/play.png"; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function diffImage(img) { |
|
|
|
audioSource.onended = function() { |
|
|
|
if (img.src.match(/pause/)) { |
|
|
|
audioButton.src = "img/repeat.png"; |
|
|
|
console.log('play'); |
|
|
|
|
|
|
|
img.src = "img/play.png"; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
console.log('pause'); |
|
|
|
|
|
|
|
img.src = "img/pause.png"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
</body> |
|
|
|
</body> |
|
|
|