|
@@ -169,6 +169,30 @@ class VideoDemand extends Base
|
|
|
$this->success('ok',$res_arr['body'] );
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @title 获取视频播放地址[通过视频ID获取]
|
|
|
+ * @desc 获取视频播放地址[通过视频ID获取]
|
|
|
+ * @author qc
|
|
|
+ * @url /api/Video_demand/getVideoPath
|
|
|
+ * @method GET
|
|
|
+ * @tag 视频播放凭证
|
|
|
+ * @header name:Authorization require:1 desc:Token
|
|
|
+ * @param name:ali_vid type:int require:1 default:0 desc:ali_vid
|
|
|
+ * @return name:playAuth type:string default:-- desc:playAuth
|
|
|
+ * @return name:requestId type:string default:-- desc:requestId
|
|
|
+ */
|
|
|
+ public function getVideoPath()
|
|
|
+ {
|
|
|
+ $client = self::createClient($this->access_key, $this->access_secret);
|
|
|
+ $getVideoPlayAuthRequest = new GetVideoPlayAuthRequest(['videoId'=>input('ali_vid')]);
|
|
|
+ $runtime = new RuntimeOptions([]);
|
|
|
+ $res = $client->getVideoPlayAuthWithOptions($getVideoPlayAuthRequest, $runtime);
|
|
|
+ $json_res = json_encode($res,true);
|
|
|
+ $res_arr = json_decode($json_res,true);
|
|
|
+ $this->success('ok',$res_arr['body'] );
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|