xuyuanzhou / react-native-yz-vlcplayer

VLC Player for react-native
MIT License
152 stars 53 forks source link

How to use VlcPlayerViewByMerhod functions #15

Closed harrischelsea closed 6 years ago

harrischelsea commented 6 years ago

How can I use functions like onPlaying, onOpen...? How can I pause video on loading, or not autoplay?

I use this code, and rtsp live stream:


<VlCPlayerViewByMethod
               ref={ ref => this.vlCPlayerView = ref}
               onVipPress={this._onVipPress.bind(this)}
               autoPlay={true}
               url={"rtmp://live.hkstv.hk.lxdns.com/live/hks"}
               onLeftPress={() => {
               }}
               onProgressChange={this._onProgressChange}
               //title={title}              
               //showTitle={true}
               //showBack={true}
               //lookTime={timeStudied}
               //totalTime={timeTotal}
               //useVip={!hadOwn}
               onEnd={this._onEnd}
               Orientation={Orientation}
               BackHandle={BackHandle}
               //autoPlayNext={false}
               //autoRePlay={false}
               //hadNext={false}
               showAd={true}
               adUrl="http://bxyzweb.doctorz.cn/ofafilm/03.swf"             
               //chapterElements={this._renderList()}
               onStartFullScreen={() => {
                 this.setState({
                   isFull: true,
                 });
               }}
               onCloseFullScreen={() => {
                 this.setState({
                   isFull: false,
                 });
               }}
            />

Could you provide some examples?

xuyuanzhou commented 6 years ago

https://github.com/xuyuanzhou/vlcplayerExample

harrischelsea commented 6 years ago

xuyuanzhou, thank you.