currentMenu = "main";
currentPlayerControls.pause();
- $("#playButton").toggleClass('playing', false);
-
//If the media list is showing, hide it. Remove the mediaListAudioList class if it exists so that it will resize properly
if (currentMediaList.is(":visible"))
currentMediaList.fadeOut(300);
if (loadAndPlay)
{
currentPlayerControls.play();
-
- $("#playButton").toggleClass('playing', true);
loadAndPlay = false;
}
}
{
if (currentPlayerControls.paused)
{
- $("#playButton").toggleClass('playing', true);
currentPlayerControls.play();
}
else
{
- $("#playButton").toggleClass('playing', false);
currentPlayerControls.pause();
}
}
if (!currentPlayerControls.paused)
{
currentPlayerControls.pause();
- $("#playButton").toggleClass('playing', false);
}
}
loadAndPlay = true;
audioPlayer.pause();
- $("#playButton").toggleClass('playing', false);
-
$("#audioSrc").attr("src", audioContent[audioIndex].contentURI);
updateMediaName(audioContent[audioIndex].artists[0], audioContent[audioIndex].title, audioContent[audioIndex].coverArt);
audioPlayer.load();
videoIndex = videoContent.length - 1;
videoPlayer.pause();
- $("#playButton").toggleClass('playing', false);
$("#videoSrc").attr("src", videoContent[videoIndex].contentURI);
videoPlayer.load();
}
loadAndPlay = true;
audioPlayer.pause();
- $("#playButton").toggleClass('playing', false);
-
$("#audioSrc").attr("src", audioContent[audioIndex].contentURI);
updateMediaName(audioContent[audioIndex].artists[0], audioContent[audioIndex].title, audioContent[audioIndex].coverArt);
audioPlayer.load();
videoIndex = 0;
videoPlayer.pause();
- $("#playButton").toggleClass('playing', false);
$("#videoSrc").attr("src", videoContent[videoIndex].contentURI);
videoPlayer.load();
}
});
document.getElementById('videoPlayer').addEventListener("playing", function() {
+ $("#playButton").toggleClass('playing', true);
$("#navigationButtons").hide();
}, false);
document.getElementById('videoPlayer').addEventListener("pause", function() {
+ $("#playButton").toggleClass('playing', false);
+ $("#navigationButtons").show();
+ }, false);
+ document.getElementById('videoPlayer').addEventListener("ended", function() {
+ $("#playButton").toggleClass('playing', false);
$("#navigationButtons").show();
}, false);
+ document.getElementById('audioPlayer').addEventListener("playing", function() {
+ $("#playButton").toggleClass('playing', true);
+ }, false);
+ document.getElementById('audioPlayer').addEventListener("pause", function() {
+ $("#playButton").toggleClass('playing', false);
+ }, false);
+ document.getElementById('audioPlayer').addEventListener("ended", function() {
+ $("#playButton").toggleClass('playing', false);
+ }, false);
+ document.getElementById('imagePlayer').addEventListener("click", function() {
+ if (imageControls.paused)
+ {
+ // next picture
+ nextButtonClick();
+ }
+ else
+ {
+ // pause the slideshow and fade in the controls
+ imageControls.pause();
+ $("#navigationButtons").show();
+ }
+ }, false);
}
$(document).ready(function () {