I am currently working on a website and I have a video player I am trying to program basically I have a regular old basic html5 video player...
HTML
<div class="videoPlayerSkin" style="background: black;">
<video id="videoPlayer" controls>
<source src="http://localhost/C++Source/video/introSlideshow.mp4" />
<source src="http://localhost/C++Source/video/introSlideshow.ogg" />
</video>
</div>
Then I have the JS file
var videoPlayer = document.getElementById("videoPlayer");
var playVideoArray = [16, 17, 80]; //keycodes, ctrl shift and p
document.addEventListener("keydown", function(e) {
if (e.keyCode === playVideoArray[0]&&playVideoArray[1] + playVideoArray[2])
{
videoPlayer.play();
}
}, false);
But it wont play I went into my errors and could not find anything wrong could someone explain what is wrong with this code and how I can fix this? I am merely trying to play the video when the user presses ctrl+shift+p