Cordova plugin for screen sharing #496
Replies: 1 comment
-
I'm pretty confident that WebRTC is available in webviews and you can use MediaStreams to transfer audio and/or video to a connected peer, as long as you're supporting a semi-recent device. Most of the WebRTC APIs were implemented in late chrome 40s through late chrome 50s. Android APIs 24-26 should have a sufficient webview version from factory (a device without any updates installed) and still have support for WebRTC. And in the real world, most of those devices will be have webview updates to have the current system webview release. However, within the standard browser APIs I don't believe has any option to get a media stream of the screen itself. I'm pretty sure it only gets connected to user hardware such as webcams, cameras, and microphones. Therefore you'll likely need a native solution for the screen share part and I'm not sure if it is possible to manage your own It is possible to create a third-party plugin, so assuming if there is a native solution, there should be a way to expose it to the webview via a cordova plugin. Android does have a Media Projection API (with improvements on API 34, but the general API is available since API 21) which allows you to capture the screen as a native media stream. Connecting that to a browser's media stream will be the tricky part that I'm not sure is possible. |
Beta Was this translation helpful? Give feedback.
-
Cordova Version: 12.0.0
Platform: Android 12
Issue:
It seems there is no Cordova plugin for screen sharing. I'm looking for recommendations for alternative solutions or plugins for screen sharing on mobile. Is it possible to obtain a MediaStream object from WebRTC as we can on other platforms (Web, Electron, etc.)?
Beta Was this translation helpful? Give feedback.
All reactions