Add registerGlobals() function to pollute global namespace with RTC entities
See original GitHub issueAs discussed here, there are some WebRTC based JS libraries that depend on RTCPeerConnection
and so on being available in global namespace.
cordova-plugin-iosrtc
exposes iosrtc.registerGlobals() for that.
So the only requirement is that react-native-webrtc
is loaded first, then the app calls to registerGlobals()
and then the 3rd party WebRTC library can be load.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:9 (2 by maintainers)
Top Results From Across the Web
What does it mean global namespace would be polluted?
In JavaScript, declarations outside of a function are in the global scope. Consider this small example:
Read more >Is “Don't Pollute the Global Namespace” Still Good Advice in ...
The jQuery library used a $ sign as a global namespace (a namespace is just ... Example of global namespace pollution: var x...
Read more >Lua: technical note 7 - Lua.org
This note describes a simple way to implement modules (also called packages) in Lua. The proposed method provides namespaces, privacy, ...
Read more >JS tip - Avoiding polluting the global namespace - BigBinary
In the process of creating the calendar I created a bunch of utility functions that are available at global namespace. What are we...
Read more >Work with global namespaces in Visual Basic - LINQ to XML
You can get an XNamespace object that corresponds to a global namespace using the GetXmlNamespace method. Example: Use Imports to declare a ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for bringing this up @ibc! I agree, this would be a welcome addition. I’ll try to get it done next week, if nobody beats me to it 😃
Hey, could use some help 😃 we’ve got a situation that looks like this:
Somehow webRTC doesn’t work on iOS when embedded in a WebView, probably due to permission issues, so I’m trying to find out how to go about making use of
react-native-webrtc
to solve that problem.Right now it’s unclear to me how exactly
react-native-webrtc
would help in this situation. I realize we have to callregisterGlobals()
, but how would that trickle down properly to the WebView?