react-native-vlc-media-player icon indicating copy to clipboard operation
react-native-vlc-media-player copied to clipboard

onPlaying callback is not working

Open hemantzarkar opened this issue 2 years ago • 3 comments

I am using this library to play RTSP video streams on my mobile application. My VLC Player component code is given below,

<VlCPlayerView autoplay={true} url={this.state.obj.videoUrl} showGG={false} showTitle={false} showBack={false} showControls={true} onPlaying={() => { console.log('VLC Playing....... '); this.startTimer(this.state.obj.startDateTime, this.state.obj.endDateTime); }} onEnd={() => { console.log('VLC End '); this.playNextVideo(); }} />

I want to start the timer when the video starts playing. For that, I added an onPlaying callback to the component, and I have written the log in that callback method, but when I checked the app on mobile this log is not printing in my terminal.

I want an event from VLCPlayerView when the video started playing to run my timer function. So, please help me to solve this issue.

Thanks and Regards

hemantzarkar avatar Oct 14 '22 12:10 hemantzarkar

none of the callbacks are working for me, do other callbacks work for you? like onBuffering, onPaused, onEnded

endrits079 avatar Nov 09 '22 20:11 endrits079

seems like developer just forgot some his code commented out... i think you need the patch the library a little bit for the events... which is i am trying to do atm :)

Bayramito avatar Jan 15 '23 09:01 Bayramito