chaimPaneth / react-native-jw-media-player

React-Native Android/iOS bridge for JWPlayer SDK (https://www.jwplayer.com/)
MIT License
190 stars 91 forks source link

JWPlayer onComplete method calling multiple times after finishing video iOS #353

Open RohanMaliBW opened 3 months ago

RohanMaliBW commented 3 months ago

Hi Team, Regarding the iPhone iOS version less than 17, we are having trouble with the JWPlayer onComplete function.

after the video has finished, it calls the JWPlayer onComplete function several times. Following the completion of the video, we call the API in accordance with the onComplete callback method's requirement. However, because the onComplete function calls itself again, our feature is experiencing problems. Has anyone encountered this problem and found a solution?

Additionally, the video player's user interface keeps blinking after the video ends

here is my code:

<JWPlayer style={styles.player} config={config} ref={jwPlayer} onTime={event => onTime(event, videoObj)} onPlay={() => onPlay(videoObj)} onPause={() => onPause(videoObj)} onPlayerReady={() => onReady(videoObj)} onPlaylistItem={onPlaylistItem} onSeek={onSeek} onSeeked={onSeeked} onComplete={() => onComplete(videoObj)} onPlayerError={() => onError(videoObj)} onFullScreenRequested={onFullScreenRequested} onFullScreenExitRequested={onFullScreenExitRequested} />

Thank you