arielfaur / ionic-audio

An audio player for Ionic 3 and Angular 4. Works with HTML 5 audio or native audio using Cordova Media plugin.
http://arielfaur.github.io/ionic-audio/2.0/index.html
MIT License
321 stars 163 forks source link

Reset isFinished flags to false to ensure onFinish emit fires more than once #138

Open yoojene opened 7 years ago

yoojene commented 7 years ago

Hi @arielfaur, I found that when a track was played to completion a second time after the component loaded, that the onFinish emit event never fired.

This PR resets the_isFinished and _audioTrack.isFinished to false allowed the event to execute each time without a component reload.