Commit 3d477c8b by 杨昕

添加全屏预览

parent d9d5e42b
Pipeline #13746 passed with stages
in 41 seconds
......@@ -12,8 +12,8 @@ use App\Http\Controllers\Controller;
class MediaController extends Controller
{
private const PREVIEW_DOMAIN = [
'test' => 'https://xue.t.eoffcn.com/preview/temp/play/',
'master' => 'https://xue.eoffcn.com/preview/temp/play/'
'test' => 'https://xue.t.eoffcn.com/preview/temp/',
'master' => 'https://xue.eoffcn.com/preview/temp/'
];
/**
......@@ -181,8 +181,17 @@ class MediaController extends Controller
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function media_preview(Request $request,$mediaNum){
$isFullScreen = $request->fullScreen;
$branch = !empty(getenv('branch'))?getenv('branch'):"test";
$url = self::PREVIEW_DOMAIN[$branch].'/'.$mediaNum;
$url = self::PREVIEW_DOMAIN[$branch];
if ($isFullScreen){
$url .= "player".'/'.$mediaNum;
}else{
$url .= "play".'/'.$mediaNum;
}
return redirect($url);
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -101,6 +101,10 @@
<a title="视频预览" href="javascript:;" onclick="preview_video(this,'{{$media["media_num"]}}')">
<i class="iconfont">&#xe79f;</i>
</a>
<a title="全屏预览" href="javascript:;" onclick="preview_video(this,'{{$media["media_num"]}}',1)">
<i class="iconfont">&#xe627;</i>
</a>
@else
<a title="生成媒资号码" onclick="set_media_num(this,'{{$media["_id"]}}')" href="javascript:;">
<i class="iconfont">&#xe61a;</i>
......@@ -297,8 +301,11 @@
* @param row
* @param id
*/
function preview_video(row,id){
function preview_video(row,id,fullScreen){
var href = "/web/video_preview/"+id;
if (fullScreen !== undefined){
href = "/web/video_preview/"+id+"?fullScreen="+fullScreen;
}
window.open(href);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment