Giter VIP home page Giter VIP logo

rctwebrtcdemo2's Introduction

RCTWebRTCDemo2

Configuration (Works on iOS & Android)

react: 16.8.3

react-native: 0.59.4

react-native-webrtc: 1.67.1

Usage

  • Clone the repository, run npm install.
  • For iOS, run the project on Xcode.
  • For Android, run react-native run-android in the directory.

Native Code Changes (Android)

  • Because this is version 1.67.1 you must change the native android code in the module.
  • go to node_modules/react-native-webrtc/android/src/main/java/com/oney/WebRTCModule/WebRTCModule.java
import com.facebook.react.bridge.ReadableType;
import com.facebook.react.bridge.WritableMap;
import com.facebook.react.modules.core.DeviceEventManagerModule;
import com.facebook.react.module.annotations.ReactModule; // <-- Add this

import java.util.ArrayList;
import java.util.HashMap;

import org.webrtc.*;

@ReactModule(name = "WebRTCModule") // <-- Add this
public class WebRTCModule extends ReactContextBaseJavaModule {
    static final String TAG = WebRTCModule.class.getCanonicalName();

Instructions

  • For this to work you need to create the server, go to : RCTWebRTCDemo-server and follow the instructions.

  • After you create the server and deploy it with ngrok copy the link, something like that "https://a4cd7858.ngrok.io" and paste it to RCTWebRCTDemo2/src/App.js

const url = 'paste_it_here';
  • It must look like than
const url = 'https://a4cd7858.ngrok.io/';

Note

  • Whenever you change the ngrok link you must follow the same routine.

rctwebrtcdemo2's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.