ionic-audio
ionic-audio copied to clipboard
feat(Events): Add onLoaded and onError output events on audio-track component
Based on the onFinish event, it works on the same way. I needed to do something like that:
<audio-track #audio *ngIf="myOnlyTrack" [track]="myOnlyTrack" (onLoaded)="onTrackLoaded($event)">
<ion-item>
<ion-thumbnail item-left>
<audio-track-play dark [audioTrack]="audio"><ion-spinner></ion-spinner></audio-track-play>
</ion-thumbnail>
</ion-item>
</audio-track>
I think I fixed another bug:
fix(Stop): Fix stop method error and add toggleStop method Calling stop method caused error because it was not implemented in a class. Also added a toggleStop method to be called, useful when using streaming adress because user doesn't want to be paused.