nstudio / nativescript-audio

:microphone: NativeScript plugin to record and play audio :musical_note:
Other
149 stars 104 forks source link

Android: Allow the track to be replayed #185

Closed StevenGBrown closed 3 years ago

StevenGBrown commented 3 years ago

When the track completes, abandon the audio focus but don't release the media player. This allows the track to be played again by calling seekTo(0) and play(), like you can when running the plugin with iOS.

Previously trying to call methods such as seekTo or play after the track completed resulted in {"player":{},"error":-38,"extra":0}. The only way to play the track a second time was to call the init method again.