react-native-vlc-player

A <VLCPlayer> component for react-native

Based on react-native-vlcplayer from xiongchuan86 and on react-native-vlc-player from ghondar

Add it to your project

Run npm i -S https://github.com/kikill95/react-native-vlc-player.git

iOS

Android

Usage

<VLCPlayer
    ref='vlcplayer'
    paused={this.state.paused}
    style={styles.vlcplayer}
    source={{uri: this.props.uri, initOptions: ['--codec=avcodec']}}
    onVLCProgress={this.onProgress.bind(this)}
    onVLCEnded={this.onEnded.bind(this)}
    onVLCStopped={this.onEnded.bind(this)}
    onVLCPlaying={this.onPlaying.bind(this)}
    onVLCBuffering={this.onBuffering.bind(this)}
    onVLCPaused={this.onPaused.bind(this)}
 />

Properties

source.initOptions - only for iOS rate - only for iOS snapshotPath - only for iOS

Callbacks

onBuffering - only for iOS

Static Methods

seek(seconds)

this.refs['vlcplayer'].seek(0.333);

snapshot(path)

this.refs['vlcplayer'].snapshot(path);