// javascript code

window.addEventListener('DOMContentLoaded', function() {
    var videoFrame = document.getElementById('videoFrame');
    videoFrame.style.display = 'none';

    console.log("elements are loaded")
    document.addEventListener('keydown', function(evt) {
        console.log("a key was pressed!");
        console.log("Pressed key: " + evt.key);
        savedEvent = evt;  // saved as a global variable

        if (evt.key == 'h') {
            // hide the video
            // videoFrame.style.display = 'none';
            $(videoFrame).slideUp(2000);
        }
        else if (evt.key == 's') {
            // videoFrame.style.display = '';
            $(videoFrame).slideDown(2000);
        }
    })
});