From ef6cb42c5f227bbe204781174d1e971ef33c2e62 Mon Sep 17 00:00:00 2001 From: digital-gnome <31593470+digital-gnome@users.noreply.github.com> Date: Sat, 11 Nov 2017 11:23:34 -0500 Subject: [PATCH] Cleanup --- web/skins/classic/views/js/event.js | 95 ----------------------------- 1 file changed, 95 deletions(-) diff --git a/web/skins/classic/views/js/event.js b/web/skins/classic/views/js/event.js index 81b3d160c..8599cb151 100644 --- a/web/skins/classic/views/js/event.js +++ b/web/skins/classic/views/js/event.js @@ -986,101 +986,6 @@ function handleClick( event ) { } } -function setupListener() { - - // Buttons - var playButton = document.getElementById("play-pause"); - var muteButton = document.getElementById("mute"); - var fullScreenButton = document.getElementById("full-screen"); - - // Sliders - var seekBar = document.getElementById("seekbar"); - var volumeBar = document.getElementById("volume-bar"); - - // Event listener for the play/pause button - playButton.addEventListener( "click", function() { - if (vid.paused == true) { - // Play the video - vid.play(); - - // Update the button text to 'Pause' - playButton.innerHTML = "Pause"; - } else { - // Pause the video - vid.pause(); - - // Update the button text to 'Play' - playButton.innerHTML = "Play"; - } - }); - - - // Event listener for the mute button - muteButton.addEventListener("click", function() { - if (vid.muted == false) { - // Mute the video - vid.muted = true; - - // Update the button text - muteButton.innerHTML = "Unmute"; - } else { - // Unmute the video - vid.muted = false; - - // Update the button text - muteButton.innerHTML = "Mute"; - } - }); - - - // Event listener for the full-screen button - fullScreenButton.addEventListener("click", function() { - if (vid.requestFullscreen) { - vid.requestFullscreen(); - } else if (vid.mozRequestFullScreen) { - vid.mozRequestFullScreen(); // Firefox - } else if (vid.webkitRequestFullscreen) { - vid.webkitRequestFullscreen(); // Chrome and Safari - } - }); - - - // Event listener for the seek bar - seekBar.addEventListener("change", function() { - // Calculate the new time - var time = vid.duration * (seekBar.value / 100); - - // Update the video time - vid.currentTime = time; - }); - - - // Update the seek bar as the video plays - vid.addEventListener("timeupdate", function() { - // Calculate the slider value - var value = (100 / vid.duration) * vid.currentTime; - - // Update the slider value - seekBar.value = value; - }); - - // Pause the video when the seek handle is being dragged - seekBar.addEventListener("mousedown", function() { - vid.pause(); - }); - - // Play the video when the seek handle is dropped - seekBar.addEventListener("mouseup", function() { - vid.play(); - }); - - // Event listener for the volume bar - volumeBar.addEventListener("change", function() { - // Update the video volume - vid.volume = volumeBar.value; - }); -} - function initPage() { //FIXME prevent blocking...not sure what is happening or best way to unblock if ($j('#videoobj').length) {