From 3d423890125cd713041ce3bb77b2bf3be44bb78f Mon Sep 17 00:00:00 2001 From: koogua Date: Thu, 17 Nov 2022 18:05:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=92=AD=E6=94=BE=E5=99=A8?= =?UTF-8?q?=E4=B8=AD=E5=A4=AE=E6=92=AD=E6=94=BE=E6=8C=89=E9=92=AE=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/home/js/chapter.live.player.js | 8 ++++++-- public/static/home/js/chapter.vod.player.js | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) 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(); }