A <RtspPlayer>
component for react-native
using ffmpeg,convert yuv to rgb for uiimage
Run npm install react-native-rtspplayer --save
- Install rnpm and run
rnpm link react-native-rtspplayer
<RtspPlayer
ref='player'
paused={this.state.paused}
style={[styles.vlcplayer,this.state.customStyle]}
source={{uri:this.props.uri,useTcp:true,width:playerDefaultWidth,height:210}}
/>
snapshot(path)
this.refs['rtspplayer'].snapshot(path); //保存截图
npm install
rnpm link
- 同时需要安装
ART
参考https://github.com/oblador/react-native-vector-icons
可以根据自己的情况使用下面的例子,自己DIY播放器
<SimpleVideo />
一个简单的播放器
- Add support for Android
- Add support for snapshot
MIT Licensed