kandi background
Explore Kits

react-native-webrtc | The WebRTC module for React Native | Frontend Framework library

 by   react-native-webrtc Java Version: 1.100.0 License: MIT

 by   react-native-webrtc Java Version: 1.100.0 License: MIT

Download this library from

kandi X-RAY | react-native-webrtc Summary

react-native-webrtc is a Java library typically used in User Interface, Frontend Framework, React Native, React applications. react-native-webrtc has no vulnerabilities, it has a Permissive License and it has medium support. However react-native-webrtc has 1 bugs and it build file is not available. You can install using 'npm i react-native-webrtc' or download it from GitHub, npm.
The WebRTC module for React Native
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • react-native-webrtc has a medium active ecosystem.
  • It has 3850 star(s) with 1030 fork(s). There are 124 watchers for this library.
  • There were 3 major release(s) in the last 6 months.
  • There are 59 open issues and 803 have been closed. On average issues are closed in 92 days. There are 12 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of react-native-webrtc is 1.100.0
react-native-webrtc Support
Best in #Frontend Framework
Average in #Frontend Framework
react-native-webrtc Support
Best in #Frontend Framework
Average in #Frontend Framework

quality kandi Quality

  • react-native-webrtc has 1 bugs (0 blocker, 0 critical, 1 major, 0 minor) and 139 code smells.
react-native-webrtc Quality
Best in #Frontend Framework
Average in #Frontend Framework
react-native-webrtc Quality
Best in #Frontend Framework
Average in #Frontend Framework

securitySecurity

  • react-native-webrtc has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • react-native-webrtc code analysis shows 0 unresolved vulnerabilities.
  • There are 9 security hotspots that need review.
react-native-webrtc Security
Best in #Frontend Framework
Average in #Frontend Framework
react-native-webrtc Security
Best in #Frontend Framework
Average in #Frontend Framework

license License

  • react-native-webrtc is licensed under the MIT License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
react-native-webrtc License
Best in #Frontend Framework
Average in #Frontend Framework
react-native-webrtc License
Best in #Frontend Framework
Average in #Frontend Framework

buildReuse

  • react-native-webrtc releases are available to install and integrate.
  • Deployable package is available in npm.
  • react-native-webrtc has no build file. You will be need to create the build yourself to build the component from source.
  • Installation instructions, examples and code snippets are available.
  • react-native-webrtc saves you 1316 person hours of effort in developing the same functionality from scratch.
  • It has 2953 lines of code, 190 functions and 69 files.
  • It has high code complexity. Code complexity directly impacts maintainability of the code.
react-native-webrtc Reuse
Best in #Frontend Framework
Average in #Frontend Framework
react-native-webrtc Reuse
Best in #Frontend Framework
Average in #Frontend Framework
Top functions reviewed by kandi - BETA

kandi has reviewed react-native-webrtc and discovered the below as its top functions. This is intended to give you an instant insight into react-native-webrtc implemented functionality, and help decide if they suit your requirements.

  • Parse the RTC configuration .
  • Creates a videocapturer .
  • On add stream .
  • Synchronized .
  • Get the user media with the given constraints .
  • Convert RTC stats to JSON string
  • Returns the root EglBase .
  • Received data channel .
  • Returns the String value of the given key in a ReadableMap .
  • Add an adapter to the TrackReact .

react-native-webrtc Key Features

The WebRTC module for React Native

Usage

copy iconCopydownload iconDownload
import {
  RTCPeerConnection,
  RTCIceCandidate,
  RTCSessionDescription,
  RTCView,
  MediaStream,
  MediaStreamTrack,
  mediaDevices,
  registerGlobals
} from 'react-native-webrtc';

RTCView

copy iconCopydownload iconDownload
<RTCView streamURL={this.state.stream.toURL()}/>

React-Native [TypeError: null is not an object (evaluating 'WebRTCModule.enumerateDevices')]

copy iconCopydownload iconDownload
(async () => {   
  await navigator.mediaDevices.getUserMedia({
            audio: true,
            video: {
              width: 640,
              height: 480,
              frameRate: 30,
              facingMode: (isFront ? "user" : "environment"),
              deviceId: videoSourceId
            }
          });   
  let devices = await navigator.mediaDevices.enumerateDevices();   
  console.log(devices); 
})();

Module not found for React Ntaive Webrtc while creating Android build

copy iconCopydownload iconDownload
$ rm -rf node_modules/
$ npm i
$ npm i react-native-webrtc --save
$ cd android
$ ./gradlew clean
$ cd ..
$ react-native run-android
-----------------------
$ rm -rf node_modules/
$ npm i
$ npm i react-native-webrtc --save
$ cd android
$ ./gradlew clean
$ cd ..
$ react-native run-android
-----------------------

 resolver: {
            blacklistRE: /react-native-web/,
            sourceExts: ["js", "json", "ts", "tsx", "android.js", "ios.js"]
          } 

     resolver: {
    blacklistRE: /\react-native-web\b/,
    sourceExts: ["js", "json", "ts", "tsx", "android.js", "ios.js"]
  }
 <uses-permission android:name="android.permission.CAMERA" />
  <uses-feature android:name="android.hardware.camera" />
  <uses-feature android:name="android.hardware.camera.autofocus"/>
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
   <uses-permission android:name="android.permission.RECORD_AUDIO" />
   <uses-permission android:name="android.permission.WAKE_LOCK" />
   <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

  
-----------------------

 resolver: {
            blacklistRE: /react-native-web/,
            sourceExts: ["js", "json", "ts", "tsx", "android.js", "ios.js"]
          } 

     resolver: {
    blacklistRE: /\react-native-web\b/,
    sourceExts: ["js", "json", "ts", "tsx", "android.js", "ios.js"]
  }
 <uses-permission android:name="android.permission.CAMERA" />
  <uses-feature android:name="android.hardware.camera" />
  <uses-feature android:name="android.hardware.camera.autofocus"/>
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
   <uses-permission android:name="android.permission.RECORD_AUDIO" />
   <uses-permission android:name="android.permission.WAKE_LOCK" />
   <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

  
-----------------------

 resolver: {
            blacklistRE: /react-native-web/,
            sourceExts: ["js", "json", "ts", "tsx", "android.js", "ios.js"]
          } 

     resolver: {
    blacklistRE: /\react-native-web\b/,
    sourceExts: ["js", "json", "ts", "tsx", "android.js", "ios.js"]
  }
 <uses-permission android:name="android.permission.CAMERA" />
  <uses-feature android:name="android.hardware.camera" />
  <uses-feature android:name="android.hardware.camera.autofocus"/>
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
   <uses-permission android:name="android.permission.RECORD_AUDIO" />
   <uses-permission android:name="android.permission.WAKE_LOCK" />
   <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

  
-----------------------

 resolver: {
            blacklistRE: /react-native-web/,
            sourceExts: ["js", "json", "ts", "tsx", "android.js", "ios.js"]
          } 

     resolver: {
    blacklistRE: /\react-native-web\b/,
    sourceExts: ["js", "json", "ts", "tsx", "android.js", "ios.js"]
  }
 <uses-permission android:name="android.permission.CAMERA" />
  <uses-feature android:name="android.hardware.camera" />
  <uses-feature android:name="android.hardware.camera.autofocus"/>
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
   <uses-permission android:name="android.permission.RECORD_AUDIO" />
   <uses-permission android:name="android.permission.WAKE_LOCK" />
   <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

  

Disable native library for some Android version in React Native

copy iconCopydownload iconDownload
import {Platform} from 'react-native'

[...]

if(Platform.OS == 'android' && Platform.Version >= 21){
  //Do Something
}
[...]
-----------------------
android.enableDexingArtifactTransform.desugaring=false

Flipped view in RTCView for react-native

copy iconCopydownload iconDownload
<RTCView streamURL={this.state.stream.toURL()} mirror={true} />

I am unable to initialise createOffer() after complete rendering of local stream?

copy iconCopydownload iconDownload
 if (isOffer){
    pc.createOffer()
        .then(function(desc) {
            console.log("createOffer, desc);
            pc.setLocalDescription(desc);
            // something to do
        }).
        .catch(err => console.error(err));
}

setMicrophoneMute and setSpeakerPhoneOn not working in android audio call only (react-native)

copy iconCopydownload iconDownload
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />

React-native Access Device Camera? (Android Specifically)

copy iconCopydownload iconDownload
import React from 'react';
import { View, Text, Alert } from 'react-native';
import { BarCodeScanner, Permissions } from 'expo';

    class CameraForm extends React.Component {

      state = {
        hasCameraPermission: null
      };

      componentDidMount() {
        this.permissionCheck();
      }

      permissionCheck = async () => {
        const { status } = await Permissions.askAsync(Permissions.CAMERA);
        this.setState({
          hasCameraPermission: status === 'granted'
        });
      };

      handleBarCodeScanRead = data => {
          Alert.alert(
            'Scan successful!',
            JSON.stringify(data)
          );
      };

      render() {
        return (
          <View style={styles.container}>
            <Text>Scan your wallet code</Text>
            { this.state.hasCameraPermission === null ?
                  <Text>Requesting for camera permission</Text> :
                  this.state.hasCameraPermission === false ?
                  <Text>Camera permission is not granted</Text> :
                  <BarCodeScanner
                    onBarCodeRead={this.handleBarCodeScanRead}
                    style={{ height: 400, width: 400, marginTop: 20 }}
                  />
            }
          </View>
        );
      }
    }

    const styles = {
      container: {
        flex: 1,
        alignSelf: 'stretch',
        alignItems: 'center',
        justifyContent: 'center',
        backgroundColor: 'white'
      }
    };

    export default CameraForm
-----------------------
Note:- I have implemented both the packages and both are working absolutely fine in android as well as ios, if u need any help u can ping me up.

How to propagate RTCPeerConnection changes to a React component with Mobx state management library

copy iconCopydownload iconDownload
connection.onicecandidate = () => { /* update observable proprety here */ }
connection.oniceconnectionstatechange = () => { /* update observable proprety here */ }
connection.onsignalingstatechange =  { /* update observable proprety here */ }

Redux Observable: How to return an action from a callback?

copy iconCopydownload iconDownload
.mergeMap(action => {
  return Observable.create(observer => {
    WebRTC.setRemoteSdp(peerConnection, sdp, () => {
      observer.next(myReducer.myAction());
      observer.complete();
    })
  });
}
.mergeAll()
-----------------------
// bindCallback is a factory factory, it creates a function that
// when called with any arguments will return an Observable that
// wraps setRemoteSdp, handling the callback portion for you.
// I'm using setRemoteSdp.bind(WebRTC) because I don't know
// if setRemoteSdp requires its calling context to be WebRTC
// so it's "just in case". It might not be needed.
const setRemoteSdpObservable = Observable.bindCallback(WebRTC.setRemoteSdp.bind(WebRTC));

setRemoteSdpObservable(peerConnection, sdp)
  .subscribe(d => console.log(d));
// observables are lazy, so defining this outside of our epic
// is totally cool--it only sets up the factory
const setRemoteSdpObservable = Observable.bindCallback(WebRTC.setRemoteSdp.bind(WebRTC));

function receivedSdp(action$, store) {
  return action$.ofType(VideoStream.RECEIVED_SDP)
    .mergeMap(action => {
      const {peerConnection} = store.getState().videoStreams;
      const {sdp} = action.payload;

      return setRemoteSdpObservable(peerConnection)
        .map(result => myReducer.myAction());
    })
};
-----------------------
// bindCallback is a factory factory, it creates a function that
// when called with any arguments will return an Observable that
// wraps setRemoteSdp, handling the callback portion for you.
// I'm using setRemoteSdp.bind(WebRTC) because I don't know
// if setRemoteSdp requires its calling context to be WebRTC
// so it's "just in case". It might not be needed.
const setRemoteSdpObservable = Observable.bindCallback(WebRTC.setRemoteSdp.bind(WebRTC));

setRemoteSdpObservable(peerConnection, sdp)
  .subscribe(d => console.log(d));
// observables are lazy, so defining this outside of our epic
// is totally cool--it only sets up the factory
const setRemoteSdpObservable = Observable.bindCallback(WebRTC.setRemoteSdp.bind(WebRTC));

function receivedSdp(action$, store) {
  return action$.ofType(VideoStream.RECEIVED_SDP)
    .mergeMap(action => {
      const {peerConnection} = store.getState().videoStreams;
      const {sdp} = action.payload;

      return setRemoteSdpObservable(peerConnection)
        .map(result => myReducer.myAction());
    })
};

Community Discussions

Trending Discussions on react-native-webrtc
  • ERROR: Unknown named module &quot;react-native-webrtc&quot;
  • Error: Unknown named module &quot;react-native-webrtc&quot; when imports peerjs module
  • React-Native [TypeError: null is not an object (evaluating 'WebRTCModule.enumerateDevices')]
  • React Native:-[Unhandled promise rejection: TypeError:null is not an object (evaluating '_InCallManager.checkCameraPermission')]
  • RN callkeep: error cannot find symbol with FOREGROUND_SERVICE_TYPE_MICROPHONE
  • Module not found for React Ntaive Webrtc while creating Android build
  • React Native + WebRTC TypeError: Undefined is not and Object(Evaluating: 'data.type')
  • Disable native library for some Android version in React Native
  • App not building after installing react-native-webrtc
  • Flipped view in RTCView for react-native
Trending Discussions on react-native-webrtc

QUESTION

ERROR: Unknown named module &quot;react-native-webrtc&quot;

Asked 2021-May-09 at 21:04

i'm seeing this error in my react-native app on android before launch. I haven't tested on iOS

this is a copy of my metro

 BUNDLE  ./index.js

 WARN  AsyncStorage has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '@react-native-async-storage/async-storage' instead of 'react-native'. See https://github.com/react-native-async-storage/async-storage
 ERROR  Error: Unknown named module: "react-native-webrtc"
 ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
      This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
 ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
      This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.

My index.js

/**
 * @format
 */

import {AppRegistry} from 'react-native';
import MainProject from './App';
import {name as appName} from './app.json';
import {Provider} from 'react-redux';
import {Provider as PaperProvider} from 'react-native-paper'
import store from './videocall/store'
import 'react-native-gesture-handler'
const AppRedux = () => (
    <Provider {...{store}}>
        <PaperProvider>
            <MainProject />
        </PaperProvider>
    </Provider>
)
AppRegistry.registerComponent(appName, () => AppRedux);

Already tried the answer here , didn't work.

This is package.json

"react": "17.0.1",
"react-native": "0.64.0",
"react-native-peerjs": "^1.0.4",
"react-native-webrtc": "1.89.1

ANSWER

Answered 2021-May-09 at 21:04

Realized it only occurs on 1.89.1

downgrading to 1.84.1 worked for me

Source https://stackoverflow.com/questions/67453148

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install react-native-webrtc

iOS
Android

Support

Everyone is welcome to our Discourse community to discuss any React Native and WebRTC related topics.

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Share this Page

share link
Consider Popular Frontend Framework Libraries
Try Top Libraries by react-native-webrtc
Compare Frontend Framework Libraries with Highest Support
Compare Frontend Framework Libraries with Highest Security
Compare Frontend Framework Libraries with Permissive License
Compare Frontend Framework Libraries with Highest Reuse
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.