cordova-rtc / cordova-plugin-iosrtc

Cordova iOS plugin exposing the WebRTC W3C API
MIT License
688 stars 340 forks source link

Add Native Android WebRTC support #459

Open hthetiot opened 4 years ago

hthetiot commented 4 years ago

On Android this plugin does not provide WebRTC but relly on WebView WebRTC implemation instead.

Let make a Android WebRTC custom binding :)

hthetiot commented 4 years ago

After M75 update and will include getDisplayMedia cause Fuck Google.

hthetiot commented 4 years ago

Related: https://github.com/OpenVidu/cordova-plugin-android-enumeratedevices

j4hangir commented 3 years ago

Is the plugin usable right now for Android devices?

It seems the webview's implementation of WebRTC is incorrect, and it's jittery for us. The same app runs well when browsed with Android's Chrome browser, yet jitters on webview.

hthetiot commented 3 years ago

@j4hangir not for now, I'm considering it.

I have a initial PR that implement enumerateDevices with proper device name, that all for now.

This would require considerable development on my side.

In the meantime i recommend to check this cordova plug-in that allow to embed a custom Webview chromium version: https://github.com/ks32/CrosswalkNative

webbpage commented 1 year ago

I'm not sure I understand this request. WebRTC works for me on both Web and Android deployments without requiring any plugins. This blog post really helped me https://scottiestech.info/2021/09/14/why-your-webrtc-calls-arent-working-timing-is-everything/

hthetiot commented 1 year ago

@webbpage that for old Android (bellow android 10) that don't have WebRTC implemented in the native webview similar to old iOS. Modern iOS (above 14.3) don't require this plugin but some developers still use it because they find it works better for their use case.

There is also on android webview some issues with enumerate devices, and missing getDisplayMedia that this cordova plugin could potentially handle.

webbpage commented 1 year ago

@hthetiot given Android 10 and above have over 75% of the version market share, time might be better spent on MacOS support ;-) https://gs.statcounter.com/android-version-market-share

For WebRTC on iOS 14.3 and above, I'm not sure what I'm missing. Web and Android WebRTC work with pure javascript, yet the same code on iOS only works with this plugin and iosrtc.registerGlobals()

Also note that Android is only allowing new deployments on SDK 26+ (Android 8) https://developers.google.com/maps/documentation/places/android-sdk/release-notes

hthetiot commented 1 year ago

@hthetiot given Android 10 and above have over 75% of the version market share

Also note that Android is only allowing new deployments on SDK 26+ (Android 8) https://developers.google.com/maps/documentation/places/android-sdk/release-notes

It's not about market share, it's about helping people talk to each other what ever the device they have. And as you say after you can still target up to android 8 with SDK. So if you don't care about Android support I don't see the point complaining about it.

time might be better spent on MacOS support ;-) https://gs.statcounter.com/android-version-market-share

For macOs, I guess that what you want me to work on instead, and that why you started this comments. Iosrtc is free and I'm not paid to maintain it, I work on it when I have time. MacOs support is not on the roadmap for now and can actually support Webrtc already see next answer. PR is welcome anyway.

For WebRTC on iOS 14.3 and above, I'm not sure what I'm missing. Web and Android WebRTC work with pure javascript, yet the same code on iOS only works with this plugin and iosrtc.registerGlobals()

Yes, that because by default cordova use file://, if you render the content over https:// then webrtc is available in the webview above ios 14.3, same on macos BTW. See cordova 10 change log for https support https://cordova.apache.org/announcements/2021/07/20/cordova-android-10.0.0.html