Open jojorb opened 7 years ago
well, now i'm doing this to get the job done ...
<button *ngIf='audioTrack.hasLoaded != audioTrack.isPlaying' ion-button color="victory" icon-only clear (click)="audioTrack.canPlay ? audioTrack.play() : next()">
<ion-icon name="play"></ion-icon>
</button>
i don't know if there is a better solution here
You could use !audioTrack.isPlaying
for the play button
<button *ngIf="!audioTrack.isPlaying" ion-button color="victory" icon-only clear (click)="audioTrack.canPlay ? audioTrack.play() : next()">
<ion-icon name="play"></ion-icon>
</button>
Does that work?
Hi, thanks for this module, It's more an Angular question i supposed but, i was trying to build a toggle Play/Pause btn with *ngIf like so:
The pause btn is ok and working (displayed only when track is playing), but for the Play btn (i just want it to be display when the track is on pause)
*ngIf="audioTrack.pause"
with this .pause the btn is display everytime and not only when the track is only on pause.Have you guys got an idea about that, thanks!
*edit: fix the .pause and question