moust / cordova-plugin-videoplayer

A Codova plugin to play video with the native MediaPlayer on Android devices.
MIT License
139 stars 103 forks source link

Ionic 3 - Playing same video 2nd time breaks when attempting to close it #47

Closed tonyawad88 closed 6 years ago

tonyawad88 commented 6 years ago

Hello,

When playing a video for the first time, everything works great. when calling .close() function the video closes great. 2nd time around, the .play() is called the same way as the first time. The video plays fine for the second time. Now when trying to close it before the video ends, the app fatally crash.

Any idea why? Thank you!

tonyawad88 commented 6 years ago

For those running into this problem, when the "completed" event gets fired, make sure you close the video in the "completed" event to clear that instance so that if you have another video they don't both play.

@moust Feel free to close if you think it's irrelevant or maybe we can add a note to the documentation.

Cheers.

moust commented 6 years ago

Thank you, I will add a "troubleshooting" section in readme file.