react-native-vlc2

3.0.9-rc.1 • Public • Published

react-native-vlc2

iOS is not supported yet

import React, { Component } from 'react';
import VLCVideo from 'react-native-vlc2';

class Player extends Component {
    play() {
        this.refs.video && this.refs.video.play();
    }

    pause() {
        this.refs.video && this.refs.video.pause();
    }

    seek(time) {
        this.refs.video && this.refs.video.seek(time);
    }

    render() {
        return (
            <VLCVideo
                ref={'video'}
                style={{ flex: 1 }}
                sourceUrl={'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4'}
                autoplay={true}
                startTime={0}
            //   onSeekRequested={this.onSeekRequested}
            //   onBuffering={this.onBuffering}
            //   onPlaying={this.onPlaying}
            //   onPaused={this.onPaused}
            //   onEndReached={this.onEndReached}
            //   onError={this.onError}
            //   onTimeChanged={this.onTimeChanged}
            //   onSeekPerformed={this.onSeekPerformed}
            />
        );
    }
}

Readme

Keywords

none

Package Sidebar

Install

npm i react-native-vlc2

Weekly Downloads

2

Version

3.0.9-rc.1

License

MIT

Unpacked Size

37.6 kB

Total Files

14

Last publish

Collaborators

  • nklhrstv