tkuanlun350 / react-native-video-stream

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native-video-stream

NPM Version

Info

This library based react-native-pili Add Stream based LFLiveKit

Only Support iOS

Add it to your project

Run npm install --save react-native-video-stream

iOS

  1. Add RCTLFLiveKit.xcodeproj to Libraries

  2. Your project Click

  3. Go to General -> Embedded Binaries and add LFLiveKit.framework

  4. Linked Frameworks and Libraries add LFLiveKit.framework

  5. info.plist add

  <key>NSCameraUsageDescription</key>
  <string>cameraDesciption</string>
  
  <key>NSContactsUsageDescription</key>
  <string>contactsDesciption</string>
  
  <key>NSMicrophoneUsageDescription</key>
  <string>microphoneDesciption</string>
  1. libRCTLFLiveKit.a add to Build phase

Usage

    <Stream
        started={false} // start your stream
        cameraFronted={true} // camera front or back
        url="rtmp://xxx" // your rtmp publish url
        landscape={false} // landscape mode
        onReady={() => {}} // streaming ready
        onPending={() => {}} // streaming ready to start
        onStart={() => {}} // streaming start
        onError={() => {}} // straming error
        onStop={() => {}} // streaming stop
        />

Updates

  • React-Native 0.40.0+ ( Thanks @alex-mcleod )

License

MIT

About

License:MIT License


Languages

Language:Objective-C 61.1%Language:Java 19.9%Language:Objective-C++ 7.8%Language:C++ 4.9%Language:GLSL 4.7%Language:JavaScript 1.5%