|
|
|
@ -23,6 +23,7 @@ import { addOrUpdateChapterUsingPost, removeChapterUsingGet } from '@/services/p
|
|
|
|
|
import { addOrUpdateVideoUsingPost, getVideoAuthByIdUsingGet, removeVideoUsingGet } from '@/services/pop-b2b2c/pbcTrainingClassesVideoController';
|
|
|
|
|
import AliPlayer from '@/components/AliPlayer';
|
|
|
|
|
import AliVideoUpload from '@/components/AliVideoUpload';
|
|
|
|
|
import { getVideoAuthByVideoIdUsingGet } from '@/services/pop-b2b2c/pbcVodController';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 删除节点
|
|
|
|
@ -274,6 +275,14 @@ const Detail: React.FC<any> = () => {
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const getVideoDuration = async (videoId: string) => {
|
|
|
|
|
const res = await getVideoAuthByVideoIdUsingGet({ id: videoId })
|
|
|
|
|
if (res.retcode) {
|
|
|
|
|
return res.data?.videoMeta?.duration ? res.data?.videoMeta?.duration.toString() : ''
|
|
|
|
|
}
|
|
|
|
|
return ''
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<PageContainer
|
|
|
|
|
header={{
|
|
|
|
@ -518,6 +527,9 @@ const Detail: React.FC<any> = () => {
|
|
|
|
|
if (value.pbcVideoAddress[0].uid === '-1') {
|
|
|
|
|
pbcVideoAddress = value.pbcVideoAddress[0].url || '';
|
|
|
|
|
pbcVideoDuration = stepFormValues1.pbcVideoDuration || ''
|
|
|
|
|
if (!stepFormValues1.pbcVideoDuration) {
|
|
|
|
|
pbcVideoDuration = await getVideoDuration(value.pbcVideoAddress[0].url)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (
|
|
|
|
|
value.pbcVideoAddress[0].response &&
|
|
|
|
@ -526,7 +538,10 @@ const Detail: React.FC<any> = () => {
|
|
|
|
|
if (fileType === '1') {
|
|
|
|
|
// 客户端上传的视频数据
|
|
|
|
|
pbcVideoAddress = value.pbcVideoAddress[0].response.data.videoId;
|
|
|
|
|
pbcVideoDuration = value.pbcVideoAddress[0].response.data.duration || '';
|
|
|
|
|
pbcVideoDuration = value.pbcVideoAddress[0].response.data.duration;
|
|
|
|
|
if (!value.pbcVideoAddress[0].response.data.duration) {
|
|
|
|
|
pbcVideoDuration = await getVideoDuration(value.pbcVideoAddress[0].response.data.videoId)
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
// 服务端上传的文件数据
|
|
|
|
|
pbcVideoAddress = value.pbcVideoAddress[0].response.data;
|
|
|
|
|