Coder Social home page Coder Social logo

baconcheese113 / react-native-webrtc-minimal Goto Github PK

View Code? Open in Web Editor NEW
123.0 5.0 48.0 723 KB

The simplest local-only implementation of react-native-webrtc possible.

JavaScript 34.56% Java 34.04% Ruby 4.28% Objective-C 22.96% Starlark 3.12% Swift 0.50% C 0.54%

react-native-webrtc-minimal's Introduction

react-native-webrtc-minimal

The most basic local-only implementation of react-native-webrtc possible.

  • Start/Stop video call.
  • Switch Video source before and during calls
  • Mute/Unmute audio
  • Uses functional components and React Native 0.63+
  • Uses Hermes instead of the full Javascript engine

Usage

  • Clone the repository, run npm install.
  • For Android, connect your phone run npm run android in the directory.
  • For iOS, consult a doctor, cd ios && pod install, and finally npm run ios. Note that iOS simulator doesn't support camera
  • Profit

Next Steps

  • This repo is purposefully built for simple local-only calls. Not to demonstrate multiple devices, signalling servers, Janus integrations, etc... But you can start here to understand the basics of react-native-webrtc. For more advanced things, try searching the posts in the official discourse group

react-native-webrtc-minimal's People

Contributors

baconcheese113 avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

react-native-webrtc-minimal's Issues

I'm getting this SDP and I do not understand why ```c=IN IP4 0.0.0.0```

v=0 
o=- 4708170454232118631 2 IN IP4 127.0.0.1 
s=- 
t=0 0 
a=group:BUNDLE audio 
a=msid-semantic: WMS d219263d-0879-4f03-ab2d-ff5ca38cc5b2 
m=audio 9 UDP/TLS/RTP/SAVPF 111 103 9 102 0 8 105 13 110 113 126 
c=IN IP4 0.0.0.0 
a=rtcp:9 IN IP4 0.0.0.0 
a=ice-ufrag:h8qw 
a=ice-pwd:U7mupuybP6FoaoGM7Xno6Xs+ 
a=ice-options:trickle renomination 
a=fingerprint:sha-256 83:78:8D:F9:48:29:4C:81:61:03:33:7B:35:65:54:5B:6E:40:96:42:21:F9:7C:48:77:5F:66:40:C4:FE:50:77 
a=setup:actpass 
a=mid:audio 
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level 
a=extmap:2 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01 
a=sendrecv 
a=rtcp-mux 
a=rtpmap:111 opus/48000/2 
a=rtcp-fb:111 transport-cc 
a=fmtp:111 minptime=10;useinbandfec=1 
a=rtpmap:103 ISAC/16000 
a=rtpmap:9 G722/8000 
a=rtpmap:102 ILBC/8000 
a=rtpmap:0 PCMU/8000 
a=rtpmap:8 PCMA/8000 
a=rtpmap:105 CN/16000 
a=rtpmap:13 CN/8000 
a=rtpmap:110 telephone-event/48000 
a=rtpmap:113 telephone-event/16000 
a=rtpmap:126 telephone-event/8000 
a=ssrc:2690420977 cname:NXn+u4qCFKmISaRZ 
a=ssrc:2690420977 msid:d219263d-0879-4f03-ab2d-ff5ca38cc5b2 35fb31c6-dc11-482d-8118-88200b70ba92 
a=ssrc:2690420977 mslabel:d219263d-0879-4f03-ab2d-ff5ca38cc5b2 
a=ssrc:2690420977 label:35fb31c6-dc11-482d-8118-88200b70ba92

I can see you just through the ice candidates in the call back from the local/remote peer connection respectivelyam I right? or am I understanding something very wrong?
what would you @baconcheese113 do if you wanted to get this to work with SDP properly? (between two platforms)

Could not build on Windows

I just read your answer here and wanted to try it out but could not get your project to build.

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
(node:10868) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
Jetifier found 877 file(s) to forward-jetify. Using 16 workers...
info Starting JS server...
info Installing the app...

FAILURE: Build failed with an exception.

* What went wrong:
Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* What went wrong:
Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s

    at checkExecSyncError (child_process.js:611:11)
    at execFileSync (child_process.js:629:15)
    at runOnAllDevices (C:\Users\cfriedlander\Documents\react-native-webrtc-minimal\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
    at buildAndRun (C:\Users\cfriedlander\Documents\react-native-webrtc-minimal\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
    at C:\Users\cfriedlander\Documents\react-native-webrtc-minimal\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Command.handleAction (C:\Users\cfriedlander\Documents\react-native-webrtc-minimal\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:164:9)

TypeError: null is not an object

When I press the click to start stream it is saying type error null is not an object. I think the app might not get the camera permission.
here is an error log.

[Mon Apr 06 2020 12:04:41.462]  WARN     Possible Unhandled Promise Rejection (id: 12):
TypeError: null is not an object (evaluating 'WebRTCModule.enumerateDevices')

How to use it with live server.

Hi, i'm new to react native, can someone please guide me how to use this with live server and just like phone calls, right now at what i am speaking in mic is being listen in speaker. it should work like real calls, how to achieve that?

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.