2023年5月15日 修改错误的代码

This commit is contained in:
bai 2023-05-15 16:06:07 +08:00
parent 705d30f85e
commit 90cec0fd23
1 changed files with 6 additions and 3 deletions

View File

@ -42,7 +42,8 @@
</div>
<div style="height: 2rem;">&nbsp;</div>
<div v-show="item.isShow" :key="'other-div-'+index">
<bVideo :key="'other-'+index" :ref="el=> bVideoRefs['other-'+item.id] = el" :videoId="'other-'+item.id" :src="'http://127.0.0.1/hls/a.m3u8'" :videoOption="{ autoplay: true, controls: false }" @load-end="loadEnd"/>
<!-- <bVideo :key="'other-'+index" :ref="el=> bVideoRefs['other-'+item.id] = el" :videoId="'other-'+item.id" :src="'http://127.0.0.1/hls/a.m3u8'" :videoOption="{ autoplay: true, controls: false }" @load-end="loadEnd"/> -->
<bVideo :key="'other-'+index" :ref="el=> bVideoRefs['other-'+item.id] = el" :videoId="'other-'+item.id" :src="item.pullUrl" :videoOption="{ autoplay: true, controls: false }" @load-end="loadEnd"/>
</div>
</div>
</a-card>
@ -152,14 +153,16 @@ function initVideo(key){
}
function changeLive(item:any){
let url = item.pullUrl
let mainVideo = document.querySelector<any>('#mainVideo');
mainVideo?.player?.src([{ type:'application/x-mpegURL',src: 'http://127.0.0.1/live_hls/a.m3u8' }])
// mainVideo?.player?.src([{ type:'application/x-mpegURL',src: 'http://127.0.0.1/live_hls/a.m3u8' }])
mainVideo?.player?.src([{ type:'application/x-mpegURL',src: url }])
mainVideoCardBoxTitle.value = item.jsmc+item.xm;
console.log(`🚀 --------------------------------------------------------------------------------🚀`);
console.log(`🚀 ~ file: viewPage.vue:164 ~ changeLive ~ mainVideo?.player:`, mainVideo?.player);
console.log(`🚀 --------------------------------------------------------------------------------🚀`);
let buttonEl = mainVideo?.player.el().querySelector('.changeDefinitionBtn');
buttonEl.dataset.url = 'http://127.0.0.1/live_hls/a.m3u8';
buttonEl.dataset.url = url;
curentPlayerVideo.value = item;