Commit 81deca1c authored by Ben Hayward's avatar Ben Hayward

Update for feedback

1 merge request!446WIP: [Sprint/InterestingIguana](bug): Pause video when scrolled offscreen #1418
Pipeline #70798806 canceled with stages
in 1 minute and 11 seconds
......@@ -29,7 +29,6 @@
<i *ngIf="!playerRef.isPlaying() && !playerRef.isLoading()"
class="material-icons minds-video-play-icon"
(click)="playerRef.play()"
#playButton
>play_circle_outline</i>
<ng-content></ng-content>
......
......@@ -27,12 +27,11 @@ export class MindsVideoComponent {
@ViewChild('progressBar', { static: false }) progressBar: MindsVideoProgressBar;
@ViewChild('volumeSlider', { static: false }) volumeSlider: MindsVideoVolumeSlider;
@ViewChild('player', { static: false }) playerRef: MindsPlayerInterface;
@ViewChild('playButton', { static: false }) playButton: ElementRef;
@ViewChild('player', { static: false }) playerRef: any;
@HostListener('window:scroll')
checkScroll() {
if (!this.isInView(this.playButton.nativeElement) && this.playerRef.isPlaying()) {
if (!this.isInView(this.playerRef.nativeElement) && this.playerRef.isPlaying()) {
this.playerRef.pause();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment