This library based react-native-pili Add Stream based LFLiveKit
Only Support iOS
Run npm install --save react-native-video-stream
-
Add RCTLFLiveKit.xcodeproj to Libraries
-
Your project Click
-
Go to General -> Embedded Binaries and add LFLiveKit.framework
-
Linked Frameworks and Libraries add LFLiveKit.framework
-
info.plist add
<key>NSCameraUsageDescription</key>
<string>cameraDesciption</string>
<key>NSContactsUsageDescription</key>
<string>contactsDesciption</string>
<key>NSMicrophoneUsageDescription</key>
<string>microphoneDesciption</string>
- libRCTLFLiveKit.a add to Build phase
<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
/>
- React-Native 0.40.0+ ( Thanks @alex-mcleod )
MIT