boss-web-player-sdk 1.1.86 → 2.0.0
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/LICENSE +21 -21
- package/README.md +366 -373
- package/dist/boss-web-player-sdk.css +1 -1
- package/dist/chunks/{src-C9mlHhBC.cjs → src-B9W4IMGS.cjs} +1 -1
- package/dist/chunks/{src-D7thJlCy.js → src-QXXVFxiP.js} +3 -3
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +17 -24
- package/dist/core.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +29 -28
- package/dist/index.js +60 -66
- package/package.json +68 -73
package/dist/index.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ declare interface AnalyticsSessionSnapshot {
|
|
|
53
53
|
milestonesHit: string[];
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
export declare function BossVideoPlayer({ playerKey, src, subtitles, licenseKey, themeColor,
|
|
56
|
+
export declare function BossVideoPlayer({ playerKey, src, subtitles, licenseKey, themeColor, proxyDomains, apiBaseUrl, adTrackingUrl, overlayAdUrl, videoId: videoIdProp, title, artworkUrl, watermark, autoplay, muted, autoFullscreen, enableControls, enableSkipAd, skipAdAfterSeconds, chaptersDisplayMode, keyMoments: propKeyMoments, chapters: propChapters, keyMomentsTray, keyMomentsPosition, defaultKeyMomentsOpen, enableKeyMoments, onKeyMomentsToggle, volumeControlType, subtitleStyle, drmConfig, onAnalyticsEvent, delegate, onKeyMomentsLoaded, initialTime, onTimeUpdate, skipMarkers, introStartTime, introEndTime, hasNextEpisode, outroStartTime, nextEpisodeLabel, onNextEpisode, nextEpisodeAutoAdvanceSeconds, nextEpisodeThumbnailUrl, featureOverrides, enableQuality, enableSources, }: BossVideoPlayerProps): JSX.Element;
|
|
57
57
|
|
|
58
58
|
export declare interface BossVideoPlayerProps {
|
|
59
59
|
playerKey: string;
|
|
@@ -62,7 +62,6 @@ export declare interface BossVideoPlayerProps {
|
|
|
62
62
|
subtitles?: SubtitleTrack[];
|
|
63
63
|
licenseKey?: string;
|
|
64
64
|
themeColor?: string;
|
|
65
|
-
firebaseConfig?: FirebaseConfig;
|
|
66
65
|
proxyDomains?: string;
|
|
67
66
|
apiBaseUrl?: string;
|
|
68
67
|
adTrackingUrl?: string;
|
|
@@ -78,6 +77,13 @@ export declare interface BossVideoPlayerProps {
|
|
|
78
77
|
enableSkipAd?: boolean;
|
|
79
78
|
skipAdAfterSeconds?: number;
|
|
80
79
|
chaptersDisplayMode?: 'strip' | 'panel';
|
|
80
|
+
keyMoments?: KeyMoment[];
|
|
81
|
+
chapters?: Chapter[];
|
|
82
|
+
keyMomentsTray?: 'bottom' | 'right' | 'strip' | 'panel' | 'none' | boolean;
|
|
83
|
+
keyMomentsPosition?: 'bottom' | 'right';
|
|
84
|
+
defaultKeyMomentsOpen?: boolean;
|
|
85
|
+
enableKeyMoments?: boolean;
|
|
86
|
+
onKeyMomentsToggle?: (isOpen: boolean) => void;
|
|
81
87
|
volumeControlType?: 'slider' | 'button';
|
|
82
88
|
subtitleStyle?: SubtitleStyle;
|
|
83
89
|
drmConfig?: DRMConfig;
|
|
@@ -122,6 +128,8 @@ export declare interface Chapter {
|
|
|
122
128
|
startTime: number;
|
|
123
129
|
endTime: number;
|
|
124
130
|
thumbnail?: string;
|
|
131
|
+
thumbnailUrl?: string;
|
|
132
|
+
thumbnailCrop?: ThumbnailCrop;
|
|
125
133
|
description?: string;
|
|
126
134
|
}
|
|
127
135
|
|
|
@@ -165,30 +173,6 @@ export declare type FeatureFlags = {
|
|
|
165
173
|
ad_support: boolean;
|
|
166
174
|
};
|
|
167
175
|
|
|
168
|
-
export declare class FirebaseAnalyticsProvider {
|
|
169
|
-
private analytics;
|
|
170
|
-
private logEventFn;
|
|
171
|
-
private pendingEvents;
|
|
172
|
-
constructor(config: FirebaseConfig);
|
|
173
|
-
private init;
|
|
174
|
-
private flushPending;
|
|
175
|
-
createCallback(): AnalyticsCallback;
|
|
176
|
-
private handleEvent;
|
|
177
|
-
private logToFirebase;
|
|
178
|
-
private buildParams;
|
|
179
|
-
destroy(): Promise<void>;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
export declare interface FirebaseConfig {
|
|
183
|
-
apiKey: string;
|
|
184
|
-
authDomain: string;
|
|
185
|
-
projectId: string;
|
|
186
|
-
storageBucket: string;
|
|
187
|
-
messagingSenderId: string;
|
|
188
|
-
appId: string;
|
|
189
|
-
measurementId?: string;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
176
|
declare interface IAnalyticsModule {
|
|
193
177
|
getSessionSnapshot(): AnalyticsSessionSnapshot;
|
|
194
178
|
registerCallback(callback: AnalyticsCallback): void;
|
|
@@ -389,7 +373,6 @@ declare interface RemoteCastState {
|
|
|
389
373
|
export declare type SdkInitData = {
|
|
390
374
|
tenantId: string;
|
|
391
375
|
features: SdkInitFeatures;
|
|
392
|
-
planTier: string;
|
|
393
376
|
heartbeatIntervalSeconds?: number;
|
|
394
377
|
};
|
|
395
378
|
|
|
@@ -484,6 +467,13 @@ export declare interface ThumbnailConfig {
|
|
|
484
467
|
totalCount: number;
|
|
485
468
|
}
|
|
486
469
|
|
|
470
|
+
export declare interface ThumbnailCrop {
|
|
471
|
+
x: number;
|
|
472
|
+
y: number;
|
|
473
|
+
width: number;
|
|
474
|
+
height: number;
|
|
475
|
+
}
|
|
476
|
+
|
|
487
477
|
export declare class VideoPlayerSDK {
|
|
488
478
|
private options;
|
|
489
479
|
private videoElement;
|
|
@@ -518,6 +508,7 @@ export declare class VideoPlayerSDK {
|
|
|
518
508
|
private progressTick;
|
|
519
509
|
private hasFailed;
|
|
520
510
|
private mediaEventsAbort;
|
|
511
|
+
private keyMomentsGeneration;
|
|
521
512
|
private lastPlaybackPos;
|
|
522
513
|
private pendingSeekAttribution;
|
|
523
514
|
private eventListeners;
|
|
@@ -571,6 +562,13 @@ export declare class VideoPlayerSDK {
|
|
|
571
562
|
off(event: string, callback: (...args: any[]) => void): void;
|
|
572
563
|
private emit;
|
|
573
564
|
private extractSubtitlesFromManifest;
|
|
565
|
+
private findManifestThumbnailUri;
|
|
566
|
+
private parseThumbnailVtt;
|
|
567
|
+
private parseImageMediaPlaylist;
|
|
568
|
+
private bareThumbnailFilenameBesideVtt;
|
|
569
|
+
private resolveThumbnailCueBase;
|
|
570
|
+
private loadManifestThumbnailCues;
|
|
571
|
+
private thumbnailCueAtTime;
|
|
574
572
|
private extractKeyMomentsFromManifest;
|
|
575
573
|
hasAdBreakDiscoverySettled(): boolean;
|
|
576
574
|
private buildManifestUrl;
|
|
@@ -633,7 +631,6 @@ declare interface WebVideoPlayerProps {
|
|
|
633
631
|
watermark?: string;
|
|
634
632
|
themeColor?: string;
|
|
635
633
|
drmConfig?: any;
|
|
636
|
-
firebaseConfig?: FirebaseConfig;
|
|
637
634
|
onAnalyticsEvent?: (event: AnalyticsEvent) => void;
|
|
638
635
|
onAdBreakChange?: (active: boolean) => void;
|
|
639
636
|
onKeyMomentsLoaded?: (keyMoments: KeyMoment[]) => void;
|
|
@@ -661,6 +658,10 @@ declare interface WebVideoPlayerProps {
|
|
|
661
658
|
title?: string;
|
|
662
659
|
artworkUrl?: string;
|
|
663
660
|
chaptersDisplayMode?: 'strip' | 'panel';
|
|
661
|
+
keyMomentsTray?: 'bottom' | 'right' | 'strip' | 'panel' | 'none' | boolean;
|
|
662
|
+
keyMomentsPosition?: 'bottom' | 'right';
|
|
663
|
+
defaultKeyMomentsOpen?: boolean;
|
|
664
|
+
onKeyMomentsToggle?: (isOpen: boolean) => void;
|
|
664
665
|
volumeControlType?: 'slider' | 'button';
|
|
665
666
|
urlTransformer?: (url: string) => string;
|
|
666
667
|
pauseAdOnTabSwitch?: boolean;
|