This commit is contained in:
haoouba 2021-01-31 16:16:15 +08:00
parent 6649415505
commit 16742a8c7d
5 changed files with 28 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -277,4 +277,11 @@
}
}
}
&__player {
&-play {
width: 100%;
height: 480px;
background: #000;
}
}
}

View File

@ -127,6 +127,7 @@ document.addEventListener('DOMContentLoaded', () => {
if (res.code !== 1) return $('.joe_video__detail-info').html(`<p class="error">${res.data}</p>`)
if (!res.data.list.length) return $('.joe_video__detail-info').html(`<p class="error">数据抓取异常!请检查!</p>`)
const item = res.data.list[0]
/* 设置视频详情 */
$('.joe_video__detail-info').html(`
<div class="thumbnail">
<img class="pic video_lazyload" onerror="javascript: this.src = '${Joe.LAZY_LOAD}'" src="${Joe.LAZY_LOAD}" data-original="${item.vod_pic}" alt="${item.vod_name}">
@ -141,6 +142,8 @@ document.addEventListener('DOMContentLoaded', () => {
</dl>
`)
new LazyLoad('.video_lazyload')
/* 设置视频播放标题 */
$('.joe_video__player .joe_video__contain-title').html('正在播放:' + item.vod_name)
}
})
}

View File

@ -607,7 +607,7 @@ function themeConfig($form)
$JFriends = new Typecho_Widget_Helper_Form_Element_Textarea(
'JFriends',
NULL,
'Joe的博客 || https://ae.js.cn || https://cdn.jsdelivr.net/npm/typecho_joe_theme@4.3.5/assets/img/link.png || Joe主题作者',
'Joe的博客 || https://ae.js.cn || https://cdn.jsdelivr.net/npm/typecho_joe_theme@4.3.5/assets/img/link.png || Eternity is not a distance but a decision',
'友情链接(非必填)',
'介绍:用于填写友情链接 <br />
注意:您需要先增加友联链接页面(新增独立页面-右侧模板选择友联),该项才会生效 <br />
@ -634,10 +634,21 @@ function themeConfig($form)
NULL,
'苹果CMS开放API',
'介绍请填写苹果CMS V10开放API用于视频页面使用<br />
例如:ok资源网提供的https://api.okzy.tv/api.php/provide/vod/ <br />
例如:https://v.ini0.com/api.php/provide/vod/ <br />
如果您搭建了苹果cms网站那么用你自己的即可如果没有请去网上找API <br />
'
);
$JMaccmsAPI->setAttribute('class', 'joe_content joe_other');
$form->addInput($JMaccmsAPI);
$JCustomPlayer = new Typecho_Widget_Helper_Form_Element_Text(
'JCustomPlayer',
NULL,
NULL,
'自定义视频播放器(非必填)',
'介绍:用于修改主题自带的默认播放器 <br />
注意主题自带的播放器只能解析M3U8的视频格式'
);
$JCustomPlayer->setAttribute('class', 'joe_content joe_other');
$form->addInput($JCustomPlayer);
} ?>

View File

@ -32,6 +32,10 @@
<p class="error">正在拼命加载中...</p>
</div>
</div>
<div class="joe_video__player joe_video__contain">
<div class="joe_video__contain-title">正在播放:</div>
<iframe src="" data-player="<?php echo $this->options->JCustomPlayer ? $this->options->JCustomPlayer : '/usr/themes/Joe/library/player.php?url=' ?>" class="joe_video__player-play"></iframe>
</div>
<?php else : ?>
<div class="joe_video__type joe_video__contain">
<div class="joe_video__contain-title">视频分类</div>