0

I am trying to develop an iOS video chat app using Twilio video. I have the private descriptions for mic/camera set in the info.plist. This app works as expected if i run it in browser on the desktop.

When i deploy it to an iPhone, it asks the standard "Do you want to allow X to use your camera and microphone?". I click "Ok". Nothing happens. It displays the preview video fine. It does not display the remote participants video, or send my video to the remote participant.

In xcode it displays these errors:

[warn] - 2022-02-15T16:12:40.396Z warn [PeerConnectionV2 #1: 7f7c53b3-0c6b-4ef0-8058-bf761a3a90fd] Calling setLocalDescription with an RTCSessionDescription of type "offer" failed with the error "Failed to set local offer sdp: max-bundle is used but no bundle group found.". {}

[warn] - 2022-02-15T16:12:40.397Z warn [PeerConnectionV2 #1: 7f7c53b3-0c6b-4ef0-8058-bf761a3a90fd] The SDP was v=0

o=- 1766372702324133410 2 IN IP4 127.0.0.1

s=-

t=0 0

a=extmap-allow-mixed

a=msid-semantic: WMS

[warn] - 2022-02-15T16:12:40.397Z warn [connect #1] event {"elapsedTime":380,"group":"media","level":"warning","name":"error","timestamp":1644941560397,"payload":{"message":"Calling setLocalDescription with an RTCSessionDescription of type "offer" failed","code":53400,"context":"{"error":"Failed to set local offer sdp: max-bundle is used but no bundle group found.","sdp":"v=0\r\no=- 1766372702324133410 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=extmap-allow-mixed\r\na=msid-semantic: WMS\r\n"}"}}

[error] - 2022-02-15T16:12:40.398Z error [connect #1] createAndOffer() failed: {"message":"Client is unable to create or apply a local media description","code":53400,"name":"TwilioError","line":72850,"column":32,"sourceURL":"capacitor://localhost/vendor.js","stack":"TwilioError@capacitor://localhost/vendor.js:72850:32\nMediaClientLocalDescFailedError@capacitor://localhost/vendor.js:72632:32\n@capacitor://localhost/vendor.js:60685:67\nonInvoke@capacitor://localhost/vendor.js:134243:39\n@capacitor://localhost/polyfills.js:453:53\n@capacitor://localhost/polyfills.js:1611:41\nonInvokeTask@capacitor://localhost/vendor.js:134230:43\n@capacitor://localhost/polyfills.js:498:61\ndrainMicroTaskQueue@capacitor://localhost/polyfills.js:913:46\npromiseReactionJob@[native code]"}

Im using Ionic 6.3, and twilio-video 2.9.1. Is this related to a permission?

2 Answers 2

0

This is a byproduct of an earlier error in the Twilio project. Initially on build, twilio would give the error:

Error: node_modules/twilio-video/tsdef/VideoProcessor.d.ts:3:34 - error TS2304: Cannot find name 'OffscreenCanvas'.

Initially, I got around this by declaring a type 'any'. Wrong. Instead add the @types/offscreencanvas directly to my VideoProcessor.d.ts.

Now my posted error is resolved.

0

I am having the exact same issue with an Ionic/Cordova project. Everything works just fine on Android but iOS displays the same errors as yours.

It seems to be a WebRTC problem and the way iOS uses WKWebView.

If you are using Capacitor this is a good approach: https://github.com/twilio/twilio-video.js/issues/1057#issuecomment-1022375757 https://github.com/twilio/twilio-webrtc.js/pull/133#issuecomment-971623438

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.