Closed bradrice closed 4 years ago
Why don’t you just use (plyrCanPlay)=“yourfunc($event)”?
That looks cool. How do I make the player play using that? this.target.play() doesn't work.
(plyrCanPlay)="myfunc($event)" never fires. What do I need to do?
I stere a way to show and hide the ngx-plyr component based upon some variable? I have an hasAudio boolean that I am using and when I do I get errors when I try to start the audio on plyrCanPlay.
<div *ngIf="hasAudio" mat-card-image plyr plyrTitle="Audio" plyrType="audio" [plyrPlaysInline]="true" [plyrCrossOrigin]="false" [plyrSources]="audioSources"></div>
this.playSub = this.plyr.plyrCanPlay.subscribe((data)=> { console.log('Ready to play'); this.play(); });
ERROR TypeError: Cannot read property 'plyrCanPlay' of undefined