@edm-webplayer/webplayer-angular 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/edm-webplayer-webplayer-angular.mjs +2422 -347
- package/fesm2022/edm-webplayer-webplayer-angular.mjs.map +1 -1
- package/global.service.d.ts +10 -0
- package/package.json +1 -1
- package/player-loader/player-loader.component.d.ts +10 -5
- package/players/panda-player/panda-player.component.d.ts +5 -2
- package/players/plyr-player/plyr-player.component.d.ts +75 -2
- package/players/scaleup-player/scaleup-player.component.d.ts +12 -2
- package/players/vimeo-player/vimeo-player.component.d.ts +49 -0
- package/webplayer.types.d.ts +11 -3
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class GlobalLoadingService {
|
|
3
|
+
private document;
|
|
4
|
+
private loadingElement;
|
|
5
|
+
constructor(document: Document);
|
|
6
|
+
hide(): void;
|
|
7
|
+
show(): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GlobalLoadingService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<GlobalLoadingService>;
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { WebplayerConfig } from "../webplayer.types";
|
|
2
|
+
import { GlobalLoadingService } from "../global.service";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class PlayerLoaderComponent
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export declare class PlayerLoaderComponent {
|
|
5
|
+
private defaultConfig;
|
|
6
|
+
private globalLoading;
|
|
7
|
+
config: WebplayerConfig | any;
|
|
8
|
+
playerType: "plyr" | "panda" | "scaleup" | null;
|
|
9
|
+
constructor(defaultConfig: WebplayerConfig, globalLoading: GlobalLoadingService);
|
|
10
|
+
private getPlayerType;
|
|
11
|
+
onPlayerReady(): void;
|
|
7
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<PlayerLoaderComponent, never>;
|
|
8
13
|
static ɵcmp: i0.ɵɵComponentDeclaration<PlayerLoaderComponent, "app-player-loader", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
|
|
9
14
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElementRef, OnDestroy, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { ElementRef, OnDestroy, OnInit, OnChanges, SimpleChanges, EventEmitter } from '@angular/core';
|
|
2
2
|
import { WebplayerConfig } from '../../webplayer.types';
|
|
3
3
|
import { WebplayerProgressService } from '../../progress.service';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
@@ -12,6 +12,7 @@ export declare class PandaPlayerComponent implements OnInit, OnDestroy, OnChange
|
|
|
12
12
|
private elementRef;
|
|
13
13
|
private progressService;
|
|
14
14
|
config: WebplayerConfig;
|
|
15
|
+
ready: EventEmitter<void>;
|
|
15
16
|
private pandaPlayer?;
|
|
16
17
|
private pandaContainer?;
|
|
17
18
|
private pandaProgressThrottle;
|
|
@@ -28,6 +29,8 @@ export declare class PandaPlayerComponent implements OnInit, OnDestroy, OnChange
|
|
|
28
29
|
private extractPandaLibraryId;
|
|
29
30
|
private handlePandaEvent;
|
|
30
31
|
private resolveStartTime;
|
|
32
|
+
private safeProgressSnapshot;
|
|
33
|
+
private notifyParentPlaybackEvent;
|
|
31
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<PandaPlayerComponent, never>;
|
|
32
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PandaPlayerComponent, "app-panda-player", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PandaPlayerComponent, "app-panda-player", never, { "config": { "alias": "config"; "required": false; }; }, { "ready": "ready"; }, never, never, true, never>;
|
|
33
36
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AfterViewInit, ElementRef, OnChanges, OnDestroy, OnInit, SimpleChanges } from "@angular/core";
|
|
1
|
+
import { AfterViewInit, ElementRef, OnChanges, OnDestroy, OnInit, SimpleChanges, EventEmitter } from "@angular/core";
|
|
2
2
|
import "plyr/dist/plyr.css";
|
|
3
3
|
import { WebplayerConfig } from "../../webplayer.types";
|
|
4
4
|
import { WebplayerProgressService } from "../../progress.service";
|
|
@@ -6,22 +6,95 @@ import * as i0 from "@angular/core";
|
|
|
6
6
|
export declare class PlyrPlayerComponent implements AfterViewInit, OnDestroy, OnChanges, OnInit {
|
|
7
7
|
private progressService;
|
|
8
8
|
private document;
|
|
9
|
+
get isLiveMode(): boolean;
|
|
9
10
|
videoRef: ElementRef<HTMLVideoElement>;
|
|
10
11
|
config: WebplayerConfig;
|
|
12
|
+
ready: EventEmitter<void>;
|
|
11
13
|
private plyr;
|
|
12
14
|
private hls?;
|
|
15
|
+
private controlsVisibilityCleanup?;
|
|
16
|
+
private recommendationBlocker?;
|
|
17
|
+
private recommendationBlockerActiveZone?;
|
|
18
|
+
private topClickBlocker?;
|
|
19
|
+
private menuObserver?;
|
|
20
|
+
private playbackEnded;
|
|
21
|
+
private overlayBlockAll;
|
|
22
|
+
private endedPosterOverlay?;
|
|
23
|
+
private interactionUnmuteCleanup?;
|
|
24
|
+
private endedLoggedOnPause;
|
|
25
|
+
private liveInteractionBlocker?;
|
|
26
|
+
private iosFullscreenCleanup?;
|
|
27
|
+
private pendingStartTime?;
|
|
28
|
+
private readonly onResize;
|
|
29
|
+
private readonly onRecommendationBlockerClick;
|
|
30
|
+
private readonly onTopBlockerPointerDown;
|
|
31
|
+
private readonly onTopBlockerClick;
|
|
32
|
+
private readonly controlsSafeZonePxDesktop;
|
|
33
|
+
private readonly controlsSafeZonePxTouch;
|
|
34
|
+
private readonly overlayInteractionGapPx;
|
|
13
35
|
constructor(progressService: WebplayerProgressService, document: Document);
|
|
14
36
|
ngOnInit(): void;
|
|
37
|
+
private flushPendingStartTime;
|
|
38
|
+
private getControlsSafeZone;
|
|
39
|
+
private getOverlaySafeZone;
|
|
40
|
+
private getOpenMenuHeight;
|
|
15
41
|
ngAfterViewInit(): void;
|
|
16
42
|
ngOnChanges(changes: SimpleChanges): void;
|
|
17
43
|
private applyTheme;
|
|
44
|
+
private normalizeLocaleCandidate;
|
|
45
|
+
private resolveLocale;
|
|
46
|
+
private resolveCaptionsLanguage;
|
|
47
|
+
private getVideoWrapper;
|
|
48
|
+
private ensureRecommendationBlocker;
|
|
49
|
+
private toggleRecommendationBlocker;
|
|
50
|
+
private updateRecommendationBlockerSafeZone;
|
|
51
|
+
private ensureTopClickBlocker;
|
|
52
|
+
private updateTopClickBlockerSafeZone;
|
|
53
|
+
private observeMenuChanges;
|
|
54
|
+
private isIOSDevice;
|
|
55
|
+
private isIOSContext;
|
|
56
|
+
private isTouchDevice;
|
|
57
|
+
private applyInlineAttributes;
|
|
58
|
+
private bindIOSFullscreenLogging;
|
|
59
|
+
private removeIOSFullscreenLogging;
|
|
60
|
+
private isIframeProvider;
|
|
61
|
+
private shouldDisableAutoplayForIOS;
|
|
62
|
+
private shouldResetProgressToBeginning;
|
|
63
|
+
private shouldEmitEndedOnPause;
|
|
64
|
+
private hasReachedEndThreshold;
|
|
65
|
+
private forceLivePlaybackResume;
|
|
66
|
+
private updateLiveInteractionBlocker;
|
|
67
|
+
private detachLiveInteractionBlocker;
|
|
68
|
+
private wantsAutoplay;
|
|
69
|
+
private shouldAutoplay;
|
|
70
|
+
private requiresMutedAutoplay;
|
|
71
|
+
private shouldBlockIframeAutoplay;
|
|
72
|
+
private stopRestrictedIframeAutoplay;
|
|
73
|
+
private setPlayerMutedState;
|
|
74
|
+
private temporarilyMuteForSeek;
|
|
75
|
+
private clearAutoplayUnlockListener;
|
|
76
|
+
private ensureAutoplayUnlockListener;
|
|
77
|
+
private ensureIframeAutoplayPermissions;
|
|
78
|
+
private scheduleUserInteractionUnmute;
|
|
79
|
+
private requestStartTimeSeek;
|
|
80
|
+
private deferUntilStartTimeSettles;
|
|
81
|
+
private retryPendingStartTime;
|
|
82
|
+
private applyStartTimeToCurrentSource;
|
|
83
|
+
private seekUsingHostAPI;
|
|
84
|
+
private startAutoplayFlow;
|
|
85
|
+
private forceIframeAutoplayFallback;
|
|
86
|
+
private setupControlsVisibility;
|
|
87
|
+
private bindFullscreenBehavior;
|
|
18
88
|
private setupPlayer;
|
|
19
89
|
private setupStartTime;
|
|
20
90
|
private bindProgressEvents;
|
|
21
91
|
private unmuteAfterDelay;
|
|
92
|
+
private resetPlaybackRate;
|
|
22
93
|
private loadSource;
|
|
23
94
|
private resolveStartTime;
|
|
95
|
+
private postCastEvent;
|
|
96
|
+
private onCastMessage;
|
|
24
97
|
ngOnDestroy(): void;
|
|
25
98
|
static ɵfac: i0.ɵɵFactoryDeclaration<PlyrPlayerComponent, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PlyrPlayerComponent, "app-plyr-player", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
|
|
99
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PlyrPlayerComponent, "app-plyr-player", never, { "config": { "alias": "config"; "required": false; }; }, { "ready": "ready"; }, never, never, true, never>;
|
|
27
100
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElementRef, OnDestroy, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
1
|
+
import { ElementRef, OnDestroy, OnInit, OnChanges, SimpleChanges, EventEmitter } from '@angular/core';
|
|
2
2
|
import { WebplayerConfig } from '../../webplayer.types';
|
|
3
3
|
import { WebplayerProgressService } from '../../progress.service';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
@@ -6,14 +6,24 @@ export declare class ScaleupPlayerComponent implements OnInit, OnDestroy, OnChan
|
|
|
6
6
|
private elementRef;
|
|
7
7
|
private progressService;
|
|
8
8
|
config: WebplayerConfig;
|
|
9
|
+
ready: EventEmitter<void>;
|
|
9
10
|
private scaleupIframe?;
|
|
10
11
|
private scaleupMessageHandler?;
|
|
11
12
|
private scaleupProgressThrottle;
|
|
13
|
+
private castMessageHandler?;
|
|
14
|
+
private lastDuration;
|
|
15
|
+
private lastCurrentTime;
|
|
12
16
|
constructor(elementRef: ElementRef, progressService: WebplayerProgressService);
|
|
13
17
|
ngOnInit(): void;
|
|
14
18
|
ngOnChanges(changes: SimpleChanges): void;
|
|
15
19
|
private loadScaleupPlayer;
|
|
16
20
|
ngOnDestroy(): void;
|
|
21
|
+
private postCastProgress;
|
|
22
|
+
private sendScaleupCommand;
|
|
23
|
+
private ensureCastMessageHandler;
|
|
24
|
+
private resolveEventsList;
|
|
25
|
+
private isIOSDevice;
|
|
26
|
+
private isIOSContext;
|
|
17
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<ScaleupPlayerComponent, never>;
|
|
18
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ScaleupPlayerComponent, "app-scaleup-player", never, { "config": { "alias": "config"; "required": false; }; }, {}, never, never, true, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ScaleupPlayerComponent, "app-scaleup-player", never, { "config": { "alias": "config"; "required": false; }; }, { "ready": "ready"; }, never, never, true, never>;
|
|
19
29
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { AfterViewInit, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
+
import 'plyr/dist/plyr.css';
|
|
3
|
+
import { WebplayerConfig } from '../../webplayer.types';
|
|
4
|
+
import { WebplayerProgressService } from '../../progress.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class VimeoPlayerComponent implements OnInit, AfterViewInit, OnDestroy, OnChanges {
|
|
7
|
+
private progressService;
|
|
8
|
+
private document;
|
|
9
|
+
config: WebplayerConfig;
|
|
10
|
+
ready: EventEmitter<void>;
|
|
11
|
+
videoRef: ElementRef<HTMLVideoElement>;
|
|
12
|
+
private plyr?;
|
|
13
|
+
private startTimeApplied;
|
|
14
|
+
private pendingStartTime?;
|
|
15
|
+
private endedLoggedOnPause;
|
|
16
|
+
private iosFullscreenCleanup?;
|
|
17
|
+
private castListenerAttached;
|
|
18
|
+
private unmuteForCast;
|
|
19
|
+
private readonly onCastMessage;
|
|
20
|
+
endedOverlayVisible: boolean;
|
|
21
|
+
constructor(progressService: WebplayerProgressService, document: Document);
|
|
22
|
+
ngOnInit(): void;
|
|
23
|
+
ngAfterViewInit(): void;
|
|
24
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
25
|
+
private setupPlayer;
|
|
26
|
+
private bindEvents;
|
|
27
|
+
private resolveStartTime;
|
|
28
|
+
private shouldResetProgressToBeginning;
|
|
29
|
+
private isIOSDevice;
|
|
30
|
+
private applySavedStartTime;
|
|
31
|
+
ngOnDestroy(): void;
|
|
32
|
+
private postCastEvent;
|
|
33
|
+
private applyTheme;
|
|
34
|
+
private seekTo;
|
|
35
|
+
private tryApplyPendingStartTime;
|
|
36
|
+
private jumpToPendingStartTime;
|
|
37
|
+
private resumeAfterPendingSeek;
|
|
38
|
+
private shouldEmitEndedOnPause;
|
|
39
|
+
private handleEnded;
|
|
40
|
+
private isIOSContext;
|
|
41
|
+
private temporarilyMuteForSeek;
|
|
42
|
+
private applyInlineAttributes;
|
|
43
|
+
private bindIOSFullscreenLogging;
|
|
44
|
+
private removeIOSFullscreenLogging;
|
|
45
|
+
private ensureCastMessageListener;
|
|
46
|
+
private unlockPlayerInteraction;
|
|
47
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<VimeoPlayerComponent, never>;
|
|
48
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<VimeoPlayerComponent, "app-vimeo-player", never, { "config": { "alias": "config"; "required": false; }; }, { "ready": "ready"; }, never, never, true, never>;
|
|
49
|
+
}
|
package/webplayer.types.d.ts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
2
|
export interface WebplayerConfig {
|
|
3
3
|
video_host: 'youtube' | 'vimeo' | 'mp4' | 'hls' | 'panda' | 'scaleup';
|
|
4
|
-
video_id: string;
|
|
5
|
-
library_id?: number | null;
|
|
4
|
+
video_id: string | null;
|
|
5
|
+
library_id?: string | number | null;
|
|
6
6
|
video_external_id?: string | null;
|
|
7
|
+
video_locale?: string | null;
|
|
8
|
+
video_language?: string | null;
|
|
9
|
+
captions_locale?: string | null;
|
|
10
|
+
captions_language?: string | null;
|
|
7
11
|
last_time?: number | null;
|
|
8
12
|
last_percent?: number;
|
|
9
13
|
embed?: string | null;
|
|
@@ -11,7 +15,11 @@ export interface WebplayerConfig {
|
|
|
11
15
|
progress_url?: string;
|
|
12
16
|
is_live?: boolean;
|
|
13
17
|
mirror?: boolean;
|
|
14
|
-
|
|
18
|
+
autoplay?: boolean;
|
|
19
|
+
locale?: string | null;
|
|
20
|
+
language?: string | null;
|
|
21
|
+
disable_vimeo_recommendations?: boolean;
|
|
22
|
+
vimeo_premium?: boolean;
|
|
15
23
|
ui?: {
|
|
16
24
|
colors?: {
|
|
17
25
|
bg?: string;
|