wonday / react-native-live-stream Goto Github PK
View Code? Open in Web Editor NEWa react-native module for live stream play and publish
License: MIT License
a react-native module for live stream play and publish
License: MIT License
Hello,
I just want to play an rtsp feed, so I installed your plugin with : npm i react-native-live-stream
and react-native link react-native-live-stream
. Only for Android at the moment.
But I have a problem:
Invariant Violation: Invariant Violation: requireNativeComponent:
RCTLivePlayer" was not found in the UIManager.
This error is located at:
in RCTLivePlayer (at LivePlayer.js:59)
in LivePlayer (at CameraView.js:405)
...
Do you have any idea ?
Thank you so much.
I'm getting this error while building the iOS project with react-native-live-stream.
duplicate symbol _md5_block_data_order in:
/Users/yehancha/Documents/musing-mobile/node_modules/react-native-live-stream/ios/libs/NodeMediaClient.framework/NodeMediaClient(md5_dgst.o)
/Users/yehancha/Library/Developer/Xcode/DerivedData/musing-enzttvuorxmrncgxytndapfqbokv/Build/Products/Debug-iphoneos/BoringSSL-GRPC/libBoringSSL-GRPC.a(md5.o)
ld: 1 duplicate symbol for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What can I do to resolve this issue?
Hi. I have followed all the steps and it gives me the following error in iOS.
error Could not find the following native modules: RCTLiveStream. Did you forget to run "pod install" ?
Regards.
where do I enter the password and user for a video stream?
android dependency NodeMedia,as i konw,this sdk need authrized. how do you deal this. and just player,no publisher?
Information at https://www.npmjs.com/package/react-native-live-stream is wrong.
onLoading
, onLoad
, onProgress
methods do not working on audio streaming.
I follow the steps to install ,and 'React/RCTViewManager.h' file not found
the readme says drag "react-native-aliyun-push" etc into xcode however its not in this npm modules dependency.
please clearify the readme or add react-native-aliyun-push into the dependency.
and i believe the after installation instruction should show some screenshots.
I'am created new project with react-native init
, after I'm installed react-native-live-stream and linked it, and when I try to run I get this error
FULL Error
Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
Could not find com.github.NodeMedia:NodeMediaClient-Android:2.4.4.
Searched in the following locations:
- file:/home/garik/.m2/repository/com/github/NodeMedia/NodeMediaClient-Android/2.4.4/NodeMediaClient-Android-2.4.4.pom
- file:/home/garik/.m2/repository/com/github/NodeMedia/NodeMediaClient-Android/2.4.4/NodeMediaClient-Android-2.4.4.jar
- file:/home/garik/projects/reactNative/react-native-live-stream/aa/node_modules/react-native/android/com/github/NodeMedia/NodeMediaClient-Android/2.4.4/NodeMediaClient-Android-2.4.4.pom
- file:/home/garik/projects/reactNative/react-native-live-stream/aa/node_modules/react-native/android/com/github/NodeMedia/NodeMediaClient-Android/2.4.4/NodeMediaClient-Android-2.4.4.jar
- file:/home/garik/projects/reactNative/react-native-live-stream/aa/node_modules/jsc-android/dist/com/github/NodeMedia/NodeMediaClient-Android/2.4.4/NodeMediaClient-Android-2.4.4.pom
- file:/home/garik/projects/reactNative/react-native-live-stream/aa/node_modules/jsc-android/dist/com/github/NodeMedia/NodeMediaClient-Android/2.4.4/NodeMediaClient-Android-2.4.4.jar
- https://dl.google.com/dl/android/maven2/com/github/NodeMedia/NodeMediaClient-Android/2.4.4/NodeMediaClient-Android-2.4.4.pom
- https://dl.google.com/dl/android/maven2/com/github/NodeMedia/NodeMediaClient-Android/2.4.4/NodeMediaClient-Android-2.4.4.jar
- https://jcenter.bintray.com/com/github/NodeMedia/NodeMediaClient-Android/2.4.4/NodeMediaClient-Android-2.4.4.pom
- https://jcenter.bintray.com/com/github/NodeMedia/NodeMediaClient-Android/2.4.4/NodeMediaClient-Android-2.4.4.jar
Required by:
project :app > project :react-native-live-stream
Hello!
I am having a problem getting this working with youtube ? Since it exposes a standard rtmp end point I thought it would work but its just sitting there.
<LivePlayer source={{uri:'rtmp://a.rtmp.youtube.com/live2/FOO-KEY'}} ref={(ref) => { this.player = ref }} style={livestyle.video} paused={false} muted={false} bufferTime={300} maxBufferTime={1000} resizeMode={"contain"} onLoading={()=>{ console.log('loading...')}} onLoad={()=>{ console.log('onLoad')}} onEnd={()=>{}} /> </View>
.
Please does this player support links like:
source={{uri:"rtsp://< user >:< password >@< ip cam > / < path-to-streaming-channel >"}}
When i exit My Live Tv Player Page Using The back key to go back to my main screen 90% of my screen is taken up by a black screen witch i presume is the live player woth no source
how can i stop this happening
npm not install . its give error like
npm ERR! A complete log of this run can be found in:
user/.npm/_logs/2020-04-29T11_11_21_418Z-debug.log
`import React, {Component} from 'react';
import {Text, View, Button, Image, StyleSheet, Platform, NetInfo, Alert} from 'react-native';
import allStyles from '../css/allStylesCSS.js';
import Menu from './Menu';
// import Video from 'react-native-video';
// import MediaControls, { PLAYER_STATES } from 'react-native-media-controls';
import {LivePlayer} from "react-native-live-stream";
export default class Camaras extends Component {
render() {
return (
<LivePlayer source={{uri:"rtmp://live.hkstv.hk.lxdns.com/live/hks"}}
ref={(ref) => {
this.player = ref
}}
style={styles.backgroundVideo}
paused={false}
muted={false}
bufferTime={300}
maxBufferTime={1000}
resizeMode={"contain"}
onLoading={()=>{}}
onLoad={()=>{}}
onEnd={()=>{}}
/>
);
}
}
const styles = StyleSheet.create({
backgroundVideo: {
position: 'absolute',
top: 0,
left: 0,
bottom: 0,
right: 0
},
container: {
flex: 1
},
toolbar: {
marginTop: 30,
backgroundColor: 'white',
padding: 10,
borderRadius: 5
},
mediaPlayer: {
position: 'absolute',
top: 0,
left: 0,
bottom: 0,
right: 0,
backgroundColor: 'black'
}
});
`
The app crashes only in production. In development it works perfectly. Follows detail of the error.
Exception class name
java.lang.NoSuchMethodError
Source class
cn.nodemedia.NodePlayer
Source method
jniInit
Stack trace
java.lang.NoSuchMethodError:
at cn.nodemedia.NodePlayer.jniInit (NodePlayer.java)
at cn.nodemedia.NodePlayer. (NodePlayer.java:3)
at org.wonday.live.RCTLivePlayerView. (RCTLivePlayerView.java:31)
at org.wonday.live.LivePlayerViewManager.createViewInstance (LivePlayerViewManager.java:2)
at org.wonday.live.LivePlayerViewManager.createViewInstance (LivePlayerViewManager.java)
at com.facebook.react.uimanager.ViewManager.createViewInstance (ViewManager.java)
at com.facebook.react.uimanager.ViewManager.createView (ViewManager.java)
at com.facebook.react.uimanager.NativeViewHierarchyManager.a (NativeViewHierarchyManager.java:34)
at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute (UIViewOperationQueue.java:23)
at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations (UIViewOperationQueue.java:58)
at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded (UIViewOperationQueue.java:23)
at com.facebook.react.uimanager.GuardedFrameCallback.doFrame (GuardedFrameCallback.java)
at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame (ReactChoreographer.java:46)
at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame (ChoreographerCompat.java:2)
at android.view.Choreographer$CallbackRecord.run (Choreographer.java:947)
at android.view.Choreographer.doCallbacks (Choreographer.java:761)
at android.view.Choreographer.doFrame (Choreographer.java:693)
at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:935)
at android.os.Handler.handleCallback (Handler.java:873)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loop (Looper.java:193)
at android.app.ActivityThread.main (ActivityThread.java:6923)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:870)
Hello, thanks for this project.
I'm could install it successfully but as soon as I try yo build it, I get RCTEventDispatcher.h' file not found
.
No sure what to do.
Thanks in advance.
Would this be usable with a server that exposes a live stream through POST requests?
I added console.log('LivePlayer',event)
under function _onchange in LivePlayer.js file,but there is nothing showed in Console
I want to start and stop recording a video from the stream (hls / m3u8 uri file) and save it on the phone. There is any possible way to do this? any suggestions?
IOS works perfectly.I added after installation all in readme.But in Android shows https url but rtsp shows black frame.What should I do?
import { LivePlayer } from "react-native-live-stream";
<LivePlayer
source={{
uri: "rtsp://admin:[email protected]:554"
}}
ref={ref => {
this.player = ref;
}}
style={{ width: "100%", height: "30%", borderWidth: 1 }}
paused={true}
muted={true}
bufferTime={300}
maxBufferTime={1000}
resizeMode={"contain"}
onLoading={() => console.log("LOADINGGGG")}
onLoad={() => console.log("LOADED")}
onEnd={() => {}}
/>
If it is possible, could you please share a code snippet or refer me to a documentation? @wonday
For reference I am trying to use it this way (it is stuck in a black screen):
<LivePlayer
source={{
uri: 'rtmp://a.rtmp.youtube.com/live2/{MY_STREAM_KEY}',
}}
ref={(ref) => {
this.player = ref;
}}
style={styles.liveStream}
paused={false}
muted={false}
bufferTime={300}
maxBufferTime={5000}
resizeMode={'contain'}
onLoading={() => {
console.log('\n\n\n loading... \n\n\n ');
}}
onLoad={() => {
console.log('\n\n\n onLoad \n\n\n');
}}
onEnd={() => {
console.log('\n\n\n onEnd \n\n\n');
}}
/>
PS. Even the logs do not work
While building for ios i receive
'React/RCTViewManager.h' file not found
#import <React/RCTViewManager.h>
Im using xcode 10.1 and react-native 0.60.4
Could not find method implementation() for arguments [directory 'libs'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
I am using the https url, but all I get is a black screen.
Am I doing something wrong?
thanks, dan
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.