diff --git a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java index 7353e579..d29d47e1 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java @@ -13,6 +13,8 @@ import io.renren.common.validator.group.DefaultGroup; import io.renren.modules.resource.dto.ResourceDTO; import io.renren.modules.resource.excel.ResourceExcelImportListener; 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.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -399,4 +401,15 @@ public class ResourceController { } */ + @GetMapping("getHls") + @ApiOperation("对接知识库数据") + public Result getHls(String key) { + Optional factory = VideoPreviewFactory.build(); + if (factory.isPresent()) { + String hls = factory.get().getHls(key); + return new Result().ok(hls); + } + return null; + } + } \ No newline at end of file