twilio / twilio-video.js

Twilio’s Programmable Video JavaScript SDK
https://www.twilio.com/docs/video/javascript
Other
571 stars 217 forks source link

cordova-plugin-iosrtc setRemoteDescription() method fails using Twilio with IOS #1117

Closed acamposruiz closed 4 years ago

acamposruiz commented 4 years ago

Code to reproduce the issue:

connect(token, {
        logLevel: "debug",
        audio: true,
        name: this.room[0].nombre,
        video: { width: 640 }
      }).then(
        room => {
          room.participants.forEach(participant => {
            participant.on("trackSubscribed", track => {
              video = track.attach();
              video.style.width = "90%";
              document.getElementById("remote-media-div").innerHTML = "";
              document
                .getElementById("remote-media-div")
                .appendChild(video);
            });
          });
          room.on("participantConnected", participant => {
            participant.on("trackSubscribed", track => {
              video = track.attach();
              video.style.width = "90%";
              document.getElementById("remote-media-div").innerHTML = "";
              document
                .getElementById("remote-media-div")
                .appendChild(video);
            });
          });
        },

Expected behavior:

The above code works fine with android and cordova but doesn't in IOS with this dependencies:

  "dependencies": {
    "cordova-ios": "^5.1.1",
    "cordova-plugin-camera": "^4.1.0",
    "cordova-plugin-enable-multidex": "^0.2.0",
    "cordova-plugin-inappbrowser": "^4.0.0",
    "cordova-plugin-ionic": "^5.4.7",
    "cordova-plugin-ionic-webview": "^5.0.0",
    "cordova-plugin-ios-camera-permissions": "1.2.0",
    "cordova-plugin-iosrtc": "6.0.12",
    "twilio-video": "^2.5.0",
    "cordova-plugin-nativestorage": "^2.3.2",
    "cordova-plugin-splashscreen": "^5.0.4",
    "cordova-plugin-streaming-media": "git+https://github.com/nchutchind/cordova-plugin-streaming-media.git",
    "cordova-plugin-transport-security": "0.1.2",
    "cordova-plugin-whitelist": "1",
    "cordova-plugin-wkwebviewxhrfix": "git+https://github.com/TheMattRay/cordova-plugin-wkwebviewxhrfix.git"
  },

Actual behavior:

The error printed in console is:

"WARN in [PeerConnectionV2 #1: ad34c895-a308-473a-b234-a7b3348eb575]: Calling setRemoteDescription with an RTCSessionDescription of type "answer" failed with the error "setRemoteDescription() failed: Failed to set remote answer sdp: The order of m-lines in answer doesn't match order in offer. Rejecting answer."

Full Logs:

[Info] 2020-07-28 – "15:16:39.108Z" – "|" – "INFO" – "in" – "[connect #1]:" – "Connecting to a Room" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:39.111Z" – "|" – "DEBUG" – "in" – "[connect #1]:" – "Options:" – {eventObserver: t, wsServer: "wss://global.vss.twilio.com/signaling", automaticSubscription: true, …} (cordova.js, line 1540)
{eventObserver: t, wsServer: "wss://global.vss.twilio.com/signaling", automaticSubscription: true, createLocalTracks: function, dominantSpeaker: false, …}Object
[Info] 2020-07-28 – "15:16:39.117Z" – "|" – "INFO" – "in" – "[connect #1]:" – "LocalTracks were not provided, so they will be acquired automatically before connecting to the Room. LocalTracks will be released i…" (cordova.js, line 1540)
[Info] 2020-07-28 – "15:16:40.164Z" – "|" – "INFO" – "in" – "[createLocalTracks #1]:" – "Call to getUserMedia successful; got MediaStreamTracks:" – [MediaStreamTrack, MediaStreamTrack] (2) (cordova.js, line 1540)
[MediaStreamTrack, MediaStreamTrack]Array (2)
[Log] 2020-07-28 – "15:16:40.177Z" – "|" – "DEBUG" – "in" – "[LocalAudioTrack #1: undefined]:" – "Initializing" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:40.206Z" – "|" – "DEBUG" – "in" – "[LocalVideoTrack #2: undefined]:" – "Initializing" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:40.214Z" – "|" – "DEBUG" – "in" – "[connect #1]:" – "Creating a new LocalParticipant:" – t {_events: Object, _eventsCount: 1, _maxListeners: undefined, …} (cordova.js, line 1540)
t {_events: Object, _eventsCount: 1, _maxListeners: undefined, _reachableStates: Map, …}t
[Info] 2020-07-28 – "15:16:40.217Z" – "|" – "INFO" – "in" – "[LocalParticipant #1]:" – "Created a new Participant" (cordova.js, line 1540)
[Info] 2020-07-28 – "15:16:40.220Z" – "|" – "INFO" – "in" – "[LocalParticipant #1]:" – "Added a new LocalAudioTrack:" – "5C27835E-A443-451D-9DEF-425FBF74C3CB" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:40.220Z" – "|" – "DEBUG" – "in" – "[LocalParticipant #1]:" – "LocalAudioTrack:" – o {_events: Object, _eventsCount: 6, _maxListeners: undefined, …} (cordova.js, line 1540)
o {_events: Object, _eventsCount: 6, _maxListeners: undefined, _instanceId: 1, _log: e, …}o
[Info] 2020-07-28 – "15:16:40.222Z" – "|" – "INFO" – "in" – "[LocalParticipant #1]:" – "Added a new LocalVideoTrack:" – "9A0B0933-2B49-47A2-B973-1013D9D70C4B" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:40.223Z" – "|" – "DEBUG" – "in" – "[LocalParticipant #1]:" – "LocalVideoTrack:" – o {_events: Object, _eventsCount: 6, _maxListeners: undefined, …} (cordova.js, line 1540)
o {_events: Object, _eventsCount: 6, _maxListeners: undefined, _instanceId: 2, _log: e, …}o
[Log] 2020-07-28 – "15:16:40.224Z" – "|" – "DEBUG" – "in" – "[connect #1]:" – "Creating a new RoomSignaling" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:40.231Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Created a new WebSocket:" – WebSocket {URL: "wss://global.vss.twilio.com/signaling", url: "wss://global.vss.twilio.com/signaling", readyState: 0, …} (cordova.js, line 1540)
WebSocket {URL: "wss://global.vss.twilio.com/signaling", url: "wss://global.vss.twilio.com/signaling", readyState: 0, bufferedAmount: 0, onopen: null, …}WebSocket
[Log] 2020-07-28 – "15:16:40.416Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "WebSocket opened:" – WebSocket {URL: "wss://global.vss.twilio.com/signaling", url: "wss://global.vss.twilio.com/signaling", readyState: 1, …} (cordova.js, line 1540)
WebSocket {URL: "wss://global.vss.twilio.com/signaling", url: "wss://global.vss.twilio.com/signaling", readyState: 1, bufferedAmount: 0, onopen: null, …}WebSocket
[Log] 2020-07-28 – "15:16:40.419Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"id\":\"ecfc4247-3e9c-494d-860a-b735e69d1c0a\",\"timeout\":5000,\"type\":\"hello\",\"version\":2,\"body\":{\"edge\":\"roaming\",\"token\":\"eyJ0eXAiO…" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:40.463Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"negotiatedTimeout\":5000,\"type\":\"welcome\"}" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:40.816Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"body\":{\"version\":1,\"type\":\"iced\",\"participants\":[],\"ice_servers\":[{\"urls\":\"turn:frankfurt.turn.twilio.com:3478?transport=udp\",\"u…" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:40.825Z" – "|" – "DEBUG" – "in" – "[connect #1]:" – "Got ICE servers:" – [{urls: "turn:frankfurt.turn.twilio.com:3478?transport=udp", username: "adebd629c6de812403ccb6d07f941f73a9faf9c8dc8f5057237516b765a88ea2", credential: "nTYT+PWux/ZTIEDVwNN4HiBHCkzsUdJYLHIjPg548HQ="}, {urls: "turns:frankfurt.turn.twilio.com:443?transport=tcp", username: "adebd629c6de812403ccb6d07f941f73a9faf9c8dc8f5057237516b765a88ea2", credential: "nTYT+PWux/ZTIEDVwNN4HiBHCkzsUdJYLHIjPg548HQ="}] (2) (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:40.899Z" – "|" – "DEBUG" – "in" – "[connect #1]:" – "createAndOffer() succeeded." (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:40.901Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"body\":{\"name\":\"kajon99931@mado34.com76\",\"participant\":{\"revision\":3,\"tracks\":[{\"enabled\":true,\"id\":\"5C27835E-A443-451D-9DEF-425F…" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:40.902Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #1: ad34c895-a308-473a-b234-a7b3348eb575]:" – "ICE gathering state is \"gathering\"" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:40.903Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #1: ad34c895-a308-473a-b234-a7b3348eb575]:" – "Starting ICE gathering timeout: 15000" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:40.905Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #1: ad34c895-a308-473a-b234-a7b3348eb575]:" – "Clearing ICE gathering timeout" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:40.906Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #1: ad34c895-a308-473a-b234-a7b3348eb575]:" – "Clearing ICE gathering timeout" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:40.907Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #1: ad34c895-a308-473a-b234-a7b3348eb575]:" – "Clearing ICE gathering timeout" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:41.002Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #1: ad34c895-a308-473a-b234-a7b3348eb575]:" – "Clearing ICE gathering timeout" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:41.004Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #1: ad34c895-a308-473a-b234-a7b3348eb575]:" – "Clearing ICE gathering timeout" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:41.005Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #1: ad34c895-a308-473a-b234-a7b3348eb575]:" – "Clearing ICE gathering timeout" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:41.049Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #1: ad34c895-a308-473a-b234-a7b3348eb575]:" – "Clearing ICE gathering timeout" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:41.126Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"body\":{\"version\":2,\"type\":\"connected\",\"sid\":\"RM39bb05ef5332cf8d934c52a940cb8e7f\",\"name\":\"kajon99931@mado34.com76\",\"participant\":…" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:41.136Z" – "|" – "DEBUG" – "in" – "[connect #1]:" – "Transport connected:" – {version: 2, type: "connected", sid: "RM39bb05ef5332cf8d934c52a940cb8e7f", …} (cordova.js, line 1540)
{version: 2, type: "connected", sid: "RM39bb05ef5332cf8d934c52a940cb8e7f", name: "kajon99931@mado34.com76", participant: Object, …}Object
[Log] 2020-07-28 – "15:16:41.139Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #1: ad34c895-a308-473a-b234-a7b3348eb575]:" – "Updated ICE reconnection timeout period:" – 30000 (cordova.js, line 1540)
[Info] 2020-07-28 – "15:16:41.150Z" – "|" – "INFO" – "in" – "[LocalParticipant #1]:" – "Added a new VideoTrackPublication:" – "MT8a6b44d0fee41d23a868ca61378977d8" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:41.151Z" – "|" – "DEBUG" – "in" – "[LocalParticipant #1]:" – "VideoTrackPublication:" – t {_events: {}, _eventsCount: 0, _maxListeners: undefined, …} (cordova.js, line 1540)
t {_events: {}, _eventsCount: 0, _maxListeners: undefined, _instanceId: 0, _log: e, …}t
[Info] 2020-07-28 – "15:16:41.153Z" – "|" – "INFO" – "in" – "[LocalParticipant #1]:" – "Added a new AudioTrackPublication:" – "MTbf1e024ba3a0b894006c7d54f9f1a205" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:41.153Z" – "|" – "DEBUG" – "in" – "[LocalParticipant #1]:" – "AudioTrackPublication:" – t {_events: {}, _eventsCount: 0, _maxListeners: undefined, …} (cordova.js, line 1540)
t {_events: {}, _eventsCount: 0, _maxListeners: undefined, _instanceId: 1, _log: e, …}t
[Log] 2020-07-28 – "15:16:41.154Z" – "|" – "DEBUG" – "in" – "[LocalParticipant #1: PAbae3410172c8bc1d6f2c47d3253514d7]:" – "Transitioned to state:" – "connected" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:41.154Z" – "|" – "DEBUG" – "in" – "[LocalParticipant #1: PAbae3410172c8bc1d6f2c47d3253514d7]:" – "Transitioned to state:" – "connected" (cordova.js, line 1540)
[Info] 2020-07-28 – "15:16:41.154Z" – "|" – "INFO" – "in" – "[LocalParticipant #1: PAbae3410172c8bc1d6f2c47d3253514d7]:" – "reconnected" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:41.155Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"body\":{\"session\":\"2aa4d3f94d52f105010f98a718a9656839bb05ef5332cf8d934c52a940cb8e7fbae3410172c8bc1d6f2c47d3253514d7c00800f2df6380…" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:41.156Z" – "|" – "DEBUG" – "in" – "[connect #1]:" – "Transport state changed:" – "connected" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:41.158Z" – "|" – "DEBUG" – "in" – "[Room #1: RM39bb05ef5332cf8d934c52a940cb8e7f]:" – "Creating a new RemoteParticipant for each ParticipantSignaling in the RoomSignaling" (cordova.js, line 1540)
[Info] 2020-07-28 – "15:16:41.160Z" – "|" – "INFO" – "in" – "[RemoteParticipant #2: PAf62efca0f47d3a6c329a65709d9d1c0e]:" – "Created a new Participant: Pedro" (cordova.js, line 1540)
[Info] 2020-07-28 – "15:16:41.163Z" – "|" – "INFO" – "in" – "[RemoteParticipant #2: PAf62efca0f47d3a6c329a65709d9d1c0e]:" – "Added a new VideoTrackPublication:" – "MT914bb34c736e05f62493c65280205e57" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:41.163Z" – "|" – "DEBUG" – "in" – "[RemoteParticipant #2: PAf62efca0f47d3a6c329a65709d9d1c0e]:" – "VideoTrackPublication:" – t {_events: Object, _eventsCount: 6, _maxListeners: undefined, …} (cordova.js, line 1540)
t {_events: Object, _eventsCount: 6, _maxListeners: undefined, _instanceId: 2, _log: e, …}t
[Info] 2020-07-28 – "15:16:41.165Z" – "|" – "INFO" – "in" – "[RemoteParticipant #2: PAf62efca0f47d3a6c329a65709d9d1c0e]:" – "Added a new AudioTrackPublication:" – "MTec134dae5a358b722e28cb13647eb986" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:41.165Z" – "|" – "DEBUG" – "in" – "[RemoteParticipant #2: PAf62efca0f47d3a6c329a65709d9d1c0e]:" – "AudioTrackPublication:" – t {_events: Object, _eventsCount: 6, _maxListeners: undefined, …} (cordova.js, line 1540)
t {_events: Object, _eventsCount: 6, _maxListeners: undefined, _instanceId: 3, _log: e, …}t
[Info] 2020-07-28 – "15:16:41.166Z" – "|" – "INFO" – "in" – "[Room #1: RM39bb05ef5332cf8d934c52a940cb8e7f]:" – "A new RemoteParticipant connected:" – t {_events: Object, _eventsCount: 1, _maxListeners: undefined, …} (cordova.js, line 1540)
t {_events: Object, _eventsCount: 1, _maxListeners: undefined, _audioTracks: Map, _dataTracks: Map, …}t
[Log] 2020-07-28 – "15:16:41.167Z" – "|" – "DEBUG" – "in" – "[Room #1: RM39bb05ef5332cf8d934c52a940cb8e7f]:" – "Setting up RemoteParticipant creation for all subsequent ParticipantSignalings that connect to the RoomSignaling" (cordova.js, line 1540)
[Info] 2020-07-28 – "15:16:41.168Z" – "|" – "INFO" – "in" – "[Room #1: RM39bb05ef5332cf8d934c52a940cb8e7f]:" – "Created a new Room:" – "kajon99931@mado34.com76" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:41.168Z" – "|" – "DEBUG" – "in" – "[Room #1: RM39bb05ef5332cf8d934c52a940cb8e7f]:" – "Initial RemoteParticipants:" – [t] (1) (cordova.js, line 1540)
[t]Array (1)
[Log] 2020-07-28 – "15:16:41.169Z" – "|" – "DEBUG" – "in" – "[connect #1]:" – "Creating a new Room:" – t {_events: {}, _eventsCount: 0, _maxListeners: undefined, …} (cordova.js, line 1540)
t {_events: {}, _eventsCount: 0, _maxListeners: undefined, _log: e, _instanceId: 1, …}t
[Info] 2020-07-28 – "15:16:41.170Z" – "|" – "INFO" – "in" – "[connect #1]:" – "Connected to Room:" – "[Room #1: RM39bb05ef5332cf8d934c52a940cb8e7f]" (cordova.js, line 1540)
[Info] 2020-07-28 – "15:16:41.170Z" – "|" – "INFO" – "in" – "[connect #1]:" – "Room name:" – "kajon99931@mado34.com76" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:41.170Z" – "|" – "DEBUG" – "in" – "[connect #1]:" – "Room:" – t {_events: {}, _eventsCount: 0, _maxListeners: undefined, …} (cordova.js, line 1540)
t {_events: {}, _eventsCount: 0, _maxListeners: undefined, _log: e, _instanceId: 1, …}t
[Log] 2020-07-28 – "15:16:41.214Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"body\":{\"version\":2,\"type\":\"update\",\"sid\":\"RM39bb05ef5332cf8d934c52a940cb8e7f\",\"name\":\"RM39bb05ef5332cf8d934c52a940cb8e7f\",\"parti…" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:41.572Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"body\":{\"version\":2,\"type\":\"update\",\"peer_connections\":[{\"id\":\"ad34c895-a308-473a-b234-a7b3348eb575\",\"description\":{\"type\":\"answe…" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:41.676Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"body\":{\"version\":2,\"type\":\"update\",\"peer_connections\":[{\"id\":\"ad34c895-a308-473a-b234-a7b3348eb575\",\"ice\":{\"ufrag\":\"zg9B\",\"revis…" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:41.732Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"body\":{\"version\":2,\"type\":\"update\",\"peer_connections\":[{\"id\":\"ad34c895-a308-473a-b234-a7b3348eb575\",\"description\":{\"type\":\"offer…" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:41.962Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"body\":{\"version\":2,\"type\":\"update\",\"peer_connections\":[{\"id\":\"ad34c895-a308-473a-b234-a7b3348eb575\",\"ice\":{\"ufrag\":\"zg9B\",\"revis…" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:42.193Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #1: ad34c895-a308-473a-b234-a7b3348eb575]:" – "Clearing ICE gathering timeout" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:42.196Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"body\":{\"session\":\"2aa4d3f94d52f105010f98a718a9656839bb05ef5332cf8d934c52a940cb8e7fbae3410172c8bc1d6f2c47d3253514d7c00800f2df6380…" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:42.198Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #1: ad34c895-a308-473a-b234-a7b3348eb575]:" – "Clearing ICE gathering timeout" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:42.199Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"body\":{\"session\":\"2aa4d3f94d52f105010f98a718a9656839bb05ef5332cf8d934c52a940cb8e7fbae3410172c8bc1d6f2c47d3253514d7c00800f2df6380…" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:42.201Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #1: ad34c895-a308-473a-b234-a7b3348eb575]:" – "Clearing ICE gathering timeout" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:42.201Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"body\":{\"session\":\"2aa4d3f94d52f105010f98a718a9656839bb05ef5332cf8d934c52a940cb8e7fbae3410172c8bc1d6f2c47d3253514d7c00800f2df6380…" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:42.202Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #1: ad34c895-a308-473a-b234-a7b3348eb575]:" – "Clearing ICE gathering timeout" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:42.203Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"body\":{\"session\":\"2aa4d3f94d52f105010f98a718a9656839bb05ef5332cf8d934c52a940cb8e7fbae3410172c8bc1d6f2c47d3253514d7c00800f2df6380…" (cordova.js, line 1540)
[Warning] 2020-07-28 – "15:16:42.209Z" – "|" – "WARN" – "in" – "[PeerConnectionV2 #1: ad34c895-a308-473a-b234-a7b3348eb575]:" – "Calling setRemoteDescription with an RTCSessionDescription of type "answer" failed with the error "setRemoteDescription() failed: Failed to set remote answer sdp: The order of m-lines in answer doesn't match order in offer. Rejecting answer."" (cordova.js, line 1540)
[Warning] 2020-07-28 – "15:16:42.209Z" – "|" – "WARN" – "in" – "[PeerConnectionV2 #1: ad34c895-a308-473a-b234-a7b3348eb575]:" – "The SDP was v=0\r↵o=- 6780928917446908349 2 IN IP4 127.0.0.1\r↵s=-\r↵t=0 0\r↵a=msid-semantic: WMS *\r↵a=group:BUNDLE audio video\r↵m=audio …" (cordova.js, line 1540)
[Error] Unhandled Promise Rejection: TwilioError: Client is unable to apply a remote media description
    (función anónima) (vendor.js:20:94502)
    promiseReactionJob
[Log] 2020-07-28 – "15:16:42.328Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #1: ad34c895-a308-473a-b234-a7b3348eb575]:" – "Clearing ICE gathering timeout" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:42.329Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"body\":{\"session\":\"2aa4d3f94d52f105010f98a718a9656839bb05ef5332cf8d934c52a940cb8e7fbae3410172c8bc1d6f2c47d3253514d7c00800f2df6380…" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:45.125Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:47.138Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:49.733Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:51.940Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:54.229Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:56.743Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:16:58.730Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:17:01.546Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:17:03.455Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:17:06.349Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:17:07.961Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:17:11.033Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"body\":{\"version\":2,\"type\":\"update\",\"peer_connections\":[{\"id\":\"ad34c895-a308-473a-b234-a7b3348eb575\",\"description\":{\"type\":\"close…" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:17:11.040Z" – "|" – "DEBUG" – "in" – "[RemoteParticipant #2: PAf62efca0f47d3a6c329a65709d9d1c0e]:" – "Transitioned to state:" – "disconnected" (cordova.js, line 1540)
[Info] 2020-07-28 – "15:17:11.041Z" – "|" – "INFO" – "in" – "[Room #1: RM39bb05ef5332cf8d934c52a940cb8e7f]:" – "RemoteParticipant disconnected:" – t {_events: Object, _eventsCount: 15, _maxListeners: undefined, …} (cordova.js, line 1540)
t {_events: Object, _eventsCount: 15, _maxListeners: undefined, _audioTracks: Map, _dataTracks: Map, …}t
[Log] 2020-07-28 – "15:17:11.043Z" – "|" – "DEBUG" – "in" – "[RemoteParticipant #2: PAf62efca0f47d3a6c329a65709d9d1c0e]:" – "Removing Track event reemitters" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:17:11.044Z" – "|" – "DEBUG" – "in" – "[RemoteParticipant #2: PAf62efca0f47d3a6c329a65709d9d1c0e]:" – "Removing event listeners" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:17:11.152Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:17:12.076Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #1: ad34c895-a308-473a-b234-a7b3348eb575]:" – "ICE connection state is \"closed\"" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:17:12.077Z" – "|" – "DEBUG" – "in" – "[PeerConnectionV2 #1: ad34c895-a308-473a-b234-a7b3348eb575]:" – "ICE gathering state is \"complete\"" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:17:12.431Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:17:15.954Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:17:17.074Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:17:20.757Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:17:21.629Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:17:25.559Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:17:26.191Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:17:30.362Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:17:30.694Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:17:35.165Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:17:35.230Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)
[Log] FirebasePlugin[native]: Enter background: FCM direct channel = false (cordova.js, line 1540)
[Log] 2020-07-28 – "15:17:39.919Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Incoming: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)
[Log] 2020-07-28 – "15:17:40.002Z" – "|" – "DEBUG" – "in" – "[TwilioConnection #1: wss://global.vss.twilio.com/signaling]:" – "Outgoing: {\"type\":\"heartbeat\"}" (cordova.js, line 1540)

This issue https://github.com/cordova-rtc/cordova-plugin-iosrtc/issues/458 in cordova-plugin-iosrtc talks about the above error in other enviroment so my question is if there is an issue in the implementation of twilio-video with cordova-plugin-iosrtc or I am doing something wrong. Thank you in advance for the response.

Note: As I mentioned above this code works fine with Android implementation.

Software versions:

manjeshbhargav commented 4 years ago

Hi @acamposruiz ,

We do not support Cordova/PhoneGap at this moment. Please go here for a list of the supported browsers and platforms. You can also use the Video.isSupported flag in your app to determine if the current browser/platform is supported.

Thanks,

Manjesh Malavalli JSDK Team

acamposruiz commented 4 years ago

Thank you very much for your response @manjeshbhargav , it was very useful. Given that the above solution was working with cordova for Android I had the thought that may be it was posible in a way to make it work for IOS as well but as you tell me better to looking for a diferente aproaching ;)

Thank you again!