
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
react-native-webrtc-web-shim
Advanced tools
A shim for React Native WebRTC to enable support for React Native Web
Add support for react-native-web
to a react-native-webrtc
app.
Use one of the following preferred package install methods to immediately get going.
npm: npm install react-native-webrtc-web-shim --save
yarn: yarn add react-native-webrtc-web-shim
pnpm: pnpm install react-native-webrtc-web-shim
Import directly from our library instead of react-native-webrtc
.
-import { RTCPeerConnection } from 'react-native-webrtc';
+import { RTCPeerConnection } from 'react-native-webrtc-web-shim';
When displaying the RTCView
component, pass it the stream
object as a prop instead of streamURL
.
On Web, this component renders an HTML5 video tag.
<RTCView
-streamURL={stream.toURL()}
+stream={stream}
/>
Add the ontrack
listener to your RTCPeerConnection
object, similar to the onaddstream
listener.
// existing code, keep this for native support
webRtcPeer.onaddstream = async ({ stream }) => {
await addVideo( sessionId, stream );
};
// add the ontrack listener for web support
webRtcPeer.ontrack = async ({ track, streams }) => {
if ( track.kind === 'video' ) {
await addVideo( sessionId, streams[ 0 ] );
}
};
Come join our Discourse Community if you want to discuss any React Native and WebRTC related topics.
Everyone is welcome and every little helps.
Looking for extra functionality coverage?
The react-native-webrtc organization provides a number of packages which are more than useful when developing Real Time Communication applications.
FAQs
A shim for React Native WebRTC to enable support for React Native Web
The npm package react-native-webrtc-web-shim receives a total of 1,543 weekly downloads. As such, react-native-webrtc-web-shim popularity was classified as popular.
We found that react-native-webrtc-web-shim demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.