diff --git a/public/static/home/js/chapter.live.player.js b/public/static/home/js/chapter.live.player.js index 4a0b7487..7c0285e8 100644 --- a/public/static/home/js/chapter.live.player.js +++ b/public/static/home/js/chapter.live.player.js @@ -56,14 +56,17 @@ layui.use(['jquery', 'helper'], function () { }); /** - * 播放器中央播放按钮点击事件 + * 播放器中央播放按钮 */ - $('#play-mask').on('click', function () { + var $playMask = $('#play-mask'); + + $playMask.on('click', function () { $(this).hide(); player.toggle(); }); function start() { + $playMask.hide(); if (interval != null) { clearInterval(interval); interval = null; @@ -72,6 +75,7 @@ layui.use(['jquery', 'helper'], function () { } function stop() { + $playMask.show(); if (interval != null) { clearInterval(interval); interval = null; diff --git a/public/static/home/js/chapter.vod.player.js b/public/static/home/js/chapter.vod.player.js index 3aaa7f69..9db67992 100644 --- a/public/static/home/js/chapter.vod.player.js +++ b/public/static/home/js/chapter.vod.player.js @@ -50,9 +50,11 @@ layui.use(['jquery', 'helper'], function () { }); /** - * 播放器中央播放按钮点击事件 + * 播放器中央播放按钮 */ - $('#play-mask').on('click', function () { + var $playMask = $('#play-mask'); + + $playMask.on('click', function () { $(this).hide(); player.toggle(); }); @@ -78,11 +80,13 @@ layui.use(['jquery', 'helper'], function () { } function play() { + $playMask.hide(); clearLearningInterval(); setLearningInterval(); } function pause() { + $playMask.show(); clearLearningInterval(); }