eb-player 2.1.5 → 2.3.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/dist/build/ebplayer.bundle.js +206 -4
- package/dist/build/ebplayer.bundle.js.map +1 -1
- package/dist/build/types/src/core/lifecycle.d.ts +9 -0
- package/dist/build/types/src/core/lifecycle.d.ts.map +1 -1
- package/dist/build/types/src/eb-player.d.ts +4 -0
- package/dist/build/types/src/eb-player.d.ts.map +1 -1
- package/dist/build/types/src/skin/controls/settings-panel.d.ts.map +1 -1
- package/package.json +7 -4
- package/dist/build/theme-forja.js +0 -1
- package/dist/build/theme-radio.js +0 -1
- package/dist/build/theme-snrt.js +0 -1
- package/dist/build/types/config.d.ts +0 -139
- package/dist/build/types/config.d.ts.map +0 -1
- package/dist/build/types/core/command-handler.d.ts +0 -50
- package/dist/build/types/core/command-handler.d.ts.map +0 -1
- package/dist/build/types/core/config.d.ts +0 -187
- package/dist/build/types/core/config.d.ts.map +0 -1
- package/dist/build/types/core/css/theme-forja.entry.d.ts +0 -2
- package/dist/build/types/core/css/theme-forja.entry.d.ts.map +0 -1
- package/dist/build/types/core/css/theme-radio.entry.d.ts +0 -2
- package/dist/build/types/core/css/theme-radio.entry.d.ts.map +0 -1
- package/dist/build/types/core/css/theme-snrt.entry.d.ts +0 -2
- package/dist/build/types/core/css/theme-snrt.entry.d.ts.map +0 -1
- package/dist/build/types/core/engine-state-sync.d.ts +0 -38
- package/dist/build/types/core/engine-state-sync.d.ts.map +0 -1
- package/dist/build/types/core/event-bus.d.ts +0 -90
- package/dist/build/types/core/event-bus.d.ts.map +0 -1
- package/dist/build/types/core/fsm.d.ts +0 -30
- package/dist/build/types/core/fsm.d.ts.map +0 -1
- package/dist/build/types/core/i18n.d.ts +0 -51
- package/dist/build/types/core/i18n.d.ts.map +0 -1
- package/dist/build/types/core/index.d.ts +0 -23
- package/dist/build/types/core/index.d.ts.map +0 -1
- package/dist/build/types/core/lifecycle.d.ts +0 -96
- package/dist/build/types/core/lifecycle.d.ts.map +0 -1
- package/dist/build/types/core/player-state.d.ts +0 -15
- package/dist/build/types/core/player-state.d.ts.map +0 -1
- package/dist/build/types/core/types.d.ts +0 -85
- package/dist/build/types/core/types.d.ts.map +0 -1
- package/dist/build/types/eb-player-standalone.d.ts +0 -23
- package/dist/build/types/eb-player-standalone.d.ts.map +0 -1
- package/dist/build/types/eb-player.d.ts +0 -56
- package/dist/build/types/eb-player.d.ts.map +0 -1
- package/dist/build/types/engine-state-sync.d.ts +0 -38
- package/dist/build/types/engine-state-sync.d.ts.map +0 -1
- package/dist/build/types/engines/abr/dash.d.ts +0 -56
- package/dist/build/types/engines/abr/dash.d.ts.map +0 -1
- package/dist/build/types/engines/abr/hls.d.ts +0 -105
- package/dist/build/types/engines/abr/hls.d.ts.map +0 -1
- package/dist/build/types/engines/base-engine.d.ts +0 -72
- package/dist/build/types/engines/base-engine.d.ts.map +0 -1
- package/dist/build/types/engines/cdn-loader.d.ts +0 -20
- package/dist/build/types/engines/cdn-loader.d.ts.map +0 -1
- package/dist/build/types/engines/cdn-token-manager.d.ts +0 -137
- package/dist/build/types/engines/cdn-token-manager.d.ts.map +0 -1
- package/dist/build/types/engines/dash.d.ts +0 -79
- package/dist/build/types/engines/dash.d.ts.map +0 -1
- package/dist/build/types/engines/drm.d.ts +0 -54
- package/dist/build/types/engines/drm.d.ts.map +0 -1
- package/dist/build/types/engines/hls-discontinuity-patch.d.ts +0 -43
- package/dist/build/types/engines/hls-discontinuity-patch.d.ts.map +0 -1
- package/dist/build/types/engines/hls.d.ts +0 -53
- package/dist/build/types/engines/hls.d.ts.map +0 -1
- package/dist/build/types/engines/index.d.ts +0 -26
- package/dist/build/types/engines/index.d.ts.map +0 -1
- package/dist/build/types/engines/ios/hls.d.ts +0 -20
- package/dist/build/types/engines/ios/hls.d.ts.map +0 -1
- package/dist/build/types/engines/poster/hls.d.ts +0 -35
- package/dist/build/types/engines/poster/hls.d.ts.map +0 -1
- package/dist/build/types/engines/retry/dash.d.ts +0 -39
- package/dist/build/types/engines/retry/dash.d.ts.map +0 -1
- package/dist/build/types/engines/retry/hls.d.ts +0 -47
- package/dist/build/types/engines/retry/hls.d.ts.map +0 -1
- package/dist/build/types/engines/snapshot/dash.d.ts +0 -55
- package/dist/build/types/engines/snapshot/dash.d.ts.map +0 -1
- package/dist/build/types/engines/snapshot/hls.d.ts +0 -118
- package/dist/build/types/engines/snapshot/hls.d.ts.map +0 -1
- package/dist/build/types/engines/stall-watchdog.d.ts +0 -41
- package/dist/build/types/engines/stall-watchdog.d.ts.map +0 -1
- package/dist/build/types/event-bus.d.ts +0 -54
- package/dist/build/types/event-bus.d.ts.map +0 -1
- package/dist/build/types/fsm.d.ts +0 -27
- package/dist/build/types/fsm.d.ts.map +0 -1
- package/dist/build/types/i18n.d.ts +0 -51
- package/dist/build/types/i18n.d.ts.map +0 -1
- package/dist/build/types/index.d.ts +0 -21
- package/dist/build/types/index.d.ts.map +0 -1
- package/dist/build/types/integrations/ads-manager.d.ts +0 -37
- package/dist/build/types/integrations/ads-manager.d.ts.map +0 -1
- package/dist/build/types/integrations/chromecast-manager.d.ts +0 -50
- package/dist/build/types/integrations/chromecast-manager.d.ts.map +0 -1
- package/dist/build/types/integrations/epg-manager.d.ts +0 -22
- package/dist/build/types/integrations/epg-manager.d.ts.map +0 -1
- package/dist/build/types/integrations/index.d.ts +0 -7
- package/dist/build/types/integrations/index.d.ts.map +0 -1
- package/dist/build/types/integrations/intro-stream-manager.d.ts +0 -33
- package/dist/build/types/integrations/intro-stream-manager.d.ts.map +0 -1
- package/dist/build/types/integrations/p2p-manager.d.ts +0 -42
- package/dist/build/types/integrations/p2p-manager.d.ts.map +0 -1
- package/dist/build/types/integrations/playlist-manager.d.ts +0 -21
- package/dist/build/types/integrations/playlist-manager.d.ts.map +0 -1
- package/dist/build/types/lifecycle.d.ts +0 -64
- package/dist/build/types/lifecycle.d.ts.map +0 -1
- package/dist/build/types/player-state.d.ts +0 -15
- package/dist/build/types/player-state.d.ts.map +0 -1
- package/dist/build/types/skin/bars/bottom-bar.d.ts +0 -16
- package/dist/build/types/skin/bars/bottom-bar.d.ts.map +0 -1
- package/dist/build/types/skin/bars/middle-bar.d.ts +0 -16
- package/dist/build/types/skin/bars/middle-bar.d.ts.map +0 -1
- package/dist/build/types/skin/bars/top-bar.d.ts +0 -15
- package/dist/build/types/skin/bars/top-bar.d.ts.map +0 -1
- package/dist/build/types/skin/base-component.d.ts +0 -69
- package/dist/build/types/skin/base-component.d.ts.map +0 -1
- package/dist/build/types/skin/brand/forja-playlist-bar.d.ts +0 -15
- package/dist/build/types/skin/brand/forja-playlist-bar.d.ts.map +0 -1
- package/dist/build/types/skin/brand/snrt-radio-carousel.d.ts +0 -16
- package/dist/build/types/skin/brand/snrt-radio-carousel.d.ts.map +0 -1
- package/dist/build/types/skin/component-registry.d.ts +0 -16
- package/dist/build/types/skin/component-registry.d.ts.map +0 -1
- package/dist/build/types/skin/controllers/auto-hide.d.ts +0 -27
- package/dist/build/types/skin/controllers/auto-hide.d.ts.map +0 -1
- package/dist/build/types/skin/controllers/keyboard.d.ts +0 -29
- package/dist/build/types/skin/controllers/keyboard.d.ts.map +0 -1
- package/dist/build/types/skin/controls/cast-button.d.ts +0 -15
- package/dist/build/types/skin/controls/cast-button.d.ts.map +0 -1
- package/dist/build/types/skin/controls/channel-name.d.ts +0 -16
- package/dist/build/types/skin/controls/channel-name.d.ts.map +0 -1
- package/dist/build/types/skin/controls/forward-button.d.ts +0 -15
- package/dist/build/types/skin/controls/forward-button.d.ts.map +0 -1
- package/dist/build/types/skin/controls/fullscreen-button.d.ts +0 -30
- package/dist/build/types/skin/controls/fullscreen-button.d.ts.map +0 -1
- package/dist/build/types/skin/controls/info-button.d.ts +0 -10
- package/dist/build/types/skin/controls/info-button.d.ts.map +0 -1
- package/dist/build/types/skin/controls/live-sync-button.d.ts +0 -20
- package/dist/build/types/skin/controls/live-sync-button.d.ts.map +0 -1
- package/dist/build/types/skin/controls/pip-button.d.ts +0 -21
- package/dist/build/types/skin/controls/pip-button.d.ts.map +0 -1
- package/dist/build/types/skin/controls/play-pause-button.d.ts +0 -14
- package/dist/build/types/skin/controls/play-pause-button.d.ts.map +0 -1
- package/dist/build/types/skin/controls/rewind-button.d.ts +0 -15
- package/dist/build/types/skin/controls/rewind-button.d.ts.map +0 -1
- package/dist/build/types/skin/controls/seekbar.d.ts +0 -48
- package/dist/build/types/skin/controls/seekbar.d.ts.map +0 -1
- package/dist/build/types/skin/controls/settings-panel.d.ts +0 -53
- package/dist/build/types/skin/controls/settings-panel.d.ts.map +0 -1
- package/dist/build/types/skin/controls/share-button.d.ts +0 -11
- package/dist/build/types/skin/controls/share-button.d.ts.map +0 -1
- package/dist/build/types/skin/controls/time-display.d.ts +0 -19
- package/dist/build/types/skin/controls/time-display.d.ts.map +0 -1
- package/dist/build/types/skin/controls/volume-control.d.ts +0 -21
- package/dist/build/types/skin/controls/volume-control.d.ts.map +0 -1
- package/dist/build/types/skin/icons/icons-modern.d.ts +0 -10
- package/dist/build/types/skin/icons/icons-modern.d.ts.map +0 -1
- package/dist/build/types/skin/icons/icons.d.ts +0 -10
- package/dist/build/types/skin/icons/icons.d.ts.map +0 -1
- package/dist/build/types/skin/icons/sprite.d.ts +0 -39
- package/dist/build/types/skin/icons/sprite.d.ts.map +0 -1
- package/dist/build/types/skin/index.d.ts +0 -24
- package/dist/build/types/skin/index.d.ts.map +0 -1
- package/dist/build/types/skin/overlays/error-message.d.ts +0 -14
- package/dist/build/types/skin/overlays/error-message.d.ts.map +0 -1
- package/dist/build/types/skin/overlays/info-overlay.d.ts +0 -15
- package/dist/build/types/skin/overlays/info-overlay.d.ts.map +0 -1
- package/dist/build/types/skin/overlays/loading-spinner.d.ts +0 -17
- package/dist/build/types/skin/overlays/loading-spinner.d.ts.map +0 -1
- package/dist/build/types/skin/overlays/preroll-overlay.d.ts +0 -39
- package/dist/build/types/skin/overlays/preroll-overlay.d.ts.map +0 -1
- package/dist/build/types/skin/overlays/socials-overlay.d.ts +0 -17
- package/dist/build/types/skin/overlays/socials-overlay.d.ts.map +0 -1
- package/dist/build/types/skin/overlays/toast-notification.d.ts +0 -18
- package/dist/build/types/skin/overlays/toast-notification.d.ts.map +0 -1
- package/dist/build/types/skin/skin-root.d.ts +0 -88
- package/dist/build/types/skin/skin-root.d.ts.map +0 -1
- package/dist/build/types/types.d.ts +0 -41
- package/dist/build/types/types.d.ts.map +0 -1
- package/dist/build/types/utils/chapters.d.ts +0 -16
- package/dist/build/types/utils/chapters.d.ts.map +0 -1
- package/dist/build/types/utils/format-duration.d.ts +0 -9
- package/dist/build/types/utils/format-duration.d.ts.map +0 -1
- package/dist/build/types/utils/format-wall-clock.d.ts +0 -6
- package/dist/build/types/utils/format-wall-clock.d.ts.map +0 -1
- package/dist/build/types/utils/settings-helpers.d.ts +0 -41
- package/dist/build/types/utils/settings-helpers.d.ts.map +0 -1
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* iOS HLS handler.
|
|
3
|
-
*
|
|
4
|
-
* Used when Hls.isSupported() returns false (native HLS on iOS Safari).
|
|
5
|
-
* Native video elements may not report correct duration for live streams,
|
|
6
|
-
* so this handler parses the HLS manifest directly to sum EXTINF durations.
|
|
7
|
-
*
|
|
8
|
-
* Fetches the master manifest, extracts the first child manifest URL,
|
|
9
|
-
* then polls every 5 seconds to keep duration up-to-date.
|
|
10
|
-
*/
|
|
11
|
-
interface IosHandlerData {
|
|
12
|
-
duration?: number;
|
|
13
|
-
}
|
|
14
|
-
interface IosHandler {
|
|
15
|
-
data: IosHandlerData;
|
|
16
|
-
destroy: () => void;
|
|
17
|
-
}
|
|
18
|
-
export declare function createIosHandler(src: string): IosHandler;
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=hls.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hls.d.ts","sourceRoot":"","sources":["../../../../../src/engines/ios/hls.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,UAAU,cAAc;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,UAAU,UAAU;IAClB,IAAI,EAAE,cAAc,CAAA;IACpB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CA2CxD"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Poster HLS handler.
|
|
3
|
-
*
|
|
4
|
-
* Used to play a looping HLS stream as a video poster/background.
|
|
5
|
-
* The Hls constructor is passed at attach-time (not imported) because
|
|
6
|
-
* hls.js is loaded from CDN at runtime.
|
|
7
|
-
*/
|
|
8
|
-
interface HlsMediaElement {
|
|
9
|
-
play: () => void;
|
|
10
|
-
pause: () => void;
|
|
11
|
-
}
|
|
12
|
-
interface HlsInstance {
|
|
13
|
-
loadSource: (src: string) => void;
|
|
14
|
-
attachMedia: (element: HTMLElement) => void;
|
|
15
|
-
detachMedia?: () => void;
|
|
16
|
-
destroy?: () => void;
|
|
17
|
-
media: HlsMediaElement;
|
|
18
|
-
}
|
|
19
|
-
interface HlsConstructor {
|
|
20
|
-
new (): HlsInstance;
|
|
21
|
-
}
|
|
22
|
-
interface AttachOptions {
|
|
23
|
-
src: string;
|
|
24
|
-
container: HTMLElement;
|
|
25
|
-
Hls: HlsConstructor;
|
|
26
|
-
}
|
|
27
|
-
interface PosterHandler {
|
|
28
|
-
attach: (options: AttachOptions) => void;
|
|
29
|
-
close: () => void;
|
|
30
|
-
play: () => void;
|
|
31
|
-
pause: () => void;
|
|
32
|
-
}
|
|
33
|
-
export declare function createPosterHandler(): PosterHandler;
|
|
34
|
-
export {};
|
|
35
|
-
//# sourceMappingURL=hls.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hls.d.ts","sourceRoot":"","sources":["../../../../../src/engines/poster/hls.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB;AAED,UAAU,WAAW;IACnB,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,WAAW,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAA;IAC3C,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,KAAK,EAAE,eAAe,CAAA;CACvB;AAED,UAAU,cAAc;IACtB,QAAO,WAAW,CAAA;CACnB;AAED,UAAU,aAAa;IACrB,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,EAAE,WAAW,CAAA;IACtB,GAAG,EAAE,cAAc,CAAA;CACpB;AAED,UAAU,aAAa;IACrB,MAAM,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAA;IACxC,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB;AAED,wBAAgB,mBAAmB,IAAI,aAAa,CA6BnD"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DASH retry settings.
|
|
3
|
-
*
|
|
4
|
-
* Applies infinite retry configuration to the dash.js driver so that
|
|
5
|
-
* transient network failures (segment fetch, manifest re-fetch, etc.)
|
|
6
|
-
* never permanently stop playback.
|
|
7
|
-
*/
|
|
8
|
-
interface DashDriverLike {
|
|
9
|
-
updateSettings: (settings: DashSettings) => void;
|
|
10
|
-
}
|
|
11
|
-
interface DashRetryIntervals {
|
|
12
|
-
MPD: number;
|
|
13
|
-
XLinkExpansion: number;
|
|
14
|
-
InitializationSegment: number;
|
|
15
|
-
IndexSegment: number;
|
|
16
|
-
MediaSegment: number;
|
|
17
|
-
BitstreamSwitchingSegment: number;
|
|
18
|
-
other: number;
|
|
19
|
-
lowLatencyReductionFactor: number;
|
|
20
|
-
}
|
|
21
|
-
interface DashRetryAttempts {
|
|
22
|
-
MPD: number;
|
|
23
|
-
XLinkExpansion: number;
|
|
24
|
-
InitializationSegment: number;
|
|
25
|
-
IndexSegment: number;
|
|
26
|
-
MediaSegment: number;
|
|
27
|
-
BitstreamSwitchingSegment: number;
|
|
28
|
-
other: number;
|
|
29
|
-
lowLatencyMultiplyFactor: number;
|
|
30
|
-
}
|
|
31
|
-
interface DashSettings {
|
|
32
|
-
streaming: {
|
|
33
|
-
retryIntervals?: DashRetryIntervals;
|
|
34
|
-
retryAttempts?: DashRetryAttempts;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
export declare function applyDashRetrySettings(driver: DashDriverLike): void;
|
|
38
|
-
export {};
|
|
39
|
-
//# sourceMappingURL=dash.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dash.d.ts","sourceRoot":"","sources":["../../../../../src/engines/retry/dash.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,UAAU,cAAc;IACtB,cAAc,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAA;CACjD;AAED,UAAU,kBAAkB;IAC1B,GAAG,EAAE,MAAM,CAAA;IACX,cAAc,EAAE,MAAM,CAAA;IACtB,qBAAqB,EAAE,MAAM,CAAA;IAC7B,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,yBAAyB,EAAE,MAAM,CAAA;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,yBAAyB,EAAE,MAAM,CAAA;CAClC;AAED,UAAU,iBAAiB;IACzB,GAAG,EAAE,MAAM,CAAA;IACX,cAAc,EAAE,MAAM,CAAA;IACtB,qBAAqB,EAAE,MAAM,CAAA;IAC7B,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,yBAAyB,EAAE,MAAM,CAAA;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,wBAAwB,EAAE,MAAM,CAAA;CACjC;AAED,UAAU,YAAY;IACpB,SAAS,EAAE;QACT,cAAc,CAAC,EAAE,kBAAkB,CAAA;QACnC,aAAa,CAAC,EAAE,iBAAiB,CAAA;KAClC,CAAA;CACF;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CA6BnE"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* HLS retry handler.
|
|
3
|
-
*
|
|
4
|
-
* Registers an hlsError listener on the hls.js driver and attempts
|
|
5
|
-
* automatic recovery:
|
|
6
|
-
* - Fatal mediaError: calls recoverMediaError() after 1s
|
|
7
|
-
* - Fatal keySystemError: unrecoverable (e.g. no HTTPS for DRM) — no retry
|
|
8
|
-
* - Fatal other error (intro pass): calls onFatalNetworkError() to fall through to main
|
|
9
|
-
* - Fatal other error (main pass): calls startLoad() after 1s (keeps retrying)
|
|
10
|
-
* - Non-fatal error: re-checks after 3s; if currentTime has not advanced
|
|
11
|
-
* (and Chromecast is not casting), applies the same recovery
|
|
12
|
-
*
|
|
13
|
-
* Non-fatal retries are capped to prevent infinite loops (e.g. keyLoadError
|
|
14
|
-
* where startLoad() triggers the same failing key request repeatedly).
|
|
15
|
-
* After the cap is reached, further events for that error are silently ignored.
|
|
16
|
-
*/
|
|
17
|
-
interface HlsDriverLike {
|
|
18
|
-
on: (event: string, handler: (event: string, data: HlsErrorData) => void) => void;
|
|
19
|
-
media: {
|
|
20
|
-
currentTime: number;
|
|
21
|
-
} | null;
|
|
22
|
-
recoverMediaError: () => void;
|
|
23
|
-
startLoad: (startPosition?: number) => void;
|
|
24
|
-
}
|
|
25
|
-
interface HlsErrorData {
|
|
26
|
-
fatal: boolean;
|
|
27
|
-
type: string;
|
|
28
|
-
details?: string;
|
|
29
|
-
}
|
|
30
|
-
interface EngineContext {
|
|
31
|
-
chromecast_casting?: boolean;
|
|
32
|
-
onUnrecoverableError?: (message: string) => void;
|
|
33
|
-
/**
|
|
34
|
-
* Called once when a fatal non-unrecoverable error occurs and the caller
|
|
35
|
-
* wants to give up rather than loop startLoad(). Intended for the intro
|
|
36
|
-
* pass so the player falls through to the main stream instead of retrying
|
|
37
|
-
* a permanently-unreachable intro manifest forever.
|
|
38
|
-
*
|
|
39
|
-
* When this callback is set, the fatal non-media/non-unrecoverable branch
|
|
40
|
-
* calls it and returns immediately (no startLoad loop). When absent the
|
|
41
|
-
* original retry-forever behavior is preserved (main stream resilience).
|
|
42
|
-
*/
|
|
43
|
-
onFatalNetworkError?: (errorKey: string) => void;
|
|
44
|
-
}
|
|
45
|
-
export declare function handleHlsRetry(driver: HlsDriverLike, engine?: EngineContext): void;
|
|
46
|
-
export {};
|
|
47
|
-
//# sourceMappingURL=hls.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hls.d.ts","sourceRoot":"","sources":["../../../../../src/engines/retry/hls.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,UAAU,aAAa;IACrB,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,KAAK,IAAI,KAAK,IAAI,CAAA;IACjF,KAAK,EAAE;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IACrC,iBAAiB,EAAE,MAAM,IAAI,CAAA;IAC7B,SAAS,EAAE,CAAC,aAAa,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;CAC5C;AAED,UAAU,YAAY;IACpB,KAAK,EAAE,OAAO,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,UAAU,aAAa;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,oBAAoB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAChD;;;;;;;;;OASG;IACH,mBAAmB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;CACjD;AAQD,wBAAgB,cAAc,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,EAAE,aAAa,GAAG,IAAI,CAmFlF"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DASH Snapshot Handler
|
|
3
|
-
*
|
|
4
|
-
* Ported from component/engines/snapshot/dash.js
|
|
5
|
-
*
|
|
6
|
-
* Creates a separate dash.js MediaPlayer instance for seekbar preview thumbnails.
|
|
7
|
-
* The snapshot player runs in an off-screen video element and is independent
|
|
8
|
-
* from the main playback player.
|
|
9
|
-
*/
|
|
10
|
-
interface DashPlayerInstance {
|
|
11
|
-
initialize: (element: HTMLVideoElement, src: string, autoplay: boolean) => void;
|
|
12
|
-
updateSettings: (settings: Record<string, unknown>) => void;
|
|
13
|
-
on: (event: string, handler: (data?: unknown) => void) => void;
|
|
14
|
-
off: (event: string, handler: (data?: unknown) => void) => void;
|
|
15
|
-
setMute: (muted: boolean) => void;
|
|
16
|
-
seek: (time: number) => void;
|
|
17
|
-
isPaused: () => boolean;
|
|
18
|
-
play: () => void;
|
|
19
|
-
pause: () => void;
|
|
20
|
-
reset: () => void;
|
|
21
|
-
}
|
|
22
|
-
interface DashPlayerFactory {
|
|
23
|
-
(): {
|
|
24
|
-
create: () => DashPlayerInstance;
|
|
25
|
-
};
|
|
26
|
-
events: Record<string, string>;
|
|
27
|
-
}
|
|
28
|
-
export interface DashjsForSnapshot {
|
|
29
|
-
MediaPlayer: DashPlayerFactory;
|
|
30
|
-
}
|
|
31
|
-
export interface SnapshotHandle {
|
|
32
|
-
take: (time: number) => void;
|
|
33
|
-
destroy: () => void;
|
|
34
|
-
video: HTMLVideoElement;
|
|
35
|
-
}
|
|
36
|
-
export declare class DashSnapshotHandler {
|
|
37
|
-
private readonly src;
|
|
38
|
-
private player;
|
|
39
|
-
private offscreenVideo;
|
|
40
|
-
private ready;
|
|
41
|
-
constructor(src: string);
|
|
42
|
-
/**
|
|
43
|
-
* Initialise the snapshot player using the provided dashjs constructor.
|
|
44
|
-
* Resolves with a SnapshotHandle once STREAM_INITIALIZED fires.
|
|
45
|
-
* If initialisation fails, resolves with a no-op handle.
|
|
46
|
-
*/
|
|
47
|
-
init(dashjs: DashjsForSnapshot): Promise<SnapshotHandle>;
|
|
48
|
-
/**
|
|
49
|
-
* Reset and destroy the snapshot player and remove the off-screen video element.
|
|
50
|
-
*/
|
|
51
|
-
destroy(): void;
|
|
52
|
-
private cleanup;
|
|
53
|
-
}
|
|
54
|
-
export {};
|
|
55
|
-
//# sourceMappingURL=dash.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dash.d.ts","sourceRoot":"","sources":["../../../../../src/engines/snapshot/dash.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,UAAU,kBAAkB;IAC1B,UAAU,EAAE,CAAC,OAAO,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAA;IAC/E,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;IAC3D,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK,IAAI,KAAK,IAAI,CAAA;IAC9D,GAAG,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK,IAAI,KAAK,IAAI,CAAA;IAC/D,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;IACjC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5B,QAAQ,EAAE,MAAM,OAAO,CAAA;IACvB,IAAI,EAAE,MAAM,IAAI,CAAA;IAChB,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB;AAED,UAAU,iBAAiB;IACzB,IAAI;QAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;KAAE,CAAA;IACxC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC/B;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,iBAAiB,CAAA;CAC/B;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,EAAE,gBAAgB,CAAA;CACxB;AAMD,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAQ;IAC5B,OAAO,CAAC,MAAM,CAAkC;IAChD,OAAO,CAAC,cAAc,CAAgC;IACtD,OAAO,CAAC,KAAK,CAAiB;gBAElB,GAAG,EAAE,MAAM;IAIvB;;;;OAIG;IACH,IAAI,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC;IAiFxD;;OAEG;IACH,OAAO,IAAI,IAAI;IAcf,OAAO,CAAC,OAAO;CAMhB"}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* HLS Snapshot Handler.
|
|
3
|
-
*
|
|
4
|
-
* Ported from component/engines/snapshot/hls.js (102 LOC).
|
|
5
|
-
*
|
|
6
|
-
* Creates a separate Hls instance for seekbar thumbnail preview rendering.
|
|
7
|
-
* The snapshot instance runs independently from the main playback engine with
|
|
8
|
-
* its own off-screen video element and low-buffer settings.
|
|
9
|
-
*
|
|
10
|
-
* Token injection (Pitfall 6): tokenManager is captured via closure,
|
|
11
|
-
* not stored on `this`, to avoid binding issues inside pLoader.
|
|
12
|
-
*/
|
|
13
|
-
import type { CDNTokenManager } from '../cdn-token-manager';
|
|
14
|
-
interface SnapshotLoaderContext {
|
|
15
|
-
url: string;
|
|
16
|
-
}
|
|
17
|
-
interface SnapshotLoaderCallbacks {
|
|
18
|
-
onSuccess: (response: unknown, stats: unknown, context: unknown) => void;
|
|
19
|
-
onError: (error: unknown, context: unknown, response: unknown) => void;
|
|
20
|
-
onTimeout: (stats: unknown, context: unknown, response: unknown) => void;
|
|
21
|
-
}
|
|
22
|
-
interface SnapshotLoaderConfig {
|
|
23
|
-
[key: string]: unknown;
|
|
24
|
-
}
|
|
25
|
-
interface SnapshotHlsLoaderClass {
|
|
26
|
-
new (config: SnapshotLoaderConfig): {
|
|
27
|
-
load: (context: SnapshotLoaderContext, config: SnapshotLoaderConfig, callbacks: SnapshotLoaderCallbacks) => void;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
interface SnapshotHlsDriverConfig {
|
|
31
|
-
startLevel?: number;
|
|
32
|
-
enableWebVTT?: boolean;
|
|
33
|
-
maxBufferLength?: number;
|
|
34
|
-
pLoader?: SnapshotHlsLoaderClass;
|
|
35
|
-
[key: string]: unknown;
|
|
36
|
-
}
|
|
37
|
-
interface SnapshotHlsEvents {
|
|
38
|
-
MANIFEST_LOADED: string;
|
|
39
|
-
[key: string]: string;
|
|
40
|
-
}
|
|
41
|
-
interface SnapshotHlsInstance {
|
|
42
|
-
on: (event: string, handler: (...args: unknown[]) => void) => void;
|
|
43
|
-
once: (event: string, handler: (...args: unknown[]) => void) => void;
|
|
44
|
-
trigger: (event: string, data?: unknown) => unknown;
|
|
45
|
-
loadSource: (src: string) => void;
|
|
46
|
-
attachMedia: (element: HTMLVideoElement) => void;
|
|
47
|
-
detachMedia: () => void;
|
|
48
|
-
destroy: () => void;
|
|
49
|
-
[key: string]: unknown;
|
|
50
|
-
}
|
|
51
|
-
interface SnapshotHlsConstructor {
|
|
52
|
-
new (config?: SnapshotHlsDriverConfig): SnapshotHlsInstance;
|
|
53
|
-
isSupported: () => boolean;
|
|
54
|
-
Events: SnapshotHlsEvents;
|
|
55
|
-
DefaultConfig: {
|
|
56
|
-
loader: SnapshotHlsLoaderClass;
|
|
57
|
-
[key: string]: unknown;
|
|
58
|
-
};
|
|
59
|
-
[key: string]: unknown;
|
|
60
|
-
}
|
|
61
|
-
export interface SnapshotConfig {
|
|
62
|
-
src?: string;
|
|
63
|
-
engineSettings?: {
|
|
64
|
-
extraParamsCallback?: ((status?: number | string) => Promise<Record<string, unknown>> | Record<string, unknown>) | null;
|
|
65
|
-
onCDNTokenError?: ((error: {
|
|
66
|
-
status: number | string;
|
|
67
|
-
errorCode: string;
|
|
68
|
-
errorType: string;
|
|
69
|
-
}) => void) | null;
|
|
70
|
-
[key: string]: unknown;
|
|
71
|
-
};
|
|
72
|
-
[key: string]: unknown;
|
|
73
|
-
}
|
|
74
|
-
export declare class HlsSnapshotHandler {
|
|
75
|
-
private readonly config;
|
|
76
|
-
private readonly tokenManager;
|
|
77
|
-
private driver;
|
|
78
|
-
private offscreenVideo;
|
|
79
|
-
private throttleTimeout;
|
|
80
|
-
private pendingSeekTime;
|
|
81
|
-
constructor(config: SnapshotConfig, tokenManager: CDNTokenManager | null);
|
|
82
|
-
/**
|
|
83
|
-
* Initialize the snapshot Hls instance using the CDN-loaded Hls constructor.
|
|
84
|
-
* Creates a separate Hls instance with minimal buffering for thumbnail generation.
|
|
85
|
-
*
|
|
86
|
-
* Returns a promise that resolves once the manifest is loaded and the snapshot
|
|
87
|
-
* handler is ready to serve seek thumbnails — matching the legacy Vue 2 behaviour
|
|
88
|
-
* where the handler only resolved after MANIFEST_LOADED.
|
|
89
|
-
*/
|
|
90
|
-
init(HlsConstructor: SnapshotHlsConstructor): Promise<void>;
|
|
91
|
-
/**
|
|
92
|
-
* Seek the snapshot player to the specified time.
|
|
93
|
-
* Throttled to avoid excessive seeks (250ms minimum interval).
|
|
94
|
-
*/
|
|
95
|
-
take(time: number): void;
|
|
96
|
-
private applyPendingSeek;
|
|
97
|
-
/**
|
|
98
|
-
* Returns the off-screen video element used for thumbnail rendering.
|
|
99
|
-
* The seekbar displays this element in the tooltip to show preview frames.
|
|
100
|
-
*/
|
|
101
|
-
getVideo(): HTMLVideoElement | null;
|
|
102
|
-
/**
|
|
103
|
-
* Stop manifest refreshes (and thus CDN token requests) while the main player is paused.
|
|
104
|
-
* For live streams, the snapshot hls.js instance continuously refreshes the manifest
|
|
105
|
-
* on the playlist interval — this prevents unnecessary generate calls during pause.
|
|
106
|
-
*/
|
|
107
|
-
stopLoad(): void;
|
|
108
|
-
/**
|
|
109
|
-
* Resume manifest refreshes when the main player resumes playback.
|
|
110
|
-
*/
|
|
111
|
-
startLoad(): void;
|
|
112
|
-
/**
|
|
113
|
-
* Destroy the snapshot Hls instance and clean up resources.
|
|
114
|
-
*/
|
|
115
|
-
destroy(): void;
|
|
116
|
-
}
|
|
117
|
-
export {};
|
|
118
|
-
//# sourceMappingURL=hls.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hls.d.ts","sourceRoot":"","sources":["../../../../../src/engines/snapshot/hls.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAO3D,UAAU,qBAAqB;IAC7B,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,UAAU,uBAAuB;IAC/B,SAAS,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IACxE,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAA;IACtE,SAAS,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAA;CACzE;AAED,UAAU,oBAAoB;IAC5B,CAAC,GAAG,E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;;;OAGG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAWxB,OAAO,CAAC,gBAAgB;IAOxB;;;OAGG;IACH,QAAQ,IAAI,gBAAgB,GAAG,IAAI;IAInC;;;;OAIG;IACH,QAAQ,IAAI,IAAI;IAMhB;;OAEG;IACH,SAAS,IAAI,IAAI;IAMjB;;OAEG;IACH,OAAO,IAAI,IAAI;CAmBhB"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* StallWatchdog - Automatic playback recovery for live streams.
|
|
3
|
-
*
|
|
4
|
-
* Detects silent stalls (video.currentTime not advancing) and escalates
|
|
5
|
-
* through recovery attempts before requesting a full stream reload.
|
|
6
|
-
*
|
|
7
|
-
* Ported from component/engines/common.js:
|
|
8
|
-
* startStallWatchdog / stopStallWatchdog / recoverFromStall
|
|
9
|
-
*
|
|
10
|
-
* Escalation sequence (10s interval):
|
|
11
|
-
* - Attempt 1 (10s stuck): calls onRecoverAttempt(1)
|
|
12
|
-
* - Attempt 2 (20s stuck): calls onRecoverAttempt(2)
|
|
13
|
-
* - Attempt 3 (30s stuck): calls onReloadRequired(), stops watchdog
|
|
14
|
-
*/
|
|
15
|
-
export interface StallWatchdogOptions {
|
|
16
|
-
video: HTMLVideoElement;
|
|
17
|
-
onRecoverAttempt: (attempt: number) => void;
|
|
18
|
-
onReloadRequired: () => void;
|
|
19
|
-
isCasting: () => boolean;
|
|
20
|
-
}
|
|
21
|
-
export declare class StallWatchdog {
|
|
22
|
-
private readonly video;
|
|
23
|
-
private readonly onRecoverAttempt;
|
|
24
|
-
private readonly onReloadRequired;
|
|
25
|
-
private readonly isCasting;
|
|
26
|
-
private intervalId;
|
|
27
|
-
private lastTime;
|
|
28
|
-
private stallAttempts;
|
|
29
|
-
constructor(options: StallWatchdogOptions);
|
|
30
|
-
/**
|
|
31
|
-
* Start the stall watchdog interval.
|
|
32
|
-
* Calls stop() first to ensure idempotent restart.
|
|
33
|
-
*/
|
|
34
|
-
start(): void;
|
|
35
|
-
/**
|
|
36
|
-
* Stop the stall watchdog and reset all internal state.
|
|
37
|
-
*/
|
|
38
|
-
stop(): void;
|
|
39
|
-
private tick;
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=stall-watchdog.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stall-watchdog.d.ts","sourceRoot":"","sources":["../../../../src/engines/stall-watchdog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,gBAAgB,CAAA;IACvB,gBAAgB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C,gBAAgB,EAAE,MAAM,IAAI,CAAA;IAC5B,SAAS,EAAE,MAAM,OAAO,CAAA;CACzB;AAED,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkB;IACxC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA2B;IAC5D,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAY;IAC7C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IAEzC,OAAO,CAAC,UAAU,CAA8C;IAChE,OAAO,CAAC,QAAQ,CAAsB;IACtC,OAAO,CAAC,aAAa,CAAY;gBAErB,OAAO,EAAE,oBAAoB;IAOzC;;;OAGG;IACH,KAAK,IAAI,IAAI;IAQb;;OAEG;IACH,IAAI,IAAI,IAAI;IASZ,OAAO,CAAC,IAAI;CA4Bb"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* EventMap defines the typed event names and their payload types.
|
|
3
|
-
* - void events: listener receives no arguments
|
|
4
|
-
* - payload events: listener receives the typed payload
|
|
5
|
-
*
|
|
6
|
-
* This type will be extended as more events are identified in Phase 2/3.
|
|
7
|
-
*/
|
|
8
|
-
export interface EventMap {
|
|
9
|
-
'request-reload': void;
|
|
10
|
-
'ad-complete': void;
|
|
11
|
-
'cast-stop': void;
|
|
12
|
-
'error-fatal': {
|
|
13
|
-
code: string;
|
|
14
|
-
message: string;
|
|
15
|
-
};
|
|
16
|
-
'cast-start': {
|
|
17
|
-
src: string;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
type EventListener<T> = T extends void ? () => void : (payload: T) => void;
|
|
21
|
-
type EmitArgs<K extends keyof EventMap> = EventMap[K] extends void ? [event: K] : [event: K, payload: EventMap[K]];
|
|
22
|
-
/**
|
|
23
|
-
* TypedEventBus provides signal-based inter-component communication.
|
|
24
|
-
* It is distinct from PlayerState (reactive values) — the EventBus handles
|
|
25
|
-
* one-shot signals and commands between components.
|
|
26
|
-
*
|
|
27
|
-
* Usage:
|
|
28
|
-
* bus.on('request-reload', () => reload())
|
|
29
|
-
* bus.emit('request-reload')
|
|
30
|
-
* bus.on('error-fatal', (payload) => handleError(payload), { signal: ac.signal })
|
|
31
|
-
*/
|
|
32
|
-
export declare class TypedEventBus {
|
|
33
|
-
private readonly listeners;
|
|
34
|
-
constructor();
|
|
35
|
-
/**
|
|
36
|
-
* Register a listener for the given event.
|
|
37
|
-
* Pass an AbortSignal via options to auto-remove the listener when the signal aborts.
|
|
38
|
-
*/
|
|
39
|
-
on<K extends keyof EventMap>(event: K, listener: EventListener<EventMap[K]>, options?: {
|
|
40
|
-
signal?: AbortSignal;
|
|
41
|
-
}): void;
|
|
42
|
-
/**
|
|
43
|
-
* Emit an event, calling all registered listeners.
|
|
44
|
-
* Void events require no payload argument; payload events require the payload.
|
|
45
|
-
*/
|
|
46
|
-
emit<K extends keyof EventMap>(...args: EmitArgs<K>): void;
|
|
47
|
-
/**
|
|
48
|
-
* Remove all listeners from all events.
|
|
49
|
-
* After calling dispose(), all subsequent emit calls are no-ops.
|
|
50
|
-
*/
|
|
51
|
-
dispose(): void;
|
|
52
|
-
}
|
|
53
|
-
export {};
|
|
54
|
-
//# sourceMappingURL=event-bus.d.ts.map
|
|
@@ -1 +0,0 @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**
|
|
2
|
-
* Finite State Machine for player playback state transitions.
|
|
3
|
-
*
|
|
4
|
-
* The TRANSITIONS map defines all valid state transitions. The Proxy set trap
|
|
5
|
-
* in player-state.ts calls isValidTransition to enforce these rules.
|
|
6
|
-
*/
|
|
7
|
-
export type PlaybackState = 'idle' | 'loading' | 'playing' | 'paused' | 'buffering' | 'error' | 'ended';
|
|
8
|
-
/**
|
|
9
|
-
* Maps each state to the set of states it may transition into.
|
|
10
|
-
*
|
|
11
|
-
* Design notes:
|
|
12
|
-
* - idle -> loading: initial load or post-stall reload
|
|
13
|
-
* - loading -> playing | error: stream starts or fails
|
|
14
|
-
* - playing -> paused | buffering | ended | error: normal playback events
|
|
15
|
-
* - paused -> playing | loading | idle: resume or stop
|
|
16
|
-
* - buffering -> playing | paused | idle | error: buffer recovered, user pause, or stall
|
|
17
|
-
* - buffering -> idle is needed for the stall-watchdog recovery path (kick off reload)
|
|
18
|
-
* - buffering -> paused is needed for live stream support (user pauses during buffer)
|
|
19
|
-
* - error -> loading: retry after error
|
|
20
|
-
* - ended -> loading | idle: restart playback or reset
|
|
21
|
-
*/
|
|
22
|
-
export declare const TRANSITIONS: Readonly<Record<PlaybackState, ReadonlyArray<PlaybackState>>>;
|
|
23
|
-
/**
|
|
24
|
-
* Returns true if transitioning from `from` to `to` is valid per the FSM.
|
|
25
|
-
*/
|
|
26
|
-
export declare function isValidTransition(from: PlaybackState, to: PlaybackState): boolean;
|
|
27
|
-
//# sourceMappingURL=fsm.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fsm.d.ts","sourceRoot":"","sources":["../../../src/core/fsm.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,SAAS,GACT,SAAS,GACT,QAAQ,GACR,WAAW,GACX,OAAO,GACP,OAAO,CAAA;AAEX;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,aAAa,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC,CAQrF,CAAA;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa,GAAG,OAAO,CAEjF"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Lightweight i18n module replacing Vue i18n.
|
|
3
|
-
*
|
|
4
|
-
* Translations are keyed using dot-notation (e.g., 'error.start').
|
|
5
|
-
* A KEY_MAP provides backward compatibility with the old full-sentence keys
|
|
6
|
-
* used in component/translations/ for Phase 2/3 compatibility.
|
|
7
|
-
*/
|
|
8
|
-
type LocaleMap = Record<string, string>;
|
|
9
|
-
type TranslationMap = Record<string, LocaleMap>;
|
|
10
|
-
/**
|
|
11
|
-
* KEY_MAP maps old full-sentence keys to new dot-notation keys.
|
|
12
|
-
* Provides Phase 2/3 backward compatibility with existing translation lookups.
|
|
13
|
-
*/
|
|
14
|
-
export declare const KEY_MAP: Record<string, string>;
|
|
15
|
-
/**
|
|
16
|
-
* I18n class provides translation and interpolation for the player UI.
|
|
17
|
-
* Designed to grow as skin components are ported in Phase 3.
|
|
18
|
-
*/
|
|
19
|
-
export declare class I18n {
|
|
20
|
-
private currentLocale;
|
|
21
|
-
private readonly translations;
|
|
22
|
-
constructor(locale?: string);
|
|
23
|
-
/**
|
|
24
|
-
* Add or extend translations at runtime.
|
|
25
|
-
* Useful for skin components adding their own translation keys in Phase 3.
|
|
26
|
-
*/
|
|
27
|
-
addTranslations(entries: TranslationMap): void;
|
|
28
|
-
/**
|
|
29
|
-
* Look up a translation key in the current locale.
|
|
30
|
-
* Falls back to English if not found in current locale.
|
|
31
|
-
* Falls back to the key string itself if not found in English either.
|
|
32
|
-
* Interpolates {variable} placeholders with provided values.
|
|
33
|
-
*/
|
|
34
|
-
t(key: string, vars?: Record<string, string | number>): string;
|
|
35
|
-
/**
|
|
36
|
-
* Replace {varName} placeholders in a template string with provided values.
|
|
37
|
-
* Unmatched placeholders are left unchanged.
|
|
38
|
-
*/
|
|
39
|
-
interpolate(template: string, vars: Record<string, string | number>): string;
|
|
40
|
-
/**
|
|
41
|
-
* Change the active locale for subsequent t() calls.
|
|
42
|
-
* Falls back to 'en' for unsupported locales.
|
|
43
|
-
*/
|
|
44
|
-
setLocale(locale: string): void;
|
|
45
|
-
/**
|
|
46
|
-
* Return the current active locale code.
|
|
47
|
-
*/
|
|
48
|
-
getLocale(): string;
|
|
49
|
-
}
|
|
50
|
-
export {};
|
|
51
|
-
//# sourceMappingURL=i18n.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../src/core/i18n.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,KAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AACvC,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;AAqB/C;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAE1C,CAAA;AAoBD;;;GAGG;AACH,qBAAa,IAAI;IACf,OAAO,CAAC,aAAa,CAAiB;IACtC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAgB;gBAEjC,MAAM,CAAC,EAAE,MAAM;IAK3B;;;OAGG;IACH,eAAe,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAM9C;;;;;OAKG;IACH,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM;IAqB9D;;;OAGG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM;IAO5E;;;OAGG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAI/B;;OAEG;IACH,SAAS,IAAI,MAAM;CAGpB"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* eb-player core public API barrel export.
|
|
3
|
-
*
|
|
4
|
-
* This file is the entry point for the Rollup build (rollup.config.ts).
|
|
5
|
-
* Import from this file to access all public core module exports.
|
|
6
|
-
*
|
|
7
|
-
* CSS import: base.css is imported here so Rollup's postcss plugin
|
|
8
|
-
* extracts it to dist/eb-player.css as part of the build.
|
|
9
|
-
*/
|
|
10
|
-
import './css/base.css';
|
|
11
|
-
export { PlaybackState, TRANSITIONS, isValidTransition } from './fsm';
|
|
12
|
-
export type { StateMap, Listener, PlayerState } from './types';
|
|
13
|
-
export { createPlayerState } from './player-state';
|
|
14
|
-
export { TypedEventBus } from './event-bus';
|
|
15
|
-
export type { EventMap } from './event-bus';
|
|
16
|
-
export { mergeConfig, DEFAULT_CONFIG } from './config';
|
|
17
|
-
export type { PlayerConfig, SkinColors, EngineSettings } from './config';
|
|
18
|
-
export { I18n } from './i18n';
|
|
19
|
-
export { PlayerController } from './lifecycle';
|
|
20
|
-
export { EngineStateSync } from './engine-state-sync';
|
|
21
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,gBAAgB,CAAA;AAGvB,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAGrE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAG9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAGlD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAG3C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AACtD,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAGxE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAG7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAG9C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { PlayerConfig } from '../core/config';
|
|
2
|
-
import type { PlayerState } from '../core/types';
|
|
3
|
-
import type { TypedEventBus } from '../core/event-bus';
|
|
4
|
-
/**
|
|
5
|
-
* AdsManager manages the IMA SDK preroll ad lifecycle.
|
|
6
|
-
*
|
|
7
|
-
* - Loads the IMA SDK from CDN via loadScript
|
|
8
|
-
* - Gates displayContainer.initialize() on a user gesture when config.autoplay is false
|
|
9
|
-
* (browser autoplay policy requirement — see Pitfall 2 in plan context)
|
|
10
|
-
* - Sets state.adPlaying based on IMA lifecycle events
|
|
11
|
-
* - Emits 'ad-complete' on TypedEventBus when all ads are done
|
|
12
|
-
* - Cleans up adsManager.destroy() and displayContainer.destroy() on abort
|
|
13
|
-
*/
|
|
14
|
-
export declare class AdsManager {
|
|
15
|
-
private imaAdsManager;
|
|
16
|
-
private imaDisplayContainer;
|
|
17
|
-
/**
|
|
18
|
-
* Initialize the IMA SDK preroll ad system.
|
|
19
|
-
* - Skips if config.ad is undefined
|
|
20
|
-
* - If !config.autoplay: waits for user click on video element before initializing
|
|
21
|
-
* (required by browser autoplay policies to avoid muted/blocked display contexts)
|
|
22
|
-
* - Loads IMA SDK, creates AdDisplayContainer, AdsLoader, and AdsRequest
|
|
23
|
-
* - Wires ad lifecycle events to PlayerState and TypedEventBus
|
|
24
|
-
*/
|
|
25
|
-
init(config: PlayerConfig, state: PlayerState, bus: TypedEventBus, video: HTMLVideoElement, adsContainer: HTMLElement, signal: AbortSignal): Promise<void>;
|
|
26
|
-
/**
|
|
27
|
-
* Wait for a click event on the video element.
|
|
28
|
-
* Used to satisfy browser autoplay policies when autoplay is disabled.
|
|
29
|
-
*
|
|
30
|
-
* WR-05: single-shot settle flag guards against the click-vs-abort race —
|
|
31
|
-
* Promise resolution is already idempotent but settled tightens the
|
|
32
|
-
* contract by ensuring listener cleanup happens exactly once for either
|
|
33
|
-
* outcome. Callers still distinguish outcomes via signal.aborted.
|
|
34
|
-
*/
|
|
35
|
-
private waitForUserGesture;
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=ads-manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ads-manager.d.ts","sourceRoot":"","sources":["../../../../src/integrations/ads-manager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAuEtD;;;;;;;;;GASG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,aAAa,CAA6B;IAClD,OAAO,CAAC,mBAAmB,CAAqC;IAEhE;;;;;;;OAOG;IACG,IAAI,CACR,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,WAAW,EAClB,GAAG,EAAE,aAAa,EAClB,KAAK,EAAE,gBAAgB,EACvB,YAAY,EAAE,WAAW,EACzB,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,IAAI,CAAC;IAmHhB;;;;;;;;OAQG;IACH,OAAO,CAAC,kBAAkB;CAkB3B"}
|