mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-21 03:17:05 +08:00
39 lines
840 B
PHP
39 lines
840 B
PHP
<?php
|
|
|
|
namespace App\Http\Admin\Controllers;
|
|
|
|
use App\Services\Vod as VodService;
|
|
|
|
/**
|
|
* @RoutePrefix("/admin/vod")
|
|
*/
|
|
class VodController extends Controller
|
|
{
|
|
|
|
/**
|
|
* @Post("/upload/sign", name="admin.vod.upload_sign")
|
|
*/
|
|
public function uploadSignatureAction()
|
|
{
|
|
$service = new VodService();
|
|
|
|
$sign = $service->getUploadSignature();
|
|
|
|
return $this->jsonSuccess(['sign' => $sign]);
|
|
}
|
|
|
|
/**
|
|
* @Get("/player", name="admin.vod.player")
|
|
*/
|
|
public function playerAction()
|
|
{
|
|
$chapterId = $this->request->getQuery('chapter_id', 'int');
|
|
$playUrl = $this->request->getQuery('play_url', 'string');
|
|
|
|
$this->view->pick('public/vod_player');
|
|
$this->view->setVar('chapter_id', $chapterId);
|
|
$this->view->setVar('play_url', $playUrl);
|
|
}
|
|
|
|
}
|