webrtcHacks / adapter

Shim to insulate apps from spec changes and prefix differences. Latest adapter.js release:
https://webrtcHacks.github.io/adapter/adapter-latest.js
BSD 3-Clause "New" or "Revised" License
3.61k stars 846 forks source link

feat: add support for react-native #1131

Closed anion155 closed 1 year ago

anion155 commented 1 year ago

Description Handle react-native environment, without any shims.

Purpose https://github.com/webrtcHacks/adapter/issues/1129

saghul commented 1 year ago

Why is this necessary? It already does nothing on RN. Are you running into any problem?

anion155 commented 1 year ago

Yep. It throws in react native, 'cause there is no navigator.userAgent. So any module that using webrtc-adapter internally is practically unusable without patching.

saghul commented 1 year ago

Gotcha. @fippo I guess adapter shouldn't do anything if navigator.userAgent is not a thing.

fippo commented 1 year ago

1132 seems a bit more minimal for that and not specific to RN

fippo commented 1 year ago

Can you please give the new version 8.2.3 a try?