Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

play pause #184

Open
walid-deutscher opened this issue Feb 28, 2018 · 3 comments
Open

play pause #184

walid-deutscher opened this issue Feb 28, 2018 · 3 comments

Comments

@walid-deutscher
Copy link

<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

@walid-deutscher
Copy link
Author

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

@walid-deutscher
Copy link
Author

walid-deutscher commented Feb 28, 2018

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':

@jayzyaj
Copy link

jayzyaj commented Jul 2, 2018

How can I post all of the tracks playing at the same time? @walid-deutscher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants