ソースを参照

Test RTCRtpReceiver.getCapabilities before using

 RTCRtpReceiver.getCapabilities could be undefined on some platforms
dev1
Jerry Hu 4年前
コミット
d12035874f
1個のファイルの変更1行の追加0行の削除
  1. 1
    0
      modules/RTC/CodecSelection.js

+ 1
- 0
modules/RTC/CodecSelection.js ファイルの表示

@@ -94,6 +94,7 @@ export class CodecSelection {
94 94
         }
95 95
 
96 96
         return window.RTCRtpReceiver
97
+            && window.RTCRtpReceiver.getCapabilities
97 98
             && window.RTCRtpReceiver.getCapabilities('video').codecs
98 99
             .some(codec => codec.mimeType.toLowerCase() === `video/${preferredCodec}`);
99 100
     }

読み込み中…
キャンセル
保存