react-native-vlc-media-player
react-native-vlc-media-player copied to clipboard
onPlaying callback is not working
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
none of the callbacks are working for me, do other callbacks work for you? like onBuffering, onPaused, onEnded
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 :)