Giter Club home page Giter Club logo

react-native-mux-stream's Introduction

React-Native-Mux-Stream

A live video streaming app created with React Native and Mux.

Full tutorial is available at: http://pusher.com/tutorials/video-streaming-app-mux-react-native

Prerequisites

Getting Started

  1. Clone the repo:
git clone https://github.com/anchetaWern/React-Native-Mux-Stream.git
cd RNStream
  1. Install the app dependencies:
yarn
  1. Eject the project (re-creates the ios and android folders):
react-native eject
  1. Link the packages:
react-native link @react-native-community/async-storage
react-native link @react-native-community/netinfo
react-native link react-native-config
react-native link react-native-gesture-handler
react-native link react-native-nodemediaclient
react-native link react-native-permissions
react-native link react-native-video
  1. Put additional config on android/app/build.gradle file:
apply plugin: "com.android.application"
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle" // add this

And android/build.gradle file:

allprojects {
  repositories {
    mavenLocal()
    google()
    jcenter()
    maven {
      url "$rootDir/../node_modules/react-native/android"
    }

    // add this:
    maven {
      url 'https://jitpack.io'
    }
  }
}
  1. Add permissions to android/app/src/main/AndroidManifest.xml file:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.rnstreamer">

  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

  <!-- add the following -->
  <uses-feature android:name="android.hardware.camera"/>
  <uses-feature android:name="android.hardware.camera.autofocus"/>

  <uses-permission android:name="android.permission.CAMERA"/>
  <uses-permission android:name="android.permission.RECORD_AUDIO"/>
  <!-- end -->

  <application>
    ...
  </application>
</manifest>
  1. Update the .env file with your Mux and Channels app credentials, and the server/.env file with your Channels app credentials.

  2. Set up the server:

cd server
yarn
  1. Run the server:
yarn start
  1. Run ngrok:
./ngrok http 5000
  1. Update the src/screens/Index.js file with your ngrok HTTPS URL.

  2. Run the app:

react-native run-android
react-native run-ios

Built With

Donation

If this project helped you reduce time to develop, please consider buying me a cup of coffee :)

Buy Me A Coffee

react-native-mux-stream's People

Contributors

anchetawern avatar

Stargazers

 avatar

Watchers

James Cloos 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.