Open walid-deutscher opened 6 years ago
it ok now <audio-track #audio *ngFor="let track of myTracks" # (click)="clickr()" [track]="track" (onFinish)="onTrackFinished($event)">
play(){ this._audioProvider.play(0); } pause(){ this._audioProvider.pause(0); } clickr(){ if(this.mod=="1"){ this.settingMusicControl(); this.musicControls.listen(); this.mod="0" ; } else{ this.musicControls.updateIsPlaying(false); this.mod="1" ; }
i use id 0
because i use just one audoi in my projectect
case 'music-controls-pause': // Do something console.log('music pause'); this.pause() ; this.musicControls.listen(); this.musicControls.updateIsPlaying(false); break; case 'music-controls-play': // Do something this.play(); console.log('music play');
this.musicControls.listen();
this.musicControls.updateIsPlaying(true);
break;
case 'music-controls-destroy':
How can I post all of the tracks playing at the same time? @walid-deutscher
<audio-track #audio *ngFor="let track of myTracks" [track]="track" (onFinish)="onTrackFinished($event)" (onPlay)="onPlay($event)" (onPAuse)="onPAuse($event)">
i want add music control to with event play pause but not work how can i add