فهرست منبع

fix: 首页切换

shuisheng 2 سال پیش
والد
کامیت
df55051803
1فایلهای تغییر یافته به همراه7 افزوده شده و 1 حذف شده
  1. 7 1
      src/views/home/index.vue

+ 7 - 1
src/views/home/index.vue

@@ -197,9 +197,15 @@ async function changeLiveRoom(item: ILive) {
     //   });
     // } else {
     destroyHls();
-    await startHlsPlay({
+    const { width, height } = await startHlsPlay({
       hlsurl: item.live_room.hls_url!,
     });
+    videoToCanvas({
+      videoEl: hlsVideoEl.value!,
+      targetEl: canvasRef.value!,
+      width,
+      height,
+    });
     // }
   } else {
     destroyFlv();