unified-video-framework 1.4.444 → 1.4.446
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/package.json +1 -1
- package/packages/core/dist/version.d.ts +1 -1
- package/packages/core/dist/version.js +1 -1
- package/packages/core/src/version.ts +1 -1
- package/packages/web/dist/WebPlayer.d.ts.map +1 -1
- package/packages/web/dist/WebPlayer.js +53 -20
- package/packages/web/dist/WebPlayer.js.map +1 -1
- package/packages/web/dist/drm.js +1 -1
- package/packages/web/src/WebPlayer.ts +62 -19
- package/scripts/fix-imports.js +61 -23
- package/packages/web/dist/WebPlayer.d.ts +0 -350
- package/packages/web/dist/ads/GoogleAdsManager.d.ts +0 -57
- package/packages/web/dist/ads/LiveStreamAdsManager.d.ts +0 -29
- package/packages/web/dist/ads/LiveStreamAdsManager.d.ts.map +0 -1
- package/packages/web/dist/ads/LiveStreamAdsManager.js +0 -168
- package/packages/web/dist/ads/LiveStreamAdsManager.js.map +0 -1
- package/packages/web/dist/chapters/ChapterManager.d.ts +0 -42
- package/packages/web/dist/chapters/CreditsButtonController.d.ts +0 -46
- package/packages/web/dist/chapters/SkipButtonController.d.ts +0 -31
- package/packages/web/dist/chapters/UserPreferencesManager.d.ts +0 -25
- package/packages/web/dist/chapters/index.d.ts +0 -12
- package/packages/web/dist/chapters/types/ChapterTypes.d.ts +0 -136
- package/packages/web/dist/drm.d.ts +0 -4
- package/packages/web/dist/index.d.ts +0 -7
- package/packages/web/dist/paywall/EmailAuthController.d.ts +0 -60
- package/packages/web/dist/paywall/PaywallController.d.ts +0 -74
- package/packages/web/dist/react/EPG.d.ts +0 -8
- package/packages/web/dist/react/WebPlayerView.d.ts +0 -397
- package/packages/web/dist/react/WebPlayerViewWithEPG.d.ts +0 -97
- package/packages/web/dist/react/components/ChapterProgress.d.ts +0 -22
- package/packages/web/dist/react/components/EPGNavigationControls.d.ts +0 -15
- package/packages/web/dist/react/components/EPGOverlay-improved-positioning.d.ts +0 -5
- package/packages/web/dist/react/components/EPGOverlay.d.ts +0 -5
- package/packages/web/dist/react/components/EPGProgramDetails.d.ts +0 -13
- package/packages/web/dist/react/components/EPGProgramGrid.d.ts +0 -19
- package/packages/web/dist/react/components/EPGTimelineHeader.d.ts +0 -16
- package/packages/web/dist/react/components/SkipButton.d.ts +0 -18
- package/packages/web/dist/react/components/commerce/ProductBadge.d.ts +0 -10
- package/packages/web/dist/react/components/commerce/ProductPanel.d.ts +0 -13
- package/packages/web/dist/react/examples/google-ads-example.d.ts +0 -4
- package/packages/web/dist/react/examples/live-stream-ads-example.d.ts +0 -8
- package/packages/web/dist/react/examples/live-stream-ads-example.d.ts.map +0 -1
- package/packages/web/dist/react/examples/live-stream-ads-example.js +0 -177
- package/packages/web/dist/react/examples/live-stream-ads-example.js.map +0 -1
- package/packages/web/dist/react/hooks/useChapters.d.ts +0 -29
- package/packages/web/dist/react/hooks/useCommerceSync.d.ts +0 -8
- package/packages/web/dist/react/types/EPGTypes.d.ts +0 -101
- package/packages/web/dist/react/types/FlashNewsTickerTypes.d.ts +0 -146
- package/packages/web/dist/react/types/VideoCommerceTypes.d.ts +0 -109
- package/packages/web/dist/react/utils/EPGUtils.d.ts +0 -21
- package/packages/web/dist/test/epg-test.d.ts +0 -3
- package/packages/web/dist/utils/YouTubeExtractor.d.ts +0 -38
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LiveStreamAdsManager.d.ts","sourceRoot":"","sources":["../../src/ads/LiveStreamAdsManager.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAEvE,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAC1D,eAAe,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC;IACxC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAG9B,kBAAkB,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;CACtD;AAED,qBAAa,oBAAqB,SAAQ,gBAAgB;IACxD,OAAO,CAAC,UAAU,CAAsB;IACxC,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,eAAe,CAAa;IACpC,OAAO,CAAC,eAAe,CAAK;IAC5B,OAAO,CAAC,iBAAiB,CAAK;IAC9B,OAAO,CAAC,eAAe,CAAK;IAC5B,OAAO,CAAC,WAAW,CAAa;gBAEpB,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,mBAAmB;IAcpF,iBAAiB,CAAC,WAAW,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBzD,OAAO,CAAC,qBAAqB;IAqC7B,cAAc,IAAI,IAAI;IA+BtB,OAAO,CAAC,mBAAmB;IAc3B,OAAO,CAAC,oBAAoB;IAc5B,SAAS,CAAC,mBAAmB,IAAI,IAAI;IAyBrC,OAAO,CAAC,oBAAoB;IA4B5B,OAAO,CAAC,cAAc;IA+BtB,OAAO,IAAI,IAAI;CAQhB"}
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
import { GoogleAdsManager } from "./GoogleAdsManager.js";
|
|
2
|
-
export class LiveStreamAdsManager extends GoogleAdsManager {
|
|
3
|
-
constructor(video, adContainer, config) {
|
|
4
|
-
super(video, adContainer, config);
|
|
5
|
-
this.isLiveStream = false;
|
|
6
|
-
this.periodicAdTimer = null;
|
|
7
|
-
this.lastAdBreakTime = 0;
|
|
8
|
-
this.playbackStartTime = 0;
|
|
9
|
-
this.streamStartTime = 0;
|
|
10
|
-
this.hlsInstance = null;
|
|
11
|
-
this.liveConfig = {
|
|
12
|
-
periodicAdInterval: 300,
|
|
13
|
-
syncToLiveEdge: false,
|
|
14
|
-
liveEdgeOffset: 3,
|
|
15
|
-
pauseStreamDuringAd: true,
|
|
16
|
-
...config
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
async initializeLiveAds(hlsInstance) {
|
|
20
|
-
await this.initialize();
|
|
21
|
-
this.isLiveStream = true;
|
|
22
|
-
this.hlsInstance = hlsInstance;
|
|
23
|
-
this.playbackStartTime = this.video.currentTime || 0;
|
|
24
|
-
this.streamStartTime = Date.now();
|
|
25
|
-
const mode = this.liveConfig.liveAdBreakMode || 'periodic';
|
|
26
|
-
console.log(`🔴 Live Stream Ads initialized`);
|
|
27
|
-
console.log(` Mode: ${mode}`);
|
|
28
|
-
console.log(` Periodic interval: ${this.liveConfig.periodicAdInterval}s`);
|
|
29
|
-
if (mode === 'periodic') {
|
|
30
|
-
this.setupPeriodicAdBreaks();
|
|
31
|
-
}
|
|
32
|
-
else {
|
|
33
|
-
console.log('Manual mode - call triggerAdBreak() to show ads');
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
setupPeriodicAdBreaks() {
|
|
37
|
-
const interval = this.liveConfig.periodicAdInterval || 300;
|
|
38
|
-
console.log(`⏰ Setting up periodic ad breaks every ${interval}s`);
|
|
39
|
-
let accumulatedPlaybackTime = 0;
|
|
40
|
-
let lastCheckTime = this.video.currentTime;
|
|
41
|
-
this.periodicAdTimer = setInterval(() => {
|
|
42
|
-
if (!this.video.paused && !this.isPlayingAd()) {
|
|
43
|
-
const currentTime = this.video.currentTime || 0;
|
|
44
|
-
const timeDelta = currentTime - lastCheckTime;
|
|
45
|
-
if (timeDelta > 0 && timeDelta < 5) {
|
|
46
|
-
accumulatedPlaybackTime += timeDelta;
|
|
47
|
-
}
|
|
48
|
-
lastCheckTime = currentTime;
|
|
49
|
-
const timeSinceLastAd = accumulatedPlaybackTime - this.lastAdBreakTime;
|
|
50
|
-
if (timeSinceLastAd >= interval) {
|
|
51
|
-
console.log('⏰ Periodic ad break triggered');
|
|
52
|
-
console.log(` Playback time: ${Math.floor(accumulatedPlaybackTime)}s`);
|
|
53
|
-
console.log(` Time since last ad: ${Math.floor(timeSinceLastAd)}s`);
|
|
54
|
-
this.liveConfig.onAdBreakScheduled?.(accumulatedPlaybackTime);
|
|
55
|
-
this.triggerAdBreak();
|
|
56
|
-
this.lastAdBreakTime = accumulatedPlaybackTime;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}, 1000);
|
|
60
|
-
}
|
|
61
|
-
triggerAdBreak() {
|
|
62
|
-
if (!this.adsManager) {
|
|
63
|
-
console.error('❌ Ads manager not initialized');
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
if (this.isPlayingAd()) {
|
|
67
|
-
console.warn('⚠️ Ad already playing, skipping trigger');
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
console.log('🎬 Triggering ad break for live stream');
|
|
71
|
-
const currentTime = this.video.currentTime;
|
|
72
|
-
console.log(`📍 Stream position before ad: ${currentTime.toFixed(2)}s`);
|
|
73
|
-
if (this.liveConfig.pauseStreamDuringAd) {
|
|
74
|
-
this.pauseStreamDownload();
|
|
75
|
-
}
|
|
76
|
-
this.video.__positionBeforeAd = currentTime;
|
|
77
|
-
this.adsManager.start();
|
|
78
|
-
}
|
|
79
|
-
pauseStreamDownload() {
|
|
80
|
-
try {
|
|
81
|
-
if (this.hlsInstance && this.hlsInstance.stopLoad) {
|
|
82
|
-
console.log('⏸️ Pausing stream download during ad');
|
|
83
|
-
this.hlsInstance.stopLoad();
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
catch (error) {
|
|
87
|
-
console.warn('Could not pause stream download:', error);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
resumeStreamDownload() {
|
|
91
|
-
try {
|
|
92
|
-
if (this.hlsInstance && this.hlsInstance.startLoad) {
|
|
93
|
-
console.log('▶️ Resuming stream download after ad');
|
|
94
|
-
this.hlsInstance.startLoad();
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
catch (error) {
|
|
98
|
-
console.warn('Could not resume stream download:', error);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
setupLiveEdgeResume() {
|
|
102
|
-
const originalOnAdEnd = this.liveConfig.onAdEnd;
|
|
103
|
-
this.liveConfig.onAdEnd = () => {
|
|
104
|
-
const positionBeforeAd = this.video.__positionBeforeAd;
|
|
105
|
-
if (this.liveConfig.syncToLiveEdge) {
|
|
106
|
-
console.log('📺 Ad ended, syncing to live edge (skipping content)');
|
|
107
|
-
this.resumeStreamDownload();
|
|
108
|
-
this.syncToLiveEdge();
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
console.log('📺 Ad ended, resuming from pause point (DVR-style)');
|
|
112
|
-
this.resumeFromPausePoint(positionBeforeAd);
|
|
113
|
-
}
|
|
114
|
-
originalOnAdEnd?.();
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
resumeFromPausePoint(pausedTime) {
|
|
118
|
-
setTimeout(() => {
|
|
119
|
-
try {
|
|
120
|
-
console.log(`⏯️ Resuming from paused position: ${pausedTime.toFixed(2)}s`);
|
|
121
|
-
if (this.liveConfig.pauseStreamDuringAd) {
|
|
122
|
-
this.resumeStreamDownload();
|
|
123
|
-
}
|
|
124
|
-
this.video.currentTime = pausedTime;
|
|
125
|
-
if (this.hlsInstance && this.hlsInstance.liveSyncPosition !== undefined) {
|
|
126
|
-
const liveEdge = this.hlsInstance.liveSyncPosition;
|
|
127
|
-
const behindLive = liveEdge - pausedTime;
|
|
128
|
-
console.log(` Behind live by: ${behindLive.toFixed(1)} seconds`);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
catch (error) {
|
|
132
|
-
console.error('❌ Error resuming from pause point:', error);
|
|
133
|
-
}
|
|
134
|
-
}, 100);
|
|
135
|
-
}
|
|
136
|
-
syncToLiveEdge() {
|
|
137
|
-
setTimeout(() => {
|
|
138
|
-
try {
|
|
139
|
-
this.resumeStreamDownload();
|
|
140
|
-
let liveEdgePosition;
|
|
141
|
-
if (this.hlsInstance && this.hlsInstance.liveSyncPosition !== undefined) {
|
|
142
|
-
console.log(`📍 HLS.js live edge: ${this.hlsInstance.liveSyncPosition.toFixed(2)}s`);
|
|
143
|
-
liveEdgePosition = this.hlsInstance.liveSyncPosition;
|
|
144
|
-
}
|
|
145
|
-
if (liveEdgePosition !== undefined) {
|
|
146
|
-
const offset = this.liveConfig.liveEdgeOffset || 3;
|
|
147
|
-
const targetPosition = liveEdgePosition - offset;
|
|
148
|
-
console.log(`⏩ Syncing to live edge: ${targetPosition.toFixed(2)}s (offset: ${offset}s)`);
|
|
149
|
-
this.video.currentTime = targetPosition;
|
|
150
|
-
}
|
|
151
|
-
else {
|
|
152
|
-
console.warn('⚠️ Could not determine live edge position');
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
catch (error) {
|
|
156
|
-
console.error('❌ Error syncing to live edge:', error);
|
|
157
|
-
}
|
|
158
|
-
}, 100);
|
|
159
|
-
}
|
|
160
|
-
destroy() {
|
|
161
|
-
if (this.periodicAdTimer) {
|
|
162
|
-
clearInterval(this.periodicAdTimer);
|
|
163
|
-
this.periodicAdTimer = null;
|
|
164
|
-
}
|
|
165
|
-
super.destroy();
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
//# sourceMappingURL=LiveStreamAdsManager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LiveStreamAdsManager.js","sourceRoot":"","sources":["../../src/ads/LiveStreamAdsManager.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAmB,MAAM,oBAAoB,CAAC;AAavE,MAAM,OAAO,oBAAqB,SAAQ,gBAAgB;IASxD,YAAY,KAAuB,EAAE,WAAwB,EAAE,MAA2B;QACxF,KAAK,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;QAR5B,iBAAY,GAAG,KAAK,CAAC;QACrB,oBAAe,GAAQ,IAAI,CAAC;QAC5B,oBAAe,GAAG,CAAC,CAAC;QACpB,sBAAiB,GAAG,CAAC,CAAC;QACt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C;gBAEzC,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,gBAAgB,KAAK,SAAS,EAAE;oBACvE,OAAO,CAAC,GAAG,CAAC,wBAAwB,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;oBACrF,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC;iBACtD;gBAED,IAAI,gBAAgB,KAAK,SAAS,EAAE;oBAClC,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,cAAc,IAAI,CAAC,CAAC;oBACnD,MAAM,cAAc,GAAG,gBAAgB,GAAG,MAAM,CAAC;oBACjD,OAAO,CAAC,GAAG,CAAC,2BAA2B,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC,cAAc,MAAM,IAAI,CAAC,CAAC;oBAC1F,IAAI,CAAC,KAAK,CAAC,WAAW,GAAG,cAAc,CAAC;iBACzC;qBAAM;oBACL,OAAO,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAC;iBAC3D;aACF;YAAC,OAAO,KAAK,EAAE;gBACd,OAAO,CAAC,KAAK,CAAC,+BAA+B,EAAE,KAAK,CAAC,CAAC;aACvD;QACH,CAAC,EAAE,GAAG,CAAC,CAAC;IACV,CAAC;IAKD,OAAO;QACL,IAAI,IAAI,CAAC,eAAe,EAAE;YACxB,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;YACpC,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;SAC7B;QAED,KAAK,CAAC,OAAO,EAAE,CAAC;IAClB,CAAC;CACF"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { VideoSegment, VideoChapters, ChapterConfig, ChapterEvents, ChapterMarker, SegmentType } from './types/ChapterTypes';
|
|
2
|
-
export declare class ChapterManager {
|
|
3
|
-
private playerContainer;
|
|
4
|
-
private videoElement;
|
|
5
|
-
private chapters;
|
|
6
|
-
private currentSegment;
|
|
7
|
-
private previousSegment;
|
|
8
|
-
private skipButtonController;
|
|
9
|
-
private creditsButtonController;
|
|
10
|
-
private config;
|
|
11
|
-
private eventListeners;
|
|
12
|
-
private isDestroyed;
|
|
13
|
-
constructor(playerContainer: HTMLElement, videoElement: HTMLVideoElement, config?: ChapterConfig);
|
|
14
|
-
loadChapters(chapters: VideoChapters): Promise<void>;
|
|
15
|
-
loadChaptersFromUrl(url: string): Promise<void>;
|
|
16
|
-
getCurrentSegment(currentTime: number): VideoSegment | null;
|
|
17
|
-
skipToNextSegment(currentSegment: VideoSegment): void;
|
|
18
|
-
skipToSegment(segmentId: string): void;
|
|
19
|
-
getSegments(): VideoSegment[];
|
|
20
|
-
getSegment(segmentId: string): VideoSegment | null;
|
|
21
|
-
getSegmentsByType(type: SegmentType): VideoSegment[];
|
|
22
|
-
getChapterMarkers(): ChapterMarker[];
|
|
23
|
-
updateConfig(newConfig: Partial<ChapterConfig>): void;
|
|
24
|
-
on<K extends keyof ChapterEvents>(event: K, listener: (data: ChapterEvents[K]) => void): void;
|
|
25
|
-
off<K extends keyof ChapterEvents>(event: K, listener: (data: ChapterEvents[K]) => void): void;
|
|
26
|
-
destroy(): void;
|
|
27
|
-
hasChapters(): boolean;
|
|
28
|
-
getChapters(): VideoChapters | null;
|
|
29
|
-
private setupTimeUpdateListener;
|
|
30
|
-
private checkCurrentSegment;
|
|
31
|
-
private shouldShowSkipButton;
|
|
32
|
-
private handleWatchCredits;
|
|
33
|
-
private handleNextEpisode;
|
|
34
|
-
private handleAutoRedirect;
|
|
35
|
-
private getNextContentSegment;
|
|
36
|
-
private sortSegments;
|
|
37
|
-
private validateChapters;
|
|
38
|
-
private updateChapterMarkers;
|
|
39
|
-
private removeChapterMarkers;
|
|
40
|
-
private emit;
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=ChapterManager.d.ts.map
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { VideoSegment, ChapterConfig } from './types/ChapterTypes';
|
|
2
|
-
interface CreditsButtonCallbacks {
|
|
3
|
-
onWatchCredits: (segment: VideoSegment) => void;
|
|
4
|
-
onNextEpisode: (segment: VideoSegment, url: string) => void;
|
|
5
|
-
onAutoRedirect: (segment: VideoSegment, url: string) => void;
|
|
6
|
-
onButtonsShown: (segment: VideoSegment) => void;
|
|
7
|
-
onButtonsHidden: (segment: VideoSegment, reason: string) => void;
|
|
8
|
-
}
|
|
9
|
-
export declare class CreditsButtonController {
|
|
10
|
-
private playerContainer;
|
|
11
|
-
private config;
|
|
12
|
-
private callbacks;
|
|
13
|
-
private buttonsContainer;
|
|
14
|
-
private watchCreditsButton;
|
|
15
|
-
private nextEpisodeButton;
|
|
16
|
-
private currentSegment;
|
|
17
|
-
private autoRedirectTimeout;
|
|
18
|
-
private countdownInterval;
|
|
19
|
-
private isVisible;
|
|
20
|
-
private userWatchingCredits;
|
|
21
|
-
private readonly DEFAULT_WATCH_CREDITS_LABEL;
|
|
22
|
-
private readonly DEFAULT_NEXT_EPISODE_LABEL;
|
|
23
|
-
private readonly DEFAULT_AUTO_REDIRECT_DELAY;
|
|
24
|
-
constructor(playerContainer: HTMLElement, config: ChapterConfig, callbacks: CreditsButtonCallbacks);
|
|
25
|
-
showCreditsButtons(segment: VideoSegment, currentTime: number): void;
|
|
26
|
-
hideCreditsButtons(reason?: 'timeout' | 'segment-end' | 'user-action' | 'manual'): void;
|
|
27
|
-
isUserWatchingCredits(): boolean;
|
|
28
|
-
getCurrentSegment(): VideoSegment | null;
|
|
29
|
-
isButtonsVisible(): boolean;
|
|
30
|
-
destroy(): void;
|
|
31
|
-
private createCreditsButtons;
|
|
32
|
-
private applyContainerPosition;
|
|
33
|
-
private applyButtonStyles;
|
|
34
|
-
private adjustBrightness;
|
|
35
|
-
private updateButtonLabels;
|
|
36
|
-
private showButtons;
|
|
37
|
-
private hideButtons;
|
|
38
|
-
private handleWatchCreditsClick;
|
|
39
|
-
private handleNextEpisodeClick;
|
|
40
|
-
private startAutoRedirectCountdown;
|
|
41
|
-
private createProgressBar;
|
|
42
|
-
private redirectToNextEpisode;
|
|
43
|
-
private clearTimeouts;
|
|
44
|
-
}
|
|
45
|
-
export {};
|
|
46
|
-
//# sourceMappingURL=CreditsButtonController.d.ts.map
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { VideoSegment, SkipButtonState, SkipButtonPosition, ChapterConfig } from './types/ChapterTypes';
|
|
2
|
-
export declare class SkipButtonController {
|
|
3
|
-
private playerContainer;
|
|
4
|
-
private config;
|
|
5
|
-
private onSkip;
|
|
6
|
-
private onButtonShown;
|
|
7
|
-
private onButtonHidden;
|
|
8
|
-
private skipButton;
|
|
9
|
-
private currentSegment;
|
|
10
|
-
private autoSkipTimeout;
|
|
11
|
-
private hideTimeout;
|
|
12
|
-
private countdownInterval;
|
|
13
|
-
private state;
|
|
14
|
-
constructor(playerContainer: HTMLElement, config: ChapterConfig, onSkip: (segment: VideoSegment) => void, onButtonShown: (segment: VideoSegment) => void, onButtonHidden: (segment: VideoSegment, reason: string) => void);
|
|
15
|
-
showSkipButton(segment: VideoSegment, currentTime: number): void;
|
|
16
|
-
hideSkipButton(reason?: 'timeout' | 'segment-end' | 'user-action' | 'manual'): void;
|
|
17
|
-
updatePosition(position: SkipButtonPosition): void;
|
|
18
|
-
isVisible(): boolean;
|
|
19
|
-
getState(): SkipButtonState;
|
|
20
|
-
destroy(): void;
|
|
21
|
-
private createSkipButton;
|
|
22
|
-
private updateSkipButton;
|
|
23
|
-
private applyPositionStyles;
|
|
24
|
-
private showButton;
|
|
25
|
-
private hideButton;
|
|
26
|
-
private handleAutoSkip;
|
|
27
|
-
private startAutoSkipCountdown;
|
|
28
|
-
private handleAutoHide;
|
|
29
|
-
private clearTimeouts;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=SkipButtonController.d.ts.map
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ChapterPreferences } from './types/ChapterTypes';
|
|
2
|
-
export declare class UserPreferencesManager {
|
|
3
|
-
private static readonly STORAGE_KEY;
|
|
4
|
-
private static readonly DEFAULT_PREFERENCES;
|
|
5
|
-
private preferences;
|
|
6
|
-
private listeners;
|
|
7
|
-
constructor(initialPreferences?: Partial<ChapterPreferences>);
|
|
8
|
-
getPreferences(): ChapterPreferences;
|
|
9
|
-
updatePreferences(updates: Partial<ChapterPreferences>): void;
|
|
10
|
-
resetPreferences(): void;
|
|
11
|
-
getPreference<K extends keyof ChapterPreferences>(key: K): ChapterPreferences[K];
|
|
12
|
-
setPreference<K extends keyof ChapterPreferences>(key: K, value: ChapterPreferences[K]): void;
|
|
13
|
-
toggleAutoSkip(segmentType: 'intro' | 'recap' | 'credits'): void;
|
|
14
|
-
isAutoSkipEnabled(segmentType: 'intro' | 'recap' | 'credits'): boolean;
|
|
15
|
-
addListener(listener: (preferences: ChapterPreferences) => void): void;
|
|
16
|
-
removeListener(listener: (preferences: ChapterPreferences) => void): void;
|
|
17
|
-
createPreferencesPanel(): HTMLElement;
|
|
18
|
-
private loadPreferences;
|
|
19
|
-
private savePreferences;
|
|
20
|
-
private preferencesEqual;
|
|
21
|
-
private notifyListeners;
|
|
22
|
-
private setupPreferencesEventListeners;
|
|
23
|
-
static getDefaultPreferences(): ChapterPreferences;
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=UserPreferencesManager.d.ts.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export { ChapterManager } from './ChapterManager';
|
|
2
|
-
export { SkipButtonController } from './SkipButtonController';
|
|
3
|
-
export { UserPreferencesManager } from './UserPreferencesManager';
|
|
4
|
-
export * from './types/ChapterTypes';
|
|
5
|
-
export { useChapters } from '../react/hooks/useChapters';
|
|
6
|
-
export { SkipButton } from '../react/components/SkipButton';
|
|
7
|
-
export { ChapterProgress } from '../react/components/ChapterProgress';
|
|
8
|
-
export type { UseChaptersOptions, UseChaptersResult } from '../react/hooks/useChapters';
|
|
9
|
-
export type { SkipButtonProps } from '../react/components/SkipButton';
|
|
10
|
-
export type { ChapterProgressProps } from '../react/components/ChapterProgress';
|
|
11
|
-
export type { ChapterMarker } from '../react/components/ChapterProgress';
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
export type SegmentType = 'intro' | 'recap' | 'content' | 'credits' | 'ad';
|
|
2
|
-
export type SkipButtonPosition = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
3
|
-
export interface VideoSegment {
|
|
4
|
-
id: string;
|
|
5
|
-
type: SegmentType;
|
|
6
|
-
startTime: number;
|
|
7
|
-
endTime: number;
|
|
8
|
-
title?: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
skipLabel?: string;
|
|
11
|
-
autoSkip?: boolean;
|
|
12
|
-
autoSkipDelay?: number;
|
|
13
|
-
showSkipButton?: boolean;
|
|
14
|
-
nextEpisodeUrl?: string;
|
|
15
|
-
watchCreditsLabel?: string;
|
|
16
|
-
nextEpisodeLabel?: string;
|
|
17
|
-
creditsButtonStyle?: {
|
|
18
|
-
layout?: 'vertical' | 'horizontal';
|
|
19
|
-
watchCreditsColor?: string;
|
|
20
|
-
watchCreditsBgColor?: string;
|
|
21
|
-
nextEpisodeColor?: string;
|
|
22
|
-
nextEpisodeBgColor?: string;
|
|
23
|
-
position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left' | 'bottom-center' | 'top-center';
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export interface VideoChapters {
|
|
27
|
-
videoId: string;
|
|
28
|
-
duration: number;
|
|
29
|
-
segments: VideoSegment[];
|
|
30
|
-
metadata?: {
|
|
31
|
-
version?: string;
|
|
32
|
-
createdAt?: string;
|
|
33
|
-
updatedAt?: string;
|
|
34
|
-
source?: 'manual' | 'auto-detected' | 'crowdsourced';
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
export interface ChapterConfig {
|
|
38
|
-
enabled: boolean;
|
|
39
|
-
data?: VideoChapters;
|
|
40
|
-
dataUrl?: string;
|
|
41
|
-
autoHide?: boolean;
|
|
42
|
-
autoHideDelay?: number;
|
|
43
|
-
showChapterMarkers?: boolean;
|
|
44
|
-
skipButtonPosition?: SkipButtonPosition;
|
|
45
|
-
customStyles?: {
|
|
46
|
-
skipButton?: Partial<CSSStyleDeclaration>;
|
|
47
|
-
chapterMarkers?: Partial<CSSStyleDeclaration>;
|
|
48
|
-
progressMarkers?: {
|
|
49
|
-
intro?: string;
|
|
50
|
-
recap?: string;
|
|
51
|
-
content?: string;
|
|
52
|
-
credits?: string;
|
|
53
|
-
ad?: string;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
userPreferences?: ChapterPreferences;
|
|
57
|
-
}
|
|
58
|
-
export interface ChapterPreferences {
|
|
59
|
-
autoSkipIntro?: boolean;
|
|
60
|
-
autoSkipRecap?: boolean;
|
|
61
|
-
autoSkipCredits?: boolean;
|
|
62
|
-
showSkipButtons?: boolean;
|
|
63
|
-
skipButtonTimeout?: number;
|
|
64
|
-
rememberChoices?: boolean;
|
|
65
|
-
resumePlaybackAfterSkip?: boolean;
|
|
66
|
-
}
|
|
67
|
-
export interface ChapterEvents {
|
|
68
|
-
segmentEntered: {
|
|
69
|
-
segment: VideoSegment;
|
|
70
|
-
currentTime: number;
|
|
71
|
-
previousSegment?: VideoSegment;
|
|
72
|
-
};
|
|
73
|
-
segmentExited: {
|
|
74
|
-
segment: VideoSegment;
|
|
75
|
-
currentTime: number;
|
|
76
|
-
nextSegment?: VideoSegment;
|
|
77
|
-
};
|
|
78
|
-
segmentSkipped: {
|
|
79
|
-
fromSegment: VideoSegment;
|
|
80
|
-
toSegment?: VideoSegment;
|
|
81
|
-
skipMethod: 'button' | 'auto' | 'manual';
|
|
82
|
-
currentTime: number;
|
|
83
|
-
};
|
|
84
|
-
skipButtonShown: {
|
|
85
|
-
segment: VideoSegment;
|
|
86
|
-
currentTime: number;
|
|
87
|
-
};
|
|
88
|
-
skipButtonHidden: {
|
|
89
|
-
segment: VideoSegment;
|
|
90
|
-
currentTime: number;
|
|
91
|
-
reason: 'timeout' | 'segment-end' | 'user-action' | 'manual';
|
|
92
|
-
};
|
|
93
|
-
chaptersLoaded: {
|
|
94
|
-
chapters: VideoChapters;
|
|
95
|
-
segmentCount: number;
|
|
96
|
-
};
|
|
97
|
-
chaptersLoadError: {
|
|
98
|
-
error: Error;
|
|
99
|
-
url?: string;
|
|
100
|
-
};
|
|
101
|
-
creditsWatched: {
|
|
102
|
-
segment: VideoSegment;
|
|
103
|
-
currentTime: number;
|
|
104
|
-
};
|
|
105
|
-
nextEpisodeClicked: {
|
|
106
|
-
segment: VideoSegment;
|
|
107
|
-
nextEpisodeUrl: string;
|
|
108
|
-
currentTime: number;
|
|
109
|
-
};
|
|
110
|
-
creditsAutoRedirect: {
|
|
111
|
-
segment: VideoSegment;
|
|
112
|
-
nextEpisodeUrl: string;
|
|
113
|
-
currentTime: number;
|
|
114
|
-
};
|
|
115
|
-
creditsFullyWatched: {
|
|
116
|
-
segment: VideoSegment;
|
|
117
|
-
nextEpisodeUrl?: string;
|
|
118
|
-
currentTime: number;
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
export interface SkipButtonState {
|
|
122
|
-
visible: boolean;
|
|
123
|
-
segment: VideoSegment | null;
|
|
124
|
-
autoSkipCountdown?: number;
|
|
125
|
-
position: SkipButtonPosition;
|
|
126
|
-
}
|
|
127
|
-
export interface ChapterMarker {
|
|
128
|
-
segment: VideoSegment;
|
|
129
|
-
position: number;
|
|
130
|
-
color?: string;
|
|
131
|
-
label?: string;
|
|
132
|
-
}
|
|
133
|
-
export declare const DEFAULT_CHAPTER_CONFIG: ChapterConfig;
|
|
134
|
-
export declare const DEFAULT_SKIP_LABELS: Record<SegmentType, string>;
|
|
135
|
-
export declare const SEGMENT_COLORS: Record<SegmentType, string>;
|
|
136
|
-
//# sourceMappingURL=ChapterTypes.d.ts.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from '../../core/dist/index';
|
|
2
|
-
export { WebPlayer } from './WebPlayer';
|
|
3
|
-
export { WebPlayerView } from './react/WebPlayerView';
|
|
4
|
-
export * from './react/EPG';
|
|
5
|
-
export type { FlashNewsTickerConfig, FlashNewsTickerItem, FlashNewsTickerAPI, TickerDisplayConfig, TickerStyleVariant, TickerLayoutStyle, BroadcastTheme, BroadcastStyleConfig, IntroAnimationType, ItemTransitionType, TwoLineDisplayConfig, TopLineConfig, BottomLineConfig, DecorativeShapesConfig, SeparatorType, ItemCyclingConfig } from './react/types/FlashNewsTickerTypes';
|
|
6
|
-
export declare const VERSION = "1.0.0";
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { PaywallConfig } from '@unified-video/core';
|
|
2
|
-
export type EmailAuthControllerOptions = {
|
|
3
|
-
getOverlayContainer: () => HTMLElement | null;
|
|
4
|
-
onAuthSuccess: (userId: string, sessionToken: string, accessData?: any) => void;
|
|
5
|
-
onAuthCancel: () => void;
|
|
6
|
-
onShow?: () => void;
|
|
7
|
-
onClose?: () => void;
|
|
8
|
-
};
|
|
9
|
-
export type AuthResponse = {
|
|
10
|
-
success: boolean;
|
|
11
|
-
message?: string;
|
|
12
|
-
data?: {
|
|
13
|
-
sessionToken?: string;
|
|
14
|
-
refreshToken?: string;
|
|
15
|
-
userId?: string;
|
|
16
|
-
expiresIn?: number;
|
|
17
|
-
};
|
|
18
|
-
error?: string;
|
|
19
|
-
};
|
|
20
|
-
export type AuthStep = 'email' | 'otp' | 'loading' | 'error' | 'success';
|
|
21
|
-
export declare class EmailAuthController {
|
|
22
|
-
private config;
|
|
23
|
-
private opts;
|
|
24
|
-
private overlayEl;
|
|
25
|
-
private currentStep;
|
|
26
|
-
private currentEmail;
|
|
27
|
-
private resendTimer;
|
|
28
|
-
private resendCooldown;
|
|
29
|
-
private otpAttempts;
|
|
30
|
-
private requestStartTime;
|
|
31
|
-
constructor(config: PaywallConfig | null, opts: EmailAuthControllerOptions);
|
|
32
|
-
updateConfig(config: PaywallConfig | null): void;
|
|
33
|
-
isAuthenticated(): boolean;
|
|
34
|
-
getAuthenticatedUserId(): string | null;
|
|
35
|
-
openAuthModal(): void;
|
|
36
|
-
closeAuthModal(): void;
|
|
37
|
-
private ensureOverlay;
|
|
38
|
-
private createHeader;
|
|
39
|
-
private setStep;
|
|
40
|
-
private renderEmailStep;
|
|
41
|
-
private renderOtpStep;
|
|
42
|
-
private renderLoadingStep;
|
|
43
|
-
private renderErrorStep;
|
|
44
|
-
private renderSuccessStep;
|
|
45
|
-
private requestOtp;
|
|
46
|
-
private verifyOtp;
|
|
47
|
-
private storeSessionToken;
|
|
48
|
-
private getStoredSessionToken;
|
|
49
|
-
private storeAuthTokens;
|
|
50
|
-
private startResendCooldown;
|
|
51
|
-
private clearResendTimer;
|
|
52
|
-
private handleCancel;
|
|
53
|
-
private showInputError;
|
|
54
|
-
private showSuccessMessage;
|
|
55
|
-
private showErrorMessage;
|
|
56
|
-
private isValidEmail;
|
|
57
|
-
logout(): Promise<void>;
|
|
58
|
-
destroy(): void;
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=EmailAuthController.d.ts.map
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { PaywallConfig } from '@unified-video/core';
|
|
2
|
-
export type PaywallGateway = {
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
icon?: string;
|
|
7
|
-
color?: string;
|
|
8
|
-
};
|
|
9
|
-
export type PaymentLinkConfig = {
|
|
10
|
-
endpoint: string;
|
|
11
|
-
method?: 'POST' | 'GET';
|
|
12
|
-
headers?: Record<string, string>;
|
|
13
|
-
mapRequest?: (paymentData: any) => any;
|
|
14
|
-
mapResponse?: (response: any) => {
|
|
15
|
-
url: string;
|
|
16
|
-
orderId?: string;
|
|
17
|
-
};
|
|
18
|
-
popup?: {
|
|
19
|
-
width?: number;
|
|
20
|
-
height?: number;
|
|
21
|
-
features?: string;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
export type PaywallControllerOptions = {
|
|
25
|
-
getOverlayContainer: () => HTMLElement | null;
|
|
26
|
-
onResume: (accessInfo?: {
|
|
27
|
-
accessGranted?: boolean;
|
|
28
|
-
paymentSuccessful?: boolean;
|
|
29
|
-
}) => void;
|
|
30
|
-
onShow?: () => void;
|
|
31
|
-
onClose?: () => void;
|
|
32
|
-
onPaymentRequested?: (gateway: PaywallGateway, paymentData: any) => Promise<void> | void;
|
|
33
|
-
onPaymentSuccess?: (gateway: PaywallGateway, result: any) => void;
|
|
34
|
-
onPaymentError?: (gateway: PaywallGateway, error: any) => void;
|
|
35
|
-
onPaymentCancel?: (gateway: PaywallGateway) => void;
|
|
36
|
-
};
|
|
37
|
-
export declare class PaywallController {
|
|
38
|
-
private config;
|
|
39
|
-
private opts;
|
|
40
|
-
private overlayEl;
|
|
41
|
-
private gatewayStepEl;
|
|
42
|
-
private popup;
|
|
43
|
-
private emailAuth;
|
|
44
|
-
private authenticatedUserId;
|
|
45
|
-
private sessionToken;
|
|
46
|
-
private currentGateway;
|
|
47
|
-
constructor(config: PaywallConfig | null, opts: PaywallControllerOptions);
|
|
48
|
-
updateConfig(config: PaywallConfig | null): void;
|
|
49
|
-
openOverlay(): void;
|
|
50
|
-
closeOverlay(): void;
|
|
51
|
-
private ensureOverlay;
|
|
52
|
-
destroyOverlays(): void;
|
|
53
|
-
private showGateways;
|
|
54
|
-
private getGateways;
|
|
55
|
-
private getLegacyGateway;
|
|
56
|
-
private createGatewayButton;
|
|
57
|
-
private adjustBrightness;
|
|
58
|
-
private openGateway;
|
|
59
|
-
private startPolling;
|
|
60
|
-
private handleGatewayClick;
|
|
61
|
-
private handlePaymentLink;
|
|
62
|
-
private onMessage;
|
|
63
|
-
private findGatewayById;
|
|
64
|
-
private initializeEmailAuth;
|
|
65
|
-
private openPaymentOverlay;
|
|
66
|
-
isAuthenticated(): boolean;
|
|
67
|
-
getAuthenticatedUserId(): string | null;
|
|
68
|
-
logout(): Promise<void>;
|
|
69
|
-
addGateway(gateway: PaywallGateway): void;
|
|
70
|
-
removeGateway(gatewayId: string): void;
|
|
71
|
-
getConfiguredGateways(): PaywallGateway[];
|
|
72
|
-
destroy(): void;
|
|
73
|
-
}
|
|
74
|
-
//# sourceMappingURL=PaywallController.d.ts.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { default as EPGOverlay } from './components/EPGOverlay';
|
|
2
|
-
export { default as EPGTimelineHeader } from './components/EPGTimelineHeader';
|
|
3
|
-
export { default as EPGProgramGrid } from './components/EPGProgramGrid';
|
|
4
|
-
export { default as EPGNavigationControls } from './components/EPGNavigationControls';
|
|
5
|
-
export { default as EPGProgramDetails } from './components/EPGProgramDetails';
|
|
6
|
-
export type { EPGData, EPGProgram, EPGProgramRow, EPGAction, EPGConfig, EPGProps, EPGTimeSlot, EPGNavigationState, EPGContextType, EPGComponentProps, TimeRange, ProgramBlock, EPGViewMode, EPGSortBy, EPGFilterType, } from './types/EPGTypes';
|
|
7
|
-
export { parseTime, formatTime, formatDateTime, getProgramDuration, generateTimeSlots, calculateProgramBlock, isProgramLive, getProgramProgress, findProgramAtTime, getCurrentTimePosition, snapToTimeSlot, calculateOptimalTimeRange, getProgramsInRange, calculateScrollPosition, debounce, throttle, } from './utils/EPGUtils';
|
|
8
|
-
//# sourceMappingURL=EPG.d.ts.map
|