Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

expo-webrtc-web-shim

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expo-webrtc-web-shim

A shim for React Native WebRTC to enable support for React Native Web

  • 1.0.7-beta.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

This fork of react-native-webrtc-web-shim fixes an issue with Metro. Use expo-webrtc-web-shim instead of react-native-webrtc-web-shim.

React Native WebRTC

React-Native-WebRTC-Web-Shim

npm version npm downloads Discourse topics

Add support for react-native-web to a react-native-webrtc app.

Getting Started

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

Extra Required Steps

Import directly from our library instead of react-native-webrtc.

import {
  RTCPeerConnection,
  RTCIceCandidate,
  RTCSessionDescription,
  RTCRtpTransceiver,
  RTCRtpReceiver,
  RTCRtpSender,
  RTCErrorEvent,
  MediaStream,
  MediaStreamTrack,
  mediaDevices,
  permissions,
  registerGlobals,
  RTCView,
} from 'react-native-webrtc-web-shim';

When displaying the RTCView component make sure to give it the stream object as a prop instead of streamURL, you'll then be using an HTML5 video element on your Web app.

Simply change this.

<RTCView streamURL={stream.toURL()} />

To be like the following.

<RTCView stream={stream} />

You don't need toURL as that is handled for you.

Community

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.

Keywords

FAQs

Package last updated on 16 Apr 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc