@vizbeetv/sdk 7.8.40 → 7.8.52

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.
@@ -0,0 +1,27 @@
1
+ // ---------------------------------------------------------------------------
2
+ // Vizbee TV SDK — Chromecast CAF (v3, cast.framework) type entry point
3
+ // ---------------------------------------------------------------------------
4
+ //
5
+ // Consumer usage:
6
+ // import vizbee, { VideoInfo, PlayerAdapter } from '@vizbee/sdk/chromecast-caf';
7
+ //
8
+ // This is the modern CAF (Cast Application Framework, v3) Chromecast receiver
9
+ // integration. The SDK is initialised via the V2 continuity API:
10
+ // vizbee.continuity.ContinuityContext.getInstance().start(appId)
11
+ // ---------------------------------------------------------------------------
12
+
13
+ import type { VizbeeSDK } from './index.js';
14
+
15
+ export * from './index.js';
16
+
17
+ declare const vizbee: VizbeeSDK;
18
+ export default vizbee;
19
+
20
+ declare global {
21
+ interface Window {
22
+ /** Vizbee TV SDK singleton (Chromecast CAF / v3). */
23
+ VizbeeSDK: VizbeeSDK;
24
+ /** Alias for window.VizbeeSDK — set by the SDK bootstrap. */
25
+ vizbee: VizbeeSDK;
26
+ }
27
+ }
@@ -0,0 +1,63 @@
1
+ // ---------------------------------------------------------------------------
2
+ // Vizbee TV SDK — Chromecast v2 (MediaManager) type entry point
3
+ // ---------------------------------------------------------------------------
4
+ //
5
+ // Consumer usage:
6
+ // import vizbee, { VideoInfo, PlayerAdapter } from '@vizbee/sdk/chromecast-v2';
7
+ //
8
+ // This is the legacy MediaManager (non-CAF) Chromecast integration.
9
+ // The SDK is initialised via the V2 continuity API:
10
+ // vizbee.continuity.ContinuityContext.getInstance().start(appId)
11
+ // ---------------------------------------------------------------------------
12
+
13
+ import type { VideoStatus, VizbeeSDK } from './index.js';
14
+
15
+ export * from './index.js';
16
+
17
+ // ========================
18
+ // Chromecast v2 — ad status fields
19
+ //
20
+ // The SDK polls the host app's videoInfoGetter() on every tick. For ad
21
+ // tracking to work, the returned object must include these fields alongside
22
+ // the regular VideoStatus properties. ChromecastStatusPoller reads:
23
+ // status.isPlayingAd → switches the pipeline to the ad channel
24
+ // status.adPosition → current ad playback position (ms)
25
+ // status.adDuration → total ad duration (ms)
26
+ // ========================
27
+
28
+ /**
29
+ * Extended video status for Chromecast v2 (MediaManager) ad tracking.
30
+ * Return this from your `setVideoInfoGetter` callback while an ad is playing.
31
+ *
32
+ * @example
33
+ * const { VideoStatus } = vizbee.continuity.messages;
34
+ * playerAdapter.setVideoInfoGetter((): ChromecastVideoStatus => {
35
+ * const s = new VideoStatus() as ChromecastVideoStatus;
36
+ * s.guid = currentGuid;
37
+ * s.currentPosition = player.getCurrentTime();
38
+ * s.isPlayingAd = adManager.isAdPlaying();
39
+ * s.adPosition = adManager.getAdCurrentTime();
40
+ * s.adDuration = adManager.getAdDuration();
41
+ * return s;
42
+ * });
43
+ */
44
+ export interface ChromecastVideoStatus extends VideoStatus {
45
+ /** True while an ad is actively playing; false (or omitted) during content. */
46
+ isPlayingAd: boolean;
47
+ /** Current ad playback position in milliseconds. */
48
+ adPosition?: number;
49
+ /** Total ad duration in milliseconds. */
50
+ adDuration?: number;
51
+ }
52
+
53
+ declare const vizbee: VizbeeSDK;
54
+ export default vizbee;
55
+
56
+ declare global {
57
+ interface Window {
58
+ /** Vizbee TV SDK singleton (Chromecast v2 / MediaManager). */
59
+ VizbeeSDK: VizbeeSDK;
60
+ /** Alias for window.VizbeeSDK — set by the SDK bootstrap. */
61
+ vizbee: VizbeeSDK;
62
+ }
63
+ }