stormcloud-video-player 0.6.12 → 0.6.14

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/lib/index.d.cts CHANGED
@@ -36,7 +36,6 @@ interface StormcloudVideoPlayerConfig {
36
36
  disableFiller?: boolean;
37
37
  adTransitionGapMs?: number;
38
38
  singlePipelineMode?: boolean;
39
- mqttBrokerUrl?: string;
40
39
  }
41
40
  interface ClientInfo {
42
41
  brand: string;
@@ -128,6 +127,7 @@ declare class StormcloudVideoPlayer {
128
127
  private inAdBreak;
129
128
  private currentAdBreakStartWallClockMs;
130
129
  private expectedAdBreakDurationMs;
130
+ private scteAdBreakEndWallClockMs;
131
131
  private adStopTimerId;
132
132
  private adStartTimerId;
133
133
  private adFailsafeTimerId;
@@ -191,6 +191,9 @@ declare class StormcloudVideoPlayer {
191
191
  private parseScte35FromId3;
192
192
  private decodeId3ValueToText;
193
193
  private onScte35Marker;
194
+ private resolveScteBreakStartWallClockMs;
195
+ private setAdBreakDurationBoundary;
196
+ private scheduleAdStopAtBreakBoundary;
194
197
  private parseCueOutDuration;
195
198
  private parseCueOutCont;
196
199
  private parseAttributeList;
@@ -233,6 +236,7 @@ declare class StormcloudVideoPlayer {
233
236
  private clearAdFailsafeTimer;
234
237
  private logAdState;
235
238
  private getRemainingAdMs;
239
+ private getAdBreakEndWallClockMs;
236
240
  toggleMute(): void;
237
241
  toggleFullscreen(): Promise<void>;
238
242
  isMuted(): boolean;
@@ -3984,11 +3988,31 @@ type PlayerMetricFlags = {
3984
3988
  declare function sendInitialTracking(licenseKey?: string, context?: PlayerAnalyticsContext): Promise<void>;
3985
3989
  declare function sendHeartbeat(licenseKey?: string, context?: PlayerAnalyticsContext, flags?: PlayerMetricFlags): Promise<void>;
3986
3990
 
3991
+ type MQTTConfig = {
3992
+ enabled: boolean;
3993
+ brokerAddress: string;
3994
+ brokerPort: number;
3995
+ wsPort: number;
3996
+ username: string;
3997
+ password: string;
3998
+ topicPrefix: string;
3999
+ qos: 0 | 1 | 2;
4000
+ brokerUrl?: string;
4001
+ };
4002
+ declare const DEFAULT_MQTT_CONFIG: MQTTConfig;
4003
+ declare const mqttConfig: MQTTConfig;
4004
+ declare function applyMQTTConfig(overrides: Partial<MQTTConfig>): void;
4005
+ declare function isMQTTEnabled(): boolean;
4006
+ declare function buildMQTTBrokerUrl(): string;
4007
+ declare function buildPlayerTopic(licenseKey: string, channel: "metrics" | "impressions" | "heartbeat"): string;
4008
+
3987
4009
  type MQTTStatus = "disconnected" | "connecting" | "connected" | "error";
3988
4010
  declare function getMQTTStatus(): MQTTStatus;
3989
4011
  declare function isMQTTConnected(): boolean;
3990
4012
  declare function isMQTTConfigured(): boolean;
3991
- declare function initMQTTClient(url: string, _topicPrefix?: string): void;
4013
+ declare function configureMQTT(overrides: Partial<MQTTConfig>): void;
4014
+ declare function initMQTTClient(): void;
4015
+ declare function ensureMQTTClient(): void;
3992
4016
  declare function publishMQTT(topic: string, payload: Record<string, unknown>): boolean;
3993
4017
  declare function disconnectMQTT(): void;
3994
4018
 
@@ -4074,4 +4098,4 @@ interface VastAdLayer {
4074
4098
  }
4075
4099
  declare function createVastAdLayer(contentVideo: HTMLVideoElement, options?: VastAdLayerOptions): VastAdLayer;
4076
4100
 
4077
- export { type AdBreak, type AdSchedule, type BaseStormcloudPlayerProps, type BrowserInfo, type ClientInfo, type HeartbeatData, IS_BROWSER, IS_GLOBAL, IS_IOS, IS_SAFARI, type LateJoinPolicy, type MQTTStatus, type OnProgressProps, SUPPORTS_DASH, SUPPORTS_HLS, StormcloudPlayer, StormcloudVideoPlayer, StormcloudVideoPlayerComponent, type StormcloudVideoPlayerConfig, type StormcloudVideoPlayerProps, type TrackingData, type VastAdLayer, type VastAdLayerOptions, type VastAdLayerOptionsUpdate, type VastBidResponse, type VastManager, type VastManagerOptions, canPlay, createStormcloudPlayer, createVastAdLayer, createVastManager, StormcloudVideoPlayerComponent as default, detectBrowser, disconnectMQTT, getBrowserConfigOverrides, getBrowserID, getClientInfo, getMQTTStatus, initMQTTClient, initializePolyfills, isMQTTConfigured, isMQTTConnected, isMediaStream, lazy, logBrowserInfo, merge, omit, parseQuery, players, publishMQTT, randomString, sendHeartbeat, sendInitialTracking, supportsFeature, supportsModernJS, supportsWebKitPresentationMode };
4101
+ export { type AdBreak, type AdSchedule, type BaseStormcloudPlayerProps, type BrowserInfo, type ClientInfo, DEFAULT_MQTT_CONFIG, type HeartbeatData, IS_BROWSER, IS_GLOBAL, IS_IOS, IS_SAFARI, type LateJoinPolicy, type MQTTConfig, type MQTTStatus, type OnProgressProps, SUPPORTS_DASH, SUPPORTS_HLS, StormcloudPlayer, StormcloudVideoPlayer, StormcloudVideoPlayerComponent, type StormcloudVideoPlayerConfig, type StormcloudVideoPlayerProps, type TrackingData, type VastAdLayer, type VastAdLayerOptions, type VastAdLayerOptionsUpdate, type VastBidResponse, type VastManager, type VastManagerOptions, applyMQTTConfig, buildMQTTBrokerUrl, buildPlayerTopic, canPlay, configureMQTT, createStormcloudPlayer, createVastAdLayer, createVastManager, StormcloudVideoPlayerComponent as default, detectBrowser, disconnectMQTT, ensureMQTTClient, getBrowserConfigOverrides, getBrowserID, getClientInfo, getMQTTStatus, initMQTTClient, initializePolyfills, isMQTTConfigured, isMQTTConnected, isMQTTEnabled, isMediaStream, lazy, logBrowserInfo, merge, mqttConfig, omit, parseQuery, players, publishMQTT, randomString, sendHeartbeat, sendInitialTracking, supportsFeature, supportsModernJS, supportsWebKitPresentationMode };
package/lib/index.d.ts CHANGED
@@ -36,7 +36,6 @@ interface StormcloudVideoPlayerConfig {
36
36
  disableFiller?: boolean;
37
37
  adTransitionGapMs?: number;
38
38
  singlePipelineMode?: boolean;
39
- mqttBrokerUrl?: string;
40
39
  }
41
40
  interface ClientInfo {
42
41
  brand: string;
@@ -128,6 +127,7 @@ declare class StormcloudVideoPlayer {
128
127
  private inAdBreak;
129
128
  private currentAdBreakStartWallClockMs;
130
129
  private expectedAdBreakDurationMs;
130
+ private scteAdBreakEndWallClockMs;
131
131
  private adStopTimerId;
132
132
  private adStartTimerId;
133
133
  private adFailsafeTimerId;
@@ -191,6 +191,9 @@ declare class StormcloudVideoPlayer {
191
191
  private parseScte35FromId3;
192
192
  private decodeId3ValueToText;
193
193
  private onScte35Marker;
194
+ private resolveScteBreakStartWallClockMs;
195
+ private setAdBreakDurationBoundary;
196
+ private scheduleAdStopAtBreakBoundary;
194
197
  private parseCueOutDuration;
195
198
  private parseCueOutCont;
196
199
  private parseAttributeList;
@@ -233,6 +236,7 @@ declare class StormcloudVideoPlayer {
233
236
  private clearAdFailsafeTimer;
234
237
  private logAdState;
235
238
  private getRemainingAdMs;
239
+ private getAdBreakEndWallClockMs;
236
240
  toggleMute(): void;
237
241
  toggleFullscreen(): Promise<void>;
238
242
  isMuted(): boolean;
@@ -3984,11 +3988,31 @@ type PlayerMetricFlags = {
3984
3988
  declare function sendInitialTracking(licenseKey?: string, context?: PlayerAnalyticsContext): Promise<void>;
3985
3989
  declare function sendHeartbeat(licenseKey?: string, context?: PlayerAnalyticsContext, flags?: PlayerMetricFlags): Promise<void>;
3986
3990
 
3991
+ type MQTTConfig = {
3992
+ enabled: boolean;
3993
+ brokerAddress: string;
3994
+ brokerPort: number;
3995
+ wsPort: number;
3996
+ username: string;
3997
+ password: string;
3998
+ topicPrefix: string;
3999
+ qos: 0 | 1 | 2;
4000
+ brokerUrl?: string;
4001
+ };
4002
+ declare const DEFAULT_MQTT_CONFIG: MQTTConfig;
4003
+ declare const mqttConfig: MQTTConfig;
4004
+ declare function applyMQTTConfig(overrides: Partial<MQTTConfig>): void;
4005
+ declare function isMQTTEnabled(): boolean;
4006
+ declare function buildMQTTBrokerUrl(): string;
4007
+ declare function buildPlayerTopic(licenseKey: string, channel: "metrics" | "impressions" | "heartbeat"): string;
4008
+
3987
4009
  type MQTTStatus = "disconnected" | "connecting" | "connected" | "error";
3988
4010
  declare function getMQTTStatus(): MQTTStatus;
3989
4011
  declare function isMQTTConnected(): boolean;
3990
4012
  declare function isMQTTConfigured(): boolean;
3991
- declare function initMQTTClient(url: string, _topicPrefix?: string): void;
4013
+ declare function configureMQTT(overrides: Partial<MQTTConfig>): void;
4014
+ declare function initMQTTClient(): void;
4015
+ declare function ensureMQTTClient(): void;
3992
4016
  declare function publishMQTT(topic: string, payload: Record<string, unknown>): boolean;
3993
4017
  declare function disconnectMQTT(): void;
3994
4018
 
@@ -4074,4 +4098,4 @@ interface VastAdLayer {
4074
4098
  }
4075
4099
  declare function createVastAdLayer(contentVideo: HTMLVideoElement, options?: VastAdLayerOptions): VastAdLayer;
4076
4100
 
4077
- export { type AdBreak, type AdSchedule, type BaseStormcloudPlayerProps, type BrowserInfo, type ClientInfo, type HeartbeatData, IS_BROWSER, IS_GLOBAL, IS_IOS, IS_SAFARI, type LateJoinPolicy, type MQTTStatus, type OnProgressProps, SUPPORTS_DASH, SUPPORTS_HLS, StormcloudPlayer, StormcloudVideoPlayer, StormcloudVideoPlayerComponent, type StormcloudVideoPlayerConfig, type StormcloudVideoPlayerProps, type TrackingData, type VastAdLayer, type VastAdLayerOptions, type VastAdLayerOptionsUpdate, type VastBidResponse, type VastManager, type VastManagerOptions, canPlay, createStormcloudPlayer, createVastAdLayer, createVastManager, StormcloudVideoPlayerComponent as default, detectBrowser, disconnectMQTT, getBrowserConfigOverrides, getBrowserID, getClientInfo, getMQTTStatus, initMQTTClient, initializePolyfills, isMQTTConfigured, isMQTTConnected, isMediaStream, lazy, logBrowserInfo, merge, omit, parseQuery, players, publishMQTT, randomString, sendHeartbeat, sendInitialTracking, supportsFeature, supportsModernJS, supportsWebKitPresentationMode };
4101
+ export { type AdBreak, type AdSchedule, type BaseStormcloudPlayerProps, type BrowserInfo, type ClientInfo, DEFAULT_MQTT_CONFIG, type HeartbeatData, IS_BROWSER, IS_GLOBAL, IS_IOS, IS_SAFARI, type LateJoinPolicy, type MQTTConfig, type MQTTStatus, type OnProgressProps, SUPPORTS_DASH, SUPPORTS_HLS, StormcloudPlayer, StormcloudVideoPlayer, StormcloudVideoPlayerComponent, type StormcloudVideoPlayerConfig, type StormcloudVideoPlayerProps, type TrackingData, type VastAdLayer, type VastAdLayerOptions, type VastAdLayerOptionsUpdate, type VastBidResponse, type VastManager, type VastManagerOptions, applyMQTTConfig, buildMQTTBrokerUrl, buildPlayerTopic, canPlay, configureMQTT, createStormcloudPlayer, createVastAdLayer, createVastManager, StormcloudVideoPlayerComponent as default, detectBrowser, disconnectMQTT, ensureMQTTClient, getBrowserConfigOverrides, getBrowserID, getClientInfo, getMQTTStatus, initMQTTClient, initializePolyfills, isMQTTConfigured, isMQTTConnected, isMQTTEnabled, isMediaStream, lazy, logBrowserInfo, merge, mqttConfig, omit, parseQuery, players, publishMQTT, randomString, sendHeartbeat, sendInitialTracking, supportsFeature, supportsModernJS, supportsWebKitPresentationMode };