import * as i0 from '@angular/core';
import { Component, ChangeDetectionStrategy, NgModule } from '@angular/core';
import { VideoPlayerBaseComponent } from '@ironsource/fusion-ui/components/video-player/common/base';
import * as i1 from '@angular/common';
import { CommonModule } from '@angular/common';
import * as i2 from '@ironsource/fusion-ui/components/icon/v1';
import { IconModule } from '@ironsource/fusion-ui/components/icon/v1';
import * as i3 from '@ironsource/fusion-ui/pipes/numbers';
import { SecondsToMinutesPipe } from '@ironsource/fusion-ui/pipes/numbers';
import { VIDEO_PLAYER_OPTIONS_DEFUALT_VALUE } from '@ironsource/fusion-ui/components/video-player/common/entities';
import { SVG_OPTIONS_TOKEN } from '@ironsource/fusion-ui/components/svg';

function VideoPlayerComponent_div_1_ng_container_3_fusion_icon_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "fusion-icon", 15);
} if (rf & 2) {
    const ctx_r8 = i0.ɵɵnextContext(3);
    i0.ɵɵproperty("name", ctx_r8.playIconName);
} }
function VideoPlayerComponent_div_1_ng_container_3_fusion_icon_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "fusion-icon", 16);
} if (rf & 2) {
    const ctx_r9 = i0.ɵɵnextContext(3);
    i0.ɵɵproperty("name", ctx_r9.pauseIconName);
} }
function VideoPlayerComponent_div_1_ng_container_3_ng_container_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0);
} }
function VideoPlayerComponent_div_1_ng_container_3_Template(rf, ctx) { if (rf & 1) {
    const _r12 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "div", 9);
    i0.ɵɵlistener("click", function VideoPlayerComponent_div_1_ng_container_3_Template_div_click_1_listener($event) { i0.ɵɵrestoreView(_r12); i0.ɵɵnextContext(); const _r4 = i0.ɵɵreference(2); const ctx_r11 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r11.onVideoPlayPauseButtonClicked($event, _r4)); });
    i0.ɵɵtemplate(2, VideoPlayerComponent_div_1_ng_container_3_fusion_icon_2_Template, 1, 1, "fusion-icon", 10);
    i0.ɵɵpipe(3, "async");
    i0.ɵɵtemplate(4, VideoPlayerComponent_div_1_ng_container_3_fusion_icon_4_Template, 1, 1, "fusion-icon", 11);
    i0.ɵɵpipe(5, "async");
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerStart(6);
    i0.ɵɵelementStart(7, "div", 12);
    i0.ɵɵelement(8, "fusion-icon", 13);
    i0.ɵɵtemplate(9, VideoPlayerComponent_div_1_ng_container_3_ng_container_9_Template, 1, 0, "ng-container", 14);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd()();
} if (rf & 2) {
    const ctx_r5 = i0.ɵɵnextContext(2);
    const _r3 = i0.ɵɵreference(4);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(3, 4, ctx_r5.isVideoPlaying$) === false);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(5, 6, ctx_r5.isVideoPlaying$) === true);
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("name", ctx_r5.videoCameraIconName);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngTemplateOutlet", _r3);
} }
const _c0 = () => ({ iconName: "controls-play", iconVersion: "v1" });
function VideoPlayerComponent_div_1_ng_template_4_fusion_icon_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "fusion-icon", 25);
} if (rf & 2) {
    i0.ɵɵproperty("name", i0.ɵɵpureFunction0(1, _c0));
} }
const _c1 = () => ({ iconName: "controls-pause", iconVersion: "v1" });
function VideoPlayerComponent_div_1_ng_template_4_fusion_icon_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "fusion-icon", 26);
} if (rf & 2) {
    i0.ɵɵproperty("name", i0.ɵɵpureFunction0(1, _c1));
} }
function VideoPlayerComponent_div_1_ng_template_4_ng_container_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0);
} }
function VideoPlayerComponent_div_1_ng_template_4_Template(rf, ctx) { if (rf & 1) {
    const _r18 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 17)(1, "div", 18)(2, "div", 19);
    i0.ɵɵlistener("click", function VideoPlayerComponent_div_1_ng_template_4_Template_div_click_2_listener($event) { i0.ɵɵrestoreView(_r18); i0.ɵɵnextContext(); const _r4 = i0.ɵɵreference(2); const ctx_r17 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r17.onVideoPlayPauseButtonClicked($event, _r4)); });
    i0.ɵɵtemplate(3, VideoPlayerComponent_div_1_ng_template_4_fusion_icon_3_Template, 1, 2, "fusion-icon", 20);
    i0.ɵɵpipe(4, "async");
    i0.ɵɵtemplate(5, VideoPlayerComponent_div_1_ng_template_4_fusion_icon_5_Template, 1, 2, "fusion-icon", 21);
    i0.ɵɵpipe(6, "async");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(7, "progress", 22, 23);
    i0.ɵɵpipe(9, "async");
    i0.ɵɵelementStart(10, "div", 24);
    i0.ɵɵtemplate(11, VideoPlayerComponent_div_1_ng_template_4_ng_container_11_Template, 1, 0, "ng-container", 14);
    i0.ɵɵelementEnd()()();
} if (rf & 2) {
    const ctx_r6 = i0.ɵɵnextContext(2);
    const _r3 = i0.ɵɵreference(4);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(4, 4, ctx_r6.isVideoPlaying$) === false);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(6, 6, ctx_r6.isVideoPlaying$) === true);
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate("value", i0.ɵɵpipeBind1(9, 8, ctx_r6.progressValue$));
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("ngTemplateOutlet", _r3);
} }
function VideoPlayerComponent_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 4);
    i0.ɵɵelement(1, "video", 5, 6);
    i0.ɵɵtemplate(3, VideoPlayerComponent_div_1_ng_container_3_Template, 10, 8, "ng-container", 7)(4, VideoPlayerComponent_div_1_ng_template_4_Template, 12, 10, "ng-template", null, 8, i0.ɵɵtemplateRefExtractor);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const _r7 = i0.ɵɵreference(5);
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵstyleProp("width", ctx_r0.width)("height", ctx_r0.height);
    i0.ɵɵproperty("src", ctx_r0.src, i0.ɵɵsanitizeUrl)("poster", ctx_r0.thumbnail, i0.ɵɵsanitizeUrl);
    i0.ɵɵattribute("autoplay", ctx_r0.isAutoplay)("controls", null);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", !ctx_r0.isTimeline)("ngIfElse", _r7);
} }
function VideoPlayerComponent_div_2_fusion_icon_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "fusion-icon", 30);
} if (rf & 2) {
    const ctx_r19 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("name", ctx_r19.options.noVideo.icon);
} }
function VideoPlayerComponent_div_2_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r20 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance();
    i0.ɵɵtextInterpolate(ctx_r20.options.noVideo.title);
} }
function VideoPlayerComponent_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 27);
    i0.ɵɵtemplate(1, VideoPlayerComponent_div_2_fusion_icon_1_Template, 1, 1, "fusion-icon", 28)(2, VideoPlayerComponent_div_2_div_2_Template, 2, 1, "div", 29);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r1.options.noVideo == null ? null : ctx_r1.options.noVideo.icon);
    i0.ɵɵadvance();
    i0.ɵɵproperty("ngIf", ctx_r1.options.noVideo == null ? null : ctx_r1.options.noVideo.title);
} }
function VideoPlayerComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 31);
    i0.ɵɵpipe(1, "async");
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "secondsToMinutes");
    i0.ɵɵpipe(4, "async");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "span", 31);
    i0.ɵɵpipe(6, "async");
    i0.ɵɵtext(7);
    i0.ɵɵpipe(8, "secondsToMinutes");
    i0.ɵɵpipe(9, "async");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵproperty("hidden", i0.ɵɵpipeBind1(1, 4, ctx_r2.isVideoPlaying$) === false);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 6, i0.ɵɵpipeBind1(4, 8, ctx_r2.videoCurrentTime$)));
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("hidden", i0.ɵɵpipeBind1(6, 10, ctx_r2.isVideoPlaying$) === true);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(8, 12, i0.ɵɵpipeBind1(9, 14, ctx_r2.videoDuration$)));
} }
const _c2 = a0 => ({ "no-data": a0 });
class VideoPlayerComponent extends VideoPlayerBaseComponent {
    constructor() {
        super(...arguments);
        this.playIconName = { iconName: 'play-video-2', iconVersion: 'v2' };
        this.pauseIconName = { iconName: 'pause-video-2', iconVersion: 'v2' };
        this.videoCameraIconName = { iconName: 'video-camera_2', iconVersion: 'v2' };
    }
    static { this.ɵfac = /*@__PURE__*/ (() => { let ɵVideoPlayerComponent_BaseFactory; return function VideoPlayerComponent_Factory(t) { return (ɵVideoPlayerComponent_BaseFactory || (ɵVideoPlayerComponent_BaseFactory = i0.ɵɵgetInheritedFactory(VideoPlayerComponent)))(t || VideoPlayerComponent); }; })(); }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: VideoPlayerComponent, selectors: [["fusion-video-player"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 5, vars: 9, consts: [[1, "fusion-video-preview", 3, "ngClass"], ["class", "is-video-exists", 4, "ngIf"], ["class", "is-no-video", 4, "ngIf"], ["videoTimeData", ""], [1, "is-video-exists"], ["preload", "metadata", 3, "src", "poster"], ["videoPlayer", ""], [4, "ngIf", "ngIfElse"], ["videoControls", ""], [1, "is-video-action-button", 3, "click"], ["class", "button-play", 3, "name", 4, "ngIf"], ["class", "button-pause", 3, "name", 4, "ngIf"], [1, "is-video-duration-holder"], [1, "icon-video-camera", 3, "name"], [4, "ngTemplateOutlet"], [1, "button-play", 3, "name"], [1, "button-pause", 3, "name"], [1, "vide-controls-overlay"], [1, "video-controls-holder"], [1, "control-play-pause", 3, "click"], ["class", "control-button-play", 3, "name", 4, "ngIf"], ["class", "control-button-pause", 3, "name", 4, "ngIf"], ["min", "0", "max", "100", 3, "value"], ["progressBar", ""], [1, "control-timer"], [1, "control-button-play", 3, "name"], [1, "control-button-pause", 3, "name"], [1, "is-no-video"], ["class", "fu-icon-no-video", 3, "name", 4, "ngIf"], [4, "ngIf"], [1, "fu-icon-no-video", 3, "name"], [1, "video-timing", 3, "hidden"]], template: function VideoPlayerComponent_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "div", 0);
            i0.ɵɵtemplate(1, VideoPlayerComponent_div_1_Template, 6, 10, "div", 1)(2, VideoPlayerComponent_div_2_Template, 3, 2, "div", 2);
            i0.ɵɵelementEnd();
            i0.ɵɵtemplate(3, VideoPlayerComponent_ng_template_3_Template, 10, 16, "ng-template", null, 3, i0.ɵɵtemplateRefExtractor);
        } if (rf & 2) {
            i0.ɵɵstyleProp("width", ctx.width)("height", ctx.height);
            i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c2, !ctx.src));
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", ctx.src);
            i0.ɵɵadvance();
            i0.ɵɵproperty("ngIf", !ctx.src);
        } }, dependencies: [i1.NgClass, i1.NgIf, i1.NgTemplateOutlet, i2.IconComponent, i1.AsyncPipe, i3.SecondsToMinutesPipe], styles: ["[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   .video-timing[_ngcontent-%COMP%]{font-size:11px;font-family:HelveticaNeue,helvetica,sans-serif;font-weight:400}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]{border-radius:var(--player-border-radius, 4px);position:relative;background-color:var(--player-background-color, #25282c);overflow:hidden}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%], [_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-no-video[_ngcontent-%COMP%]{color:var(--player-foreground-color, var(--fu-white, #ffffff));width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   fusion-icon.fu-icon-no-video[_ngcontent-%COMP%], [_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-no-video[_ngcontent-%COMP%]   fusion-icon.fu-icon-no-video[_ngcontent-%COMP%]{width:20%;height:20%;margin-bottom:2%}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   fusion-icon.fu-icon-no-video[_ngcontent-%COMP%]     svg, [_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-no-video[_ngcontent-%COMP%]   fusion-icon.fu-icon-no-video[_ngcontent-%COMP%]     svg{width:100%;height:100%}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   fusion-icon.fu-icon-no-video[_ngcontent-%COMP%]     svg *, [_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-no-video[_ngcontent-%COMP%]   fusion-icon.fu-icon-no-video[_ngcontent-%COMP%]     svg *{fill:currentColor}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   video[_ngcontent-%COMP%]{border-radius:var(--player-border-radius, 4px)}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   .is-video-action-button[_ngcontent-%COMP%]{position:absolute;z-index:1001;width:16%;top:34%;left:42%;cursor:pointer}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   .is-video-action-button[_ngcontent-%COMP%]   fusion-icon.button-play[_ngcontent-%COMP%]     svg{width:100%;height:100%}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   .is-video-action-button[_ngcontent-%COMP%]   fusion-icon.button-play[_ngcontent-%COMP%]     svg *{fill:var(--fu-white, #ffffff)}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   .is-video-action-button[_ngcontent-%COMP%]   fusion-icon.button-pause[_ngcontent-%COMP%]{opacity:0}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   .is-video-action-button[_ngcontent-%COMP%]   fusion-icon.button-pause[_ngcontent-%COMP%]     svg{width:100%;height:100%}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   .is-video-action-button[_ngcontent-%COMP%]   fusion-icon.button-pause[_ngcontent-%COMP%]     svg *{fill:var(--fu-white, #ffffff)}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]:hover   .is-video-action-button[_ngcontent-%COMP%]   fusion-icon.button-pause[_ngcontent-%COMP%]{opacity:1}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]:hover   .is-video-action-button[_ngcontent-%COMP%]   fusion-icon.button-pause[_ngcontent-%COMP%]     svg{width:100%;height:100%}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]:hover   .is-video-action-button[_ngcontent-%COMP%]   fusion-icon.button-pause[_ngcontent-%COMP%]     svg *{fill:var(--fu-white, #ffffff)}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   .is-video-duration-holder[_ngcontent-%COMP%]{position:absolute;bottom:6px;left:10px}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   .is-video-duration-holder[_ngcontent-%COMP%]   fusion-icon.icon-video-camera[_ngcontent-%COMP%]{margin-right:5px}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   .is-video-duration-holder[_ngcontent-%COMP%]   fusion-icon.icon-video-camera[_ngcontent-%COMP%]     svg *{fill:var(--fu-white, #ffffff)}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   .video-timing[_ngcontent-%COMP%]{color:var(--fu-white, #ffffff)}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   .vide-controls-overlay[_ngcontent-%COMP%]{position:absolute;left:0;right:0;bottom:0;height:32px;border-radius:4px;background-image:linear-gradient(to bottom,rgba(0,0,0,0),#000000)}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   .video-controls-holder[_ngcontent-%COMP%]{position:absolute;bottom:6px;left:10px;right:10px;display:flex;align-items:center}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   .video-controls-holder[_ngcontent-%COMP%]   .control-play-pause[_ngcontent-%COMP%]{padding-top:2px}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   .video-controls-holder[_ngcontent-%COMP%]   .control-play-pause[_ngcontent-%COMP%]   .control-button-play[_ngcontent-%COMP%]:hover, [_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   .video-controls-holder[_ngcontent-%COMP%]   .control-play-pause[_ngcontent-%COMP%]   .control-button-pause[_ngcontent-%COMP%]:hover{cursor:pointer}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   .video-controls-holder[_ngcontent-%COMP%]   .control-play-pause[_ngcontent-%COMP%]   fusion-icon.control-button-play[_ngcontent-%COMP%]     svg *{fill:var(--fu-white, #ffffff)}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   .video-controls-holder[_ngcontent-%COMP%]   .control-play-pause[_ngcontent-%COMP%]   fusion-icon.control-button-pause[_ngcontent-%COMP%]     svg *{fill:var(--fu-white, #ffffff)}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   .video-controls-holder[_ngcontent-%COMP%]   progress[value][_ngcontent-%COMP%]{appearance:none;border:none;height:4px;margin-left:5px;margin-right:5px;width:calc(100% - 45px)}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   .video-controls-holder[_ngcontent-%COMP%]   progress[value][_ngcontent-%COMP%]::-webkit-progress-bar{border-radius:2px;background-color:#fff3}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   .video-controls-holder[_ngcontent-%COMP%]   progress[value][_ngcontent-%COMP%]::-webkit-progress-value{border-radius:2px;background-color:var(--fu-primary-500, #3083ff)}[_nghost-%COMP%]   .fusion-video-preview[_ngcontent-%COMP%]   .is-video-exists[_ngcontent-%COMP%]   .video-controls-holder[_ngcontent-%COMP%]   progress[value][_ngcontent-%COMP%]::-moz-progress-bar{color:var(--fu-primary-500, #3083ff);background-color:#fff3}"], changeDetection: 0 }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(VideoPlayerComponent, [{
        type: Component,
        args: [{ selector: 'fusion-video-player', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n    class=\"fusion-video-preview\"\n    [style.width]=\"width\"\n    [style.height]=\"height\"\n    [ngClass]=\"{'no-data': !src}\"\n>\n    <div *ngIf=\"src\" class=\"is-video-exists\">\n        <video\n            preload=\"metadata\"\n            [attr.autoplay]=\"isAutoplay\"\n            [attr.controls]=\"null\"\n            [style.width]=\"width\"\n            [style.height]=\"height\"\n            [src]=\"src\"\n            [poster]=\"thumbnail\"\n            #videoPlayer\n        ></video>\n        <ng-container *ngIf=\"!isTimeline; else videoControls\">\n            <div class=\"is-video-action-button\" (click)=\"onVideoPlayPauseButtonClicked($event, videoPlayer)\">\n                <fusion-icon class=\"button-play\" [name]=\"playIconName\" *ngIf=\"(isVideoPlaying$ | async) === false\"></fusion-icon>\n                <fusion-icon class=\"button-pause\" [name]=\"pauseIconName\" *ngIf=\"(isVideoPlaying$ | async) === true\"></fusion-icon>\n            </div>\n            <ng-container>\n                <div class=\"is-video-duration-holder\">\n                    <fusion-icon class=\"icon-video-camera\" [name]=\"videoCameraIconName\"></fusion-icon>\n                    <ng-container *ngTemplateOutlet=\"videoTimeData\"></ng-container>\n                </div>\n            </ng-container>\n        </ng-container>\n        <ng-template #videoControls>\n            <div class=\"vide-controls-overlay\">\n                <div class=\"video-controls-holder\">\n                    <div class=\"control-play-pause\" (click)=\"onVideoPlayPauseButtonClicked($event, videoPlayer)\">\n                        <fusion-icon class=\"control-button-play\" [name]=\"{iconName: 'controls-play', iconVersion: 'v1'}\" *ngIf=\"(isVideoPlaying$ | async) === false\"></fusion-icon>\n                        <fusion-icon class=\"control-button-pause\" [name]=\"{iconName: 'controls-pause', iconVersion: 'v1'}\" *ngIf=\"(isVideoPlaying$ | async) === true\"></fusion-icon>\n                    </div>\n                    <progress min=\"0\" max=\"100\" value=\"{{ progressValue$ | async }}\" #progressBar></progress>\n                    <div class=\"control-timer\"><ng-container *ngTemplateOutlet=\"videoTimeData\"></ng-container></div>\n                </div>\n            </div>\n        </ng-template>\n    </div>\n\n    <div *ngIf=\"!src\" class=\"is-no-video\">\n        <fusion-icon class=\"fu-icon-no-video\" *ngIf=\"options.noVideo?.icon\" [name]=\"options.noVideo.icon\"></fusion-icon>\n        <div *ngIf=\"options.noVideo?.title\">{{ options.noVideo.title }}</div>\n    </div>\n</div>\n<ng-template #videoTimeData>\n    <span class=\"video-timing\" [hidden]=\"(isVideoPlaying$ | async) === false\">{{ videoCurrentTime$ | async | secondsToMinutes }}</span>\n    <span class=\"video-timing\" [hidden]=\"(isVideoPlaying$ | async) === true\">{{ videoDuration$ | async | secondsToMinutes }}</span>\n</ng-template>\n", styles: [":host .fusion-video-preview .is-video-exists .video-timing{font-size:11px;font-family:HelveticaNeue,helvetica,sans-serif;font-weight:400}:host .fusion-video-preview{border-radius:var(--player-border-radius, 4px);position:relative;background-color:var(--player-background-color, #25282c);overflow:hidden}:host .fusion-video-preview .is-video-exists,:host .fusion-video-preview .is-no-video{color:var(--player-foreground-color, var(--fu-white, #ffffff));width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}:host .fusion-video-preview .is-video-exists fusion-icon.fu-icon-no-video,:host .fusion-video-preview .is-no-video fusion-icon.fu-icon-no-video{width:20%;height:20%;margin-bottom:2%}:host .fusion-video-preview .is-video-exists fusion-icon.fu-icon-no-video ::ng-deep svg,:host .fusion-video-preview .is-no-video fusion-icon.fu-icon-no-video ::ng-deep svg{width:100%;height:100%}:host .fusion-video-preview .is-video-exists fusion-icon.fu-icon-no-video ::ng-deep svg *,:host .fusion-video-preview .is-no-video fusion-icon.fu-icon-no-video ::ng-deep svg *{fill:currentColor}:host .fusion-video-preview .is-video-exists video{border-radius:var(--player-border-radius, 4px)}:host .fusion-video-preview .is-video-exists .is-video-action-button{position:absolute;z-index:1001;width:16%;top:34%;left:42%;cursor:pointer}:host .fusion-video-preview .is-video-exists .is-video-action-button fusion-icon.button-play ::ng-deep svg{width:100%;height:100%}:host .fusion-video-preview .is-video-exists .is-video-action-button fusion-icon.button-play ::ng-deep svg *{fill:var(--fu-white, #ffffff)}:host .fusion-video-preview .is-video-exists .is-video-action-button fusion-icon.button-pause{opacity:0}:host .fusion-video-preview .is-video-exists .is-video-action-button fusion-icon.button-pause ::ng-deep svg{width:100%;height:100%}:host .fusion-video-preview .is-video-exists .is-video-action-button fusion-icon.button-pause ::ng-deep svg *{fill:var(--fu-white, #ffffff)}:host .fusion-video-preview .is-video-exists:hover .is-video-action-button fusion-icon.button-pause{opacity:1}:host .fusion-video-preview .is-video-exists:hover .is-video-action-button fusion-icon.button-pause ::ng-deep svg{width:100%;height:100%}:host .fusion-video-preview .is-video-exists:hover .is-video-action-button fusion-icon.button-pause ::ng-deep svg *{fill:var(--fu-white, #ffffff)}:host .fusion-video-preview .is-video-exists .is-video-duration-holder{position:absolute;bottom:6px;left:10px}:host .fusion-video-preview .is-video-exists .is-video-duration-holder fusion-icon.icon-video-camera{margin-right:5px}:host .fusion-video-preview .is-video-exists .is-video-duration-holder fusion-icon.icon-video-camera ::ng-deep svg *{fill:var(--fu-white, #ffffff)}:host .fusion-video-preview .is-video-exists .video-timing{color:var(--fu-white, #ffffff)}:host .fusion-video-preview .is-video-exists .vide-controls-overlay{position:absolute;left:0;right:0;bottom:0;height:32px;border-radius:4px;background-image:linear-gradient(to bottom,rgba(0,0,0,0),#000000)}:host .fusion-video-preview .is-video-exists .video-controls-holder{position:absolute;bottom:6px;left:10px;right:10px;display:flex;align-items:center}:host .fusion-video-preview .is-video-exists .video-controls-holder .control-play-pause{padding-top:2px}:host .fusion-video-preview .is-video-exists .video-controls-holder .control-play-pause .control-button-play:hover,:host .fusion-video-preview .is-video-exists .video-controls-holder .control-play-pause .control-button-pause:hover{cursor:pointer}:host .fusion-video-preview .is-video-exists .video-controls-holder .control-play-pause fusion-icon.control-button-play ::ng-deep svg *{fill:var(--fu-white, #ffffff)}:host .fusion-video-preview .is-video-exists .video-controls-holder .control-play-pause fusion-icon.control-button-pause ::ng-deep svg *{fill:var(--fu-white, #ffffff)}:host .fusion-video-preview .is-video-exists .video-controls-holder progress[value]{appearance:none;border:none;height:4px;margin-left:5px;margin-right:5px;width:calc(100% - 45px)}:host .fusion-video-preview .is-video-exists .video-controls-holder progress[value]::-webkit-progress-bar{border-radius:2px;background-color:#fff3}:host .fusion-video-preview .is-video-exists .video-controls-holder progress[value]::-webkit-progress-value{border-radius:2px;background-color:var(--fu-primary-500, #3083ff)}:host .fusion-video-preview .is-video-exists .video-controls-holder progress[value]::-moz-progress-bar{color:var(--fu-primary-500, #3083ff);background-color:#fff3}\n"] }]
    }], null, null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(VideoPlayerComponent, { className: "VideoPlayerComponent", filePath: "video-player.component.ts", lineNumber: 10 }); })();

class VideoPlayerModule {
    static forRoot(options) {
        return {
            ngModule: VideoPlayerModule,
            providers: [
                {
                    provide: SVG_OPTIONS_TOKEN,
                    useValue: options ? options.svgOptions : VIDEO_PLAYER_OPTIONS_DEFUALT_VALUE.svgOptions
                }
            ]
        };
    }
    static { this.ɵfac = function VideoPlayerModule_Factory(t) { return new (t || VideoPlayerModule)(); }; }
    static { this.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: VideoPlayerModule }); }
    static { this.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule, IconModule] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(VideoPlayerModule, [{
        type: NgModule,
        args: [{
                declarations: [VideoPlayerComponent],
                exports: [VideoPlayerComponent],
                imports: [CommonModule, IconModule, SecondsToMinutesPipe]
            }]
    }], null, null); })();
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(VideoPlayerModule, { declarations: [VideoPlayerComponent], imports: [CommonModule, IconModule, SecondsToMinutesPipe], exports: [VideoPlayerComponent] }); })();

/**
 * Generated bundle index. Do not edit.
 */

export { VideoPlayerComponent, VideoPlayerModule };
//# sourceMappingURL=ironsource-fusion-ui-components-video-player-v2.mjs.map
