This commit is contained in:
haoouba 2021-02-01 21:24:49 +08:00
parent 30056b762c
commit 1de54fa2bb
8 changed files with 33 additions and 12 deletions

File diff suppressed because one or more lines are too long

View File

@ -1463,6 +1463,10 @@ html[data-night='night'] {
color: var(--theme);
}
}
&-player {
width: 100%;
height: 500px;
}
&-protected {
display: flex;
justify-content: center;

File diff suppressed because one or more lines are too long

View File

@ -22,12 +22,12 @@
&::before {
content: '';
position: absolute;
bottom: -10px;
left: -10px;
border-style: solid;
border-width: 10px;
bottom: -20px;
left: 0;
z-index: -1;
border-color: var(--theme) transparent transparent;
transform: rotate(90deg);
}
}
&-list {

View File

@ -117,7 +117,7 @@ document.addEventListener('DOMContentLoaded', () => {
/* 搜索功能 */
const searchFn = () => {
const val = $('.joe_video__list-search input').val();
if (!val || isLoading) return;
if (isLoading) return;
queryData.pg = 1;
queryData.t = '';
queryData.wd = val;

View File

@ -18,6 +18,22 @@ function _parseShortCode($content)
$content
);
}
/* 过滤bilibili播放器 */
if (preg_match('/\[bilibili\s{0,}bvid="\w{0,}"\s{0,}\/\]/', $content)) {
$content = preg_replace(
'/\[bilibili\s{0,}bvid="(\w{0,})"\s{0,}\/\]/',
'<iframe class="joe_detail__article-player block" allowfullscreen="true" src="//player.bilibili.com/player.html?bvid=$1"></iframe>',
$content
);
}
/* 过滤dplayer播放器 */
if (preg_match('/\[dplayer\s{0,}src=".{0,}"\s{0,}\/\]/', $content)) {
$player = Helper::options()->JCustomPlayer ? Helper::options()->JCustomPlayer : '/usr/themes/Joe/library/player.php?url=';
$content = preg_replace(
'/\[dplayer\s{0,}src="(.{0,})"\s{0,}\/\]/',
'<iframe class="joe_detail__article-player block" allowfullscreen="true" src="' . $player . '$1"></iframe>',
$content
);
}
return $content;
}

View File

@ -647,6 +647,7 @@ function themeConfig($form)
NULL,
'自定义视频播放器(非必填)',
'介绍:用于修改主题自带的默认播放器 <br />
例如https://v.ini0.com/player/?url= <br />
注意主题自带的播放器只能解析M3U8的视频格式'
);
$JCustomPlayer->setAttribute('class', 'joe_content joe_other');

View File

@ -34,7 +34,7 @@
</div>
<div class="joe_video__player joe_video__contain">
<div class="joe_video__contain-title">正在播放:</div>
<iframe class="joe_video__player-play" data-player="<?php echo $this->options->JCustomPlayer ? $this->options->JCustomPlayer : '/usr/themes/Joe/library/player.php?url=' ?>"></iframe>
<iframe allowfullscreen="true" class="joe_video__player-play" data-player="<?php echo $this->options->JCustomPlayer ? $this->options->JCustomPlayer : '/usr/themes/Joe/library/player.php?url=' ?>"></iframe>
</div>
<?php else : ?>
<div class="joe_video__type joe_video__contain">