From 5b1503f72670a5ccfa391051c4638693a841794a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn?= Date: Fri, 20 Nov 2015 16:54:36 +0100 Subject: show and hide close button with the rest of the UI --- js/viewer.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'js/viewer.js') diff --git a/js/viewer.js b/js/viewer.js index 4eeb2c6..9bec2bc 100755 --- a/js/viewer.js +++ b/js/viewer.js @@ -27,6 +27,13 @@ var videoViewer = { $('#videoplayer_overlay').fadeIn('fast'); // autoplay var vjsPlayer = videojs("my_video_1"); + // show and hide close button with the rest of the UI + vjsPlayer.on('userinactive', function () { + $('#box-close').fadeOut(1000, "easeInOutExpo"); + }); + vjsPlayer.on('useractive', function () { + $('#box-close').fadeIn(100, "easeInOutExpo"); + }); vjsPlayer.play(); }, hide : function() { -- cgit v1.2.3