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

feat(Events): Add onLoaded and onError output events on audio-track component #115

Closed proustibat closed 1 year ago

proustibat commented 7 years ago

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>
proustibat commented 7 years ago

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.