|
|
@ -5,6 +5,7 @@ |
|
|
|
require_once __DIR__ . '/../../../lib/DirScanner.php'; |
|
|
|
require_once __DIR__ . '/../../../lib/DirScanner.php'; |
|
|
|
require_once __DIR__ . '/../../../plugins/Parsedown.php'; |
|
|
|
require_once __DIR__ . '/../../../plugins/Parsedown.php'; |
|
|
|
require_once __DIR__ . '/../../../plugins/Common.php'; |
|
|
|
require_once __DIR__ . '/../../../plugins/Common.php'; |
|
|
|
|
|
|
|
require_once __DIR__ . '/../../../plugins/Html.php'; |
|
|
|
|
|
|
|
|
|
|
|
Class SiteController extends Controller { |
|
|
|
Class SiteController extends Controller { |
|
|
|
|
|
|
|
|
|
|
@ -560,6 +561,8 @@ Class SiteController extends Controller { |
|
|
|
return $this->renderJson(compact('code', 'msg')); |
|
|
|
return $this->renderJson(compact('code', 'msg')); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//TODO: 增加mp3播放器,以及mp3时长获取 |
|
|
|
|
|
|
|
|
|
|
|
public function actionPlayer() { |
|
|
|
public function actionPlayer() { |
|
|
|
$videoUrl = $this->get('url', ''); |
|
|
|
$videoUrl = $this->get('url', ''); |
|
|
|
$videoId = $this->get('id', ''); |
|
|
|
$videoId = $this->get('id', ''); |
|
|
@ -576,6 +579,10 @@ Class SiteController extends Controller { |
|
|
|
$arr = parse_url($videoUrl); |
|
|
|
$arr = parse_url($videoUrl); |
|
|
|
$videoFilename = basename($arr['path']); |
|
|
|
$videoFilename = basename($arr['path']); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//增加文件后缀格式检查,区分:mp4, mov, m3u8 |
|
|
|
|
|
|
|
$videoExtension = pathinfo($arr['path'], PATHINFO_EXTENSION); |
|
|
|
|
|
|
|
$videoSourceType = Html::getMediaSourceType($videoExtension); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取联系方式 |
|
|
|
//获取联系方式 |
|
|
|
$maxScanDeep = 0; //最大扫描目录级数 |
|
|
|
$maxScanDeep = 0; //最大扫描目录级数 |
|
|
@ -596,7 +603,7 @@ Class SiteController extends Controller { |
|
|
|
$params = compact( |
|
|
|
$params = compact( |
|
|
|
'videoUrl', 'videoId', 'videoFilename', |
|
|
|
'videoUrl', 'videoId', 'videoFilename', |
|
|
|
'cateId', 'cacheParentDataId', 'page', 'pageSize', |
|
|
|
'cateId', 'cacheParentDataId', 'page', 'pageSize', |
|
|
|
'copyright', 'isAdminIp' |
|
|
|
'copyright', 'isAdminIp', 'videoExtension', 'videoSourceType' |
|
|
|
); |
|
|
|
); |
|
|
|
return $this->render($viewName, $params, $pageTitle); |
|
|
|
return $this->render($viewName, $params, $pageTitle); |
|
|
|
} |
|
|
|
} |
|
|
|