Open EvilTrev opened 10 years ago
Are you using a P2P (relayed) session? I believe iOS can only support one other peer if in P2P mode but if you use a "routed" session then it should work.
See known issues in the iOS release notes: https://tokbox.com/opentok/libraries/client/ios/release-notes.html
I believe I am, but does that explain the issue entirely? Neither desktop browser can see the iOS stream when I perform operations in one order, and both can see it in the other order.
If I create a session between 2 browsers (Chrome and Firefox in this case) and then invite the iOS cordova client to join them, it creates a lot of issues which ends with the iOS client being able to see the other two streams (and believing it is broadcasting), however the browsers cannot see the cordova stream and instead show this message: "The stream was unable to connect due to a network error. Make sure your connection isn't blocked by a firewall.". If I do this in the other order (invite cordova, then firefox)... everything works.
The debug log from OpenTok (v2.2) is pretty huge, but I have it if needed. The highlights are probably:
opentok.js:912 Error while setting LocalDescription opentok.js:912 Failed to set local answer sdp: Called in wrong state: STATE_SENTACCEPT opentok.js:912 PeerConnection.offerProcessor Error while setting LocalDescription: Failed to set local answer sdp: Called in wrong state: STATE_SENTACCEPT
Subscriber State Change Failed: 'Failed' cannot transition to 'NotSubscribing' opentok.js:912 Object {message: "'Failed' cannot transition to 'NotSubscribing'", newState: "NotSubscribing", currentState: "Failed", previousState: "BindingRemoteStream"}
OT.exception :: title: Connection Failed (1013) msg: Subscriber PeerConnection Error: PeerConnection.offerProcessor Error while setting LocalDescription: Failed to set local answer sdp: Called in wrong state: STATE_SENTACCEPT ...
1501 "Session.subscribe :: PeerConnection.offerProcessor Error while setting LocalDescription: Failed to set local answer sdp: Called in wrong state: STATE_SENTACCEPT" opentok.js:912 TC failed to subscribe to stream : Session.subscribe :: PeerConnection.offerProcessor Error while setting LocalDescription: Failed to set local answer sdp: Called in wrong state: STATE_SENTACCEPT room.js:410 OT.exception :: title: undefined (1501) msg: Session.subscribe :: PeerConnection.offerProcessor Error while setting LocalDescription: Failed to set local answer sdp: Called in wrong state: STATE_SENTACCEPT opentok.js:912 Uncaught TypeError: Cannot read property 'addEventListener' of null opentok.js:6456 OpenTok Exception! room.js:364 OT.ExceptionEvent {type: "exception", cancelable: true, preventDefault: function, isDefaultPrevented: function, message:"Subscriber PeerConnection Error: PeerConnection.of…swer sdp: Called in wrong state: STATE_SENTACCEPT"…}
...
OT.ExceptionEvent {type: "exception", cancelable: true, preventDefault: function, isDefaultPrevented: function, message:"Session.subscribe :: PeerConnection.offerProcessor…swer sdp: Called in wrong state: STATE_SENTACCEPT"…}