Przeglądaj źródła

fix(JitsiLocalTrack): no data event fired before ICE connected

We can not assume that the audio source is not sending any data based
on the stat until the media connection has not been established.
dev1
paweldomas 9 lat temu
rodzic
commit
1f6e2ac9fe
1 zmienionych plików z 6 dodań i 1 usunięć
  1. 6
    1
      modules/RTC/JitsiLocalTrack.js

+ 6
- 1
modules/RTC/JitsiLocalTrack.js Wyświetl plik

@@ -536,7 +536,12 @@ JitsiLocalTrack.prototype.getDeviceId = function () {
536 536
  */
537 537
 JitsiLocalTrack.prototype._setByteSent = function (bytesSent) {
538 538
     this._bytesSent = bytesSent;
539
-    if(this._testByteSent) {
539
+    // FIXME it's a shame that PeerConnection and ICE status does not belong
540
+    // to the RTC module and it has to be accessed through
541
+    // the conference(and through the XMPP chat room ???) instead
542
+    let iceConnectionState
543
+        = this.conference ? this.conference.getConnectionState() : null;
544
+    if(this._testByteSent && "connected" === iceConnectionState) {
540 545
         setTimeout(function () {
541 546
             if(this._bytesSent <= 0){
542 547
                 //we are not receiving anything from the microphone

Ładowanie…
Anuluj
Zapisz