提交 9838c259 authored 作者: 王鹏飞's avatar 王鹏飞

chore: 修改视频资源

上级 264f8ec6
...@@ -117,7 +117,10 @@ const progress = reactive<VideoRecordType>({ ...@@ -117,7 +117,10 @@ const progress = reactive<VideoRecordType>({
}) })
let playList = $ref<PlayItemType[]>([]) let playList = $ref<PlayItemType[]>([])
const currentPlayList = $computed<PlayItemType[]>(() => { const currentPlayList = $computed<any>(() => {
if (resource?.info.video_type === 2) {
return [{ PlayURL: resource?.info.video_play_address }]
}
return playList return playList
.filter(item => item.StreamType === 'video' && item.Format === 'mp4') .filter(item => item.StreamType === 'video' && item.Format === 'mp4')
.map(item => { .map(item => {
...@@ -156,7 +159,11 @@ async function fetchVideoRecords() { ...@@ -156,7 +159,11 @@ async function fetchVideoRecords() {
watchEffect(async () => { watchEffect(async () => {
if (!resource) return if (!resource) return
await fetchVideoRecords() await fetchVideoRecords()
await fetchInfo() try {
await fetchInfo()
} catch (error) {
console.log(error)
}
console.log('watch', progress.current_playing_time) console.log('watch', progress.current_playing_time)
changeSrc(currentPlayList[0]) changeSrc(currentPlayList[0])
}) })
......
...@@ -88,6 +88,8 @@ export interface FileType { ...@@ -88,6 +88,8 @@ export interface FileType {
source_id: string source_id: string
ppt_arr?: PptType[] ppt_arr?: PptType[]
can_download: number can_download: number
video_type?: 1 | 2
video_play_address?: string
} }
export interface PptType { export interface PptType {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论