xuqiaoying 2 سال پیش
والد
کامیت
3e25a29d22
1فایلهای تغییر یافته به همراه3 افزوده شده و 6 حذف شده
  1. 3 6
      pages3/polyv/detail.vue

+ 3 - 6
pages3/polyv/detail.vue

@@ -26,7 +26,6 @@
         ></image>
       </view>
       <view v-else>
-        <!-- <video id="video" width="400" height="300" class="photo_v"></video> -->
         <!-- v-if="playVID" -->
         <!-- #ifdef MP-WEIXIN -->
         <view
@@ -539,8 +538,7 @@
               </camera>
               <!-- #endif -->
               <!-- #ifdef H5 -->
-              <!-- :src="stream" -->
-              <video id="video" width="400" height="300" class="photo_v"></video>
+              <video id="video" :src="stream" width="400" height="300" class="photo_v"></video>
               <!-- #endif -->
             </view>
             <view class="custom" v-if="!isTaking">
@@ -3606,9 +3604,8 @@ export default {
         // 将视频流设置为video元素的源
         console.log('video1:',video, 'stream:',stream);
         video.srcObject = stream;
-        this.mediaStreamTrack =
-          typeof stream.stop === "function" ? stream : stream.getTracks()[0];
-        console.log('mediaStreamTrack:', mediaStreamTrack);
+        this.mediaStreamTrack = typeof stream.stop === "function" ? stream : stream.getTracks()[0];
+        console.log('mediaStreamTrack:', this.mediaStreamTrack);
         video.play();
       });
     },