获取预览地址接口

This commit is contained in:
wangliwen 2022-06-21 12:02:13 +08:00
parent 5045213674
commit 3b90fb7a4a
1 changed files with 13 additions and 0 deletions

View File

@ -13,6 +13,8 @@ import io.renren.common.validator.group.DefaultGroup;
import io.renren.modules.resource.dto.ResourceDTO; import io.renren.modules.resource.dto.ResourceDTO;
import io.renren.modules.resource.excel.ResourceExcelImportListener; import io.renren.modules.resource.excel.ResourceExcelImportListener;
import io.renren.modules.resource.service.ResourceService; import io.renren.modules.resource.service.ResourceService;
import io.renren.modules.resource.videoPreview.AbstractVideoPreviewService;
import io.renren.modules.resource.videoPreview.VideoPreviewFactory;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
@ -399,4 +401,15 @@ public class ResourceController {
} }
*/ */
@GetMapping("getHls")
@ApiOperation("对接知识库数据")
public Result<String> getHls(String key) {
Optional<AbstractVideoPreviewService> factory = VideoPreviewFactory.build();
if (factory.isPresent()) {
String hls = factory.get().getHls(key);
return new Result<String>().ok(hls);
}
return null;
}
} }