video-template-3

This commit is contained in:
make
2025-05-09 19:33:40 +08:00
parent a228bb8083
commit 715466075a
138 changed files with 22125 additions and 13 deletions

View File

@@ -355,6 +355,7 @@ function displayHistory(template = defaultTemplate) {
.replace(/{{videoRemarks}}/g, escapeHtml(video.v_remarks))
.replace(/{{videoDescription}}/g, escapeHtml(video.v_description))
.replace(/{{videoCategory}}/g, escapeHtml(video.v_category))
.replace(/{{videoParentCategory}}/g, escapeHtml(video.v_parent_category))
.replace(/{{videoYear}}/g, escapeHtml(video.v_year))
.replace(/{{videoActor}}/g, escapeHtml(video.v_area))
.replace(/{{videoPlayUrl}}/g, strVideoPlayUrl)
@@ -430,13 +431,22 @@ function initDPlayer(strPlayUrl) {
DomDPlayer.classList.add("dp-fullscreen");
// 设置视频元素的样式,取消 max-height
document.querySelector("video").style.maxHeight = "none";
document.querySelector(".video-play-page .dplayer-video-wrap").style.maxHeight = "none";
});
// 监听全屏退出事件
videoPlayer.on('fullscreen_cancel', function () {
DomDPlayer.classList.remove("dp-fullscreen");
// 恢复 max-height 为 480px
document.querySelector("video").style.maxHeight = "480px";
if(isMobile()){
document.querySelector("video").style.maxHeight = "218px";
document.querySelector(".video-play-page .dplayer-video-wrap").style.maxHeight = "218px";
}else{
document.querySelector("video").style.maxHeight = "480px";
document.querySelector(".video-play-page .dplayer-video-wrap").style.maxHeight = "480px";
}
});
videoPlayer.on('error', function () {