mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-21 11:18:10 +08:00
41 lines
935 B
PHP
41 lines
935 B
PHP
<?php
|
|
|
|
namespace App\Http\Admin\Controllers;
|
|
|
|
use App\Services\Vod as VodService;
|
|
use Phalcon\Mvc\View;
|
|
|
|
/**
|
|
* @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->setRenderLevel(View::LEVEL_ACTION_VIEW);
|
|
$this->view->pick('public/vod_player');
|
|
$this->view->setVar('chapter_id', $chapterId);
|
|
$this->view->setVar('play_url', urldecode($playUrl));
|
|
}
|
|
|
|
}
|