Giter Site home page Giter Site logo

prabakarviji / opentok-react-native Goto Github PK

View Code? Open in Web Editor NEW
36.0 4.0 20.0 5.01 MB

React Native live video streaming demo app using Open-Tok

Home Page: https://medium.com/spritle-software/build-a-simple-video-streaming-app-with-opentok-react-native-1c966c5af915

JavaScript 55.44% Java 8.49% Ruby 3.19% Objective-C 23.63% Starlark 9.25%
react-native opentok android ios react video-streaming livestream

opentok-react-native's Introduction

React Native - Open Tok Example

A simple React Native app using openTok to perform live audio-video streaming. This example includes both Publisher and Subscriber component.

Open Tok

OpenTok is video platform tool from TokBox community to easily integrate high-quality video,audio streaming with your web or mobile apps.

OpenTok uses WebRTC technology for audio,video communications. OpenTok supports web,iOS,android and windows apps.

To run this example,

  • Clone this repo git clone

  • git clone [email protected]:prabakarviji/OpenTok_RN.git

  • cd openTok_RN

  • run npm install or yarn install

  • Link open-tok library by react-native link react-native-opentok

    For iOS

    • cd ios then install open-tok pod by pod install
    • Open TokBot.xcworkspace in XCode and run it.

Usage

Publisher Component

<Publisher
    sessionId={sessionId}
    mute={this.state.isAudioMute}
    onPublishStart={() => { console.log('Streaming Started')}}
    onPublishStop={() => { console.log('Streaming Stopped')}}
    onPublishError={() => { console.log('Streaming Error')}}
    style={{backgroundColor: 'black',height:height, width: width,  }}
    ref={ref => {
      this.ref = ref;
    }}
/>

Subscriber Component

<Subscriber
    sessionId={sessionId}
    onSubscribeStart={() => { console.log('Watching started')}}
    onSubscribeStop={() => { console.log('Watching started')}
    onSubscribeError={() => { console.log('Watching started')}
    style={{backgroundColor: 'black',height:height, width: width,  }}
    ref={ref => {
      this.ref = ref;
    }}
/>

Thanks to CallStack community for this wonderful React Native Open-Tok wrapper

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.