Commit 81deca1c authored by Ben's avatar Ben
Browse files

Update for feedback

parent 4a5a557d
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -29,7 +29,6 @@
    <i *ngIf="!playerRef.isPlaying() && !playerRef.isLoading()"
    <i *ngIf="!playerRef.isPlaying() && !playerRef.isLoading()"
      class="material-icons minds-video-play-icon"
      class="material-icons minds-video-play-icon"
      (click)="playerRef.play()"
      (click)="playerRef.play()"
      #playButton
    >play_circle_outline</i>
    >play_circle_outline</i>


    <ng-content></ng-content>
    <ng-content></ng-content>
+2 −3
Original line number Original line Diff line number Diff line
@@ -27,12 +27,11 @@ export class MindsVideoComponent {


  @ViewChild('progressBar', { static: false }) progressBar: MindsVideoProgressBar;
  @ViewChild('progressBar', { static: false }) progressBar: MindsVideoProgressBar;
  @ViewChild('volumeSlider', { static: false }) volumeSlider: MindsVideoVolumeSlider;
  @ViewChild('volumeSlider', { static: false }) volumeSlider: MindsVideoVolumeSlider;
  @ViewChild('player', { static: false }) playerRef: MindsPlayerInterface;
  @ViewChild('player', { static: false }) playerRef: any;
  @ViewChild('playButton', { static: false }) playButton: ElementRef;


  @HostListener('window:scroll')
  @HostListener('window:scroll')
  checkScroll() {
  checkScroll() {
    if (!this.isInView(this.playButton.nativeElement) && this.playerRef.isPlaying()) {
    if (!this.isInView(this.playerRef.nativeElement) && this.playerRef.isPlaying()) {
      this.playerRef.pause();
      this.playerRef.pause();
    }
    }
  }
  }