From 0fad1af1d704283f48674236db4cc6baa4ba6450 Mon Sep 17 00:00:00 2001 From: filesite Date: Tue, 16 Jul 2024 13:00:43 +0800 Subject: [PATCH] video play button improve --- themes/beauty/views/site/index.php | 4 ++-- www/js/beauty.js | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/themes/beauty/views/site/index.php b/themes/beauty/views/site/index.php index 1317d7f..88f5dfb 100644 --- a/themes/beauty/views/site/index.php +++ b/themes/beauty/views/site/index.php @@ -268,7 +268,7 @@ eof; {$title} - video play button + video play button 00:00:00 @@ -304,7 +304,7 @@ eof; {$title} - video play button + video play button 00:00:00 diff --git a/www/js/beauty.js b/www/js/beauty.js index 2cc8fcb..1429609 100644 --- a/www/js/beauty.js +++ b/www/js/beauty.js @@ -259,6 +259,7 @@ if ($('#pr-player').length > 0 && typeof(videojs) != 'undefined') { if (duration && snapshotImg && /^data:image\/.+;base64,/i.test(snapshotImg)) { $('#poster_'+mc_video_id).attr('src', snapshotImg); $('#poster_'+mc_video_id).parent('a').find('.duration').text(formatDuration(duration)); + $('#poster_'+mc_video_id).parent('a').find('.playbtn').removeClass('hide'); saveVideoMeta(mc_video_id, { duration: duration, @@ -289,6 +290,7 @@ var getVideoMetaAndShowIt = function(videoId, videoUrl) { }else { $('#poster_'+videoId).attr('src', data.meta.snapshot); $('#poster_'+videoId).parent('a').find('.duration').text(formatDuration(data.meta.duration)); + $('#poster_'+videoId).parent('a').find('.playbtn').removeClass('hide'); } }).fail(function(jqXHR, textStatus, errorThrown) { console.error('视频数据获取失败,错误信息:' + errorThrown);