瀏覽代碼

fix(rn) release audioVideo stream after creating new MediaStream

The old stream needs to be released while keeping the tracks intact
dev1
tmoldovan8x8 5 年之前
父節點
當前提交
54f60e0cd7
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 2 行新增0 行删除
  1. 2
    0
      modules/RTC/RTCUtils.js

+ 2
- 0
modules/RTC/RTCUtils.js 查看文件

@@ -709,6 +709,8 @@ function handleLocalStream(streams, resolution) {
709 709
                     videoStream.addTrack(videoTracks[j]);
710 710
                 }
711 711
             }
712
+
713
+            audioVideo.release && audioVideo.release(false);
712 714
         } else {
713 715
             // On other types of browser (e.g. Firefox) we choose (namely,
714 716
             // obtainAudioAndVideoPermissions) to call getUserMedia per device

Loading…
取消
儲存