|
@@ -0,0 +1,43 @@
|
|
|
+package com.zhongzheng.controller.vod;
|
|
|
+
|
|
|
+import com.zhongzheng.common.core.controller.BaseController;
|
|
|
+import com.zhongzheng.common.core.domain.AjaxResult;
|
|
|
+import com.zhongzheng.modules.tencentcloud.service.IVodService;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+
|
|
|
+@Api(value = "腾讯视频信息控制器", tags = {"腾讯视频信息管理"})
|
|
|
+@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
|
|
+@RestController
|
|
|
+@RequestMapping("/vod/video")
|
|
|
+public class VodVideoController extends BaseController {
|
|
|
+
|
|
|
+ private final IVodService iVodService;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation("获取腾讯视频小程序播放凭证")
|
|
|
+ @GetMapping("/sign/{fileId}")
|
|
|
+ public AjaxResult getPlaySign(@PathVariable("fileId") String fileId){
|
|
|
+ Map<String,Object> map = iVodService.vodSignRequest(fileId);
|
|
|
+ return AjaxResult.success(map);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("获取腾讯视频详情")
|
|
|
+ @GetMapping("/detail/{fileId}")
|
|
|
+ public AjaxResult getPlayDetail(@PathVariable("fileId") String fileId){
|
|
|
+ String[] fileIds = new String[]{fileId};
|
|
|
+ Map<String,Object> map = iVodService.describeMediaInfos(fileIds);
|
|
|
+ return AjaxResult.success(map);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|