This commit is contained in:
wuchunlei
2024-05-17 10:01:50 +08:00
6 changed files with 35 additions and 22 deletions

View File

@@ -48,7 +48,7 @@ public class CourseCatalogueChapterVideoServiceImpl extends ServiceImpl<CourseCa
public CourseCatalogueChapterVideoEntity checkVideo(CourseCatalogueChapterVideoEntity videoEntity) throws Exception {
CourseCatalogueChapterVideoEntity video = this.getById(videoEntity.getId());
if (video.getDuration() == 0) {
asyncService.pushDurationToVideo(video.getId());
asyncService.pushDurationToVideo(video.getId());//获取mp4总时长
}
CourseCatalogueChapterEntity courseCatalogueChapterEntity = courseCatalogueChapterDao.selectById(video.getChapterId());
CourseCatalogueEntity courseCatalogueEntity = courseCatalogueDao.selectById(courseCatalogueChapterEntity.getCatalogueId());
@@ -87,6 +87,17 @@ public class CourseCatalogueChapterVideoServiceImpl extends ServiceImpl<CourseCa
video.setVideoUrl(s_str + video.getVideo());
}
if(video.getType() == 2){
String s_str = "";
if (video.getVideo().startsWith("article/")) {
s_str = "https://ehh-private-01.oss-cn-beijing.aliyuncs.com/voice/article/";
} else {
s_str = "https://ehh-private-01.oss-cn-beijing.aliyuncs.com/voice/taiHuClass/";
}
video.setVideoUrl(s_str + video.getVideo());
}
return video;
}