1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-23 03:50:56 +08:00

修正播放器中央播放按钮显示问题

This commit is contained in:
koogua 2022-11-17 18:05:45 +08:00
parent 7f9a63886f
commit 3d42389012
2 changed files with 12 additions and 4 deletions

View File

@ -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;

View File

@ -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();
}