Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twilio VideoJs adaptive simulcast undefined error, because of missing width and height properties from MediaTrackSettings #762

Open
3 tasks done
ericzhao0825 opened this issue Dec 5, 2022 · 6 comments

Comments

@ericzhao0825
Copy link

YOU MUST read first!

Please use Community Forum for general technical discussions and questions.

  • I have used Google with the error message or bug in association with the library and Cordova words to make sure the issue I'm reporting is only related to iOSRTC.
  • I have provided steps to reproduce (e.g. using sample app code https://github.com/cordova-rtc/cordova-plugin-iosrtc-sample or updated extra/renderer-and-libwebrtc-tests.js file).
  • I have provided versions of third party library name, ios, Xcode and plugin version and adapter.js version if used.

Note: If the checkboxes above are not checked (which you do after the issue is posted), the issue will be closed, removing this checkbox will result in automatic closed issue.

Versions affected

  • Cordova version: 10.0.0
  • **Cordova iOS version **: 5
  • Plugin version: 8.0.3
  • iOS version: 15.4
  • Xcode version:13.3
  • WebRTC-adapter version (e.g. 7.4.0):
  • WebRTC Framework version (e.g. JSSip 3.1.2):

Description

width and height properties are missing from MediaStreamTrack.getSettings().

There is undefined error coming from twilio video js when setting preferredVideoCodecs to adaptive simulcast.
Twilio is checking var _a = track.getSettings(), width = _a.width, height = _a.height; var trackPixels_1 = width * height;

Steps to reproduce

set twilio preferredVideoCodecs to 'auto', then publish a local video

Expected results

able to publish a local video track with adaptive simulcast enabled

Actual results

twilio throws undefined error

@hthetiot
Copy link
Contributor

hthetiot commented Dec 6, 2022

MediaStreamTrack GetSettings is not implemented in iosrtc for now.

See source links bellow.

We can implement height and width, but you have to understand that this cordova plugin is only useful if you want to support iOS 14.5 and bellow, after that you don't need that plugin as ios webview support Webrtc after that.

Related:

@RSATom
Copy link
Contributor

RSATom commented Dec 6, 2022

We can implement height and width, but you have to understand that this cordova plugin is only useful if you want to support iOS 14.5 and bellow, after that you don't need that plugin as ios webview support Webrtc after that.

@hthetiot WebView's WebRTC implementation has some issues. For example it's not possible to manage AVAudioSession from application, since WebView is working in separate process on iOs. So iosrtc still has a meaning in some cases...

@samgabriel
Copy link
Contributor

Actually we tried the the built in WebKit after 14.5 and it was horrible we had to revert back. it works fine on Safari but the performance was horrible in WkWebView.

@samgabriel
Copy link
Contributor

Oh actually it was not the performance it was the fact that WebKit always prompts the user for permission for microphone and camera even after they just give it. The other problem is probably somewhere in twilio video there is a duplicate audio track causing an echo on the user side.

@RSATom
Copy link
Contributor

RSATom commented Dec 7, 2022

@samgabriel workaround for repetitive permission request is mentioned in apache/cordova-ios#1166

@hthetiot
Copy link
Contributor

hthetiot commented Dec 7, 2022

Actually we tried the the built in WebKit after 14.5 and it was horrible we had to revert back. it works fine on Safari but the performance was horrible in WkWebView.

Glad to hear that our implementation is better on WkWebview, we have so much more Optimisations that stay in PR like #748 and #623 #427.

I will try to take a look this weekend and pass the resolution from MediaStream or tracks from swift to thr webview.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants