import { Component, Input, OnInit, ContentChildren, QueryList, ElementRef, forwardRef, Renderer2, Output, EventEmitter} from '@angular/core'; import GLOBAL_STRINGS from 'accessible-html5-video-player/js/strings.js' import * as InitPxVideo from 'accessible-html5-video-player/js/px-video.js'; declare var InitPxVideo: any; // NOTE: Add px-video.js and strings.js files to your application .angular-cli.json script tag interface InitPxVideoConfig { "videoId": string, "captionsOnDefault": boolean, "seekInterval": number, "videoTitle": string, "debug": boolean } @Component({ selector: 'sam-video-player', templateUrl: './video-player.template.html', host: { '(document:fullscreenchange)': 'onToggleFullScreen($event)' } }) export class SamVideoPlayerComponent { @ContentChildren('videoPly', {descendants: true}) public videos: QueryList; @ContentChildren('videoTrack', {descendants: true}) public tracks: QueryList; @ContentChildren('videoSrc', {descendants: true}) public sources: QueryList; @Input() public videoId: string; @Input() public title: string; @Input() public captionOption: boolean; @Input() public seekInterval: number; @Output() public onFullScreenChange: EventEmitter = new EventEmitter(); private config: InitPxVideoConfig; constructor(private render: Renderer2, private template:ElementRef) {} ngAfterContentInit() { this.validateElement(this.videos, 'SamVideoComponent must be provide a