I noticed that the webrtcsupport library has been archived, but libp2p webrtc start has some dependencies. I recently fixed some bugs for this library. At present, it can support more browsers, such as Safari,Chrome,Firefox, and can run smoothly on mobile phones, PCs and Macs.
Changes are very simple, you can refer to my code base below:
getUserMedia is not supported in Chrome on IOS, because of WkWebview in IOS. But in some case, we don’t use getUserMedia function, but just want to use WebRTC for text message. So if use the support.js, some application will not work on chrome in IOS. Maybe we should consider to relaxation of conditions for checking WebRTC support?
P.S there is a reply on stack overflow:
MediaStream (aka getUserMedia)
For apps running inside Safari App, iOS11+, all WebRTC APIs are supported. That includes getUserMedia . Be sure to use adapter.js library for best compatibility, since each browser - including Safari - uses a different name for its implementation. For example, in Safari it’s navigator.mediaDevices.getUserMedia() .
But, when using WKWebView or SFSafariViewController , it’s a different story:
Both RTCPeerConnection and RTCDataChannelare supported and working.
Thanks for all this deep research.
Can you open an issue in the repo so that we can discuss the technicalities there?
You can just paste the last post there. FYI the lead maintainer of that module is ooo this week, so we will only be able to discuss this further next week