stormcloud-video-player 0.6.11 → 0.6.13
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/README.md +33 -294
- package/dist/stormcloud-vp.min.js +3 -1
- package/lib/index.cjs +265 -191
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +29 -1
- package/lib/index.d.ts +29 -1
- package/lib/index.js +210 -192
- package/lib/index.js.map +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +193 -191
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.cjs +193 -191
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/index.cjs +193 -191
- package/lib/players/index.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +193 -191
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/utils/mqttClient.cjs +245 -0
- package/lib/utils/mqttClient.cjs.map +1 -0
- package/lib/utils/mqttClient.d.cts +13 -0
- package/lib/utils/mqttConfig.cjs +136 -0
- package/lib/utils/mqttConfig.cjs.map +1 -0
- package/lib/utils/mqttConfig.d.cts +19 -0
- package/lib/utils/tracking.cjs +193 -191
- package/lib/utils/tracking.cjs.map +1 -1
- package/package.json +3 -3
package/lib/index.d.cts
CHANGED
|
@@ -3983,6 +3983,34 @@ type PlayerMetricFlags = {
|
|
|
3983
3983
|
declare function sendInitialTracking(licenseKey?: string, context?: PlayerAnalyticsContext): Promise<void>;
|
|
3984
3984
|
declare function sendHeartbeat(licenseKey?: string, context?: PlayerAnalyticsContext, flags?: PlayerMetricFlags): Promise<void>;
|
|
3985
3985
|
|
|
3986
|
+
type MQTTConfig = {
|
|
3987
|
+
enabled: boolean;
|
|
3988
|
+
brokerAddress: string;
|
|
3989
|
+
brokerPort: number;
|
|
3990
|
+
wsPort: number;
|
|
3991
|
+
username: string;
|
|
3992
|
+
password: string;
|
|
3993
|
+
topicPrefix: string;
|
|
3994
|
+
qos: 0 | 1 | 2;
|
|
3995
|
+
brokerUrl?: string;
|
|
3996
|
+
};
|
|
3997
|
+
declare const DEFAULT_MQTT_CONFIG: MQTTConfig;
|
|
3998
|
+
declare const mqttConfig: MQTTConfig;
|
|
3999
|
+
declare function applyMQTTConfig(overrides: Partial<MQTTConfig>): void;
|
|
4000
|
+
declare function isMQTTEnabled(): boolean;
|
|
4001
|
+
declare function buildMQTTBrokerUrl(): string;
|
|
4002
|
+
declare function buildPlayerTopic(licenseKey: string, channel: "metrics" | "impressions" | "heartbeat"): string;
|
|
4003
|
+
|
|
4004
|
+
type MQTTStatus = "disconnected" | "connecting" | "connected" | "error";
|
|
4005
|
+
declare function getMQTTStatus(): MQTTStatus;
|
|
4006
|
+
declare function isMQTTConnected(): boolean;
|
|
4007
|
+
declare function isMQTTConfigured(): boolean;
|
|
4008
|
+
declare function configureMQTT(overrides: Partial<MQTTConfig>): void;
|
|
4009
|
+
declare function initMQTTClient(): void;
|
|
4010
|
+
declare function ensureMQTTClient(): void;
|
|
4011
|
+
declare function publishMQTT(topic: string, payload: Record<string, unknown>): boolean;
|
|
4012
|
+
declare function disconnectMQTT(): void;
|
|
4013
|
+
|
|
3986
4014
|
declare function initializePolyfills(): void;
|
|
3987
4015
|
|
|
3988
4016
|
interface NavigatorUAData {
|
|
@@ -4065,4 +4093,4 @@ interface VastAdLayer {
|
|
|
4065
4093
|
}
|
|
4066
4094
|
declare function createVastAdLayer(contentVideo: HTMLVideoElement, options?: VastAdLayerOptions): VastAdLayer;
|
|
4067
4095
|
|
|
4068
|
-
export { type AdBreak, type AdSchedule, type BaseStormcloudPlayerProps, type BrowserInfo, type ClientInfo, type HeartbeatData, IS_BROWSER, IS_GLOBAL, IS_IOS, IS_SAFARI, type LateJoinPolicy, 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, getBrowserConfigOverrides, getBrowserID, getClientInfo, initializePolyfills, isMediaStream, lazy, logBrowserInfo, merge, omit, parseQuery, players, randomString, sendHeartbeat, sendInitialTracking, supportsFeature, supportsModernJS, supportsWebKitPresentationMode };
|
|
4096
|
+
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
|
@@ -3983,6 +3983,34 @@ type PlayerMetricFlags = {
|
|
|
3983
3983
|
declare function sendInitialTracking(licenseKey?: string, context?: PlayerAnalyticsContext): Promise<void>;
|
|
3984
3984
|
declare function sendHeartbeat(licenseKey?: string, context?: PlayerAnalyticsContext, flags?: PlayerMetricFlags): Promise<void>;
|
|
3985
3985
|
|
|
3986
|
+
type MQTTConfig = {
|
|
3987
|
+
enabled: boolean;
|
|
3988
|
+
brokerAddress: string;
|
|
3989
|
+
brokerPort: number;
|
|
3990
|
+
wsPort: number;
|
|
3991
|
+
username: string;
|
|
3992
|
+
password: string;
|
|
3993
|
+
topicPrefix: string;
|
|
3994
|
+
qos: 0 | 1 | 2;
|
|
3995
|
+
brokerUrl?: string;
|
|
3996
|
+
};
|
|
3997
|
+
declare const DEFAULT_MQTT_CONFIG: MQTTConfig;
|
|
3998
|
+
declare const mqttConfig: MQTTConfig;
|
|
3999
|
+
declare function applyMQTTConfig(overrides: Partial<MQTTConfig>): void;
|
|
4000
|
+
declare function isMQTTEnabled(): boolean;
|
|
4001
|
+
declare function buildMQTTBrokerUrl(): string;
|
|
4002
|
+
declare function buildPlayerTopic(licenseKey: string, channel: "metrics" | "impressions" | "heartbeat"): string;
|
|
4003
|
+
|
|
4004
|
+
type MQTTStatus = "disconnected" | "connecting" | "connected" | "error";
|
|
4005
|
+
declare function getMQTTStatus(): MQTTStatus;
|
|
4006
|
+
declare function isMQTTConnected(): boolean;
|
|
4007
|
+
declare function isMQTTConfigured(): boolean;
|
|
4008
|
+
declare function configureMQTT(overrides: Partial<MQTTConfig>): void;
|
|
4009
|
+
declare function initMQTTClient(): void;
|
|
4010
|
+
declare function ensureMQTTClient(): void;
|
|
4011
|
+
declare function publishMQTT(topic: string, payload: Record<string, unknown>): boolean;
|
|
4012
|
+
declare function disconnectMQTT(): void;
|
|
4013
|
+
|
|
3986
4014
|
declare function initializePolyfills(): void;
|
|
3987
4015
|
|
|
3988
4016
|
interface NavigatorUAData {
|
|
@@ -4065,4 +4093,4 @@ interface VastAdLayer {
|
|
|
4065
4093
|
}
|
|
4066
4094
|
declare function createVastAdLayer(contentVideo: HTMLVideoElement, options?: VastAdLayerOptions): VastAdLayer;
|
|
4067
4095
|
|
|
4068
|
-
export { type AdBreak, type AdSchedule, type BaseStormcloudPlayerProps, type BrowserInfo, type ClientInfo, type HeartbeatData, IS_BROWSER, IS_GLOBAL, IS_IOS, IS_SAFARI, type LateJoinPolicy, 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, getBrowserConfigOverrides, getBrowserID, getClientInfo, initializePolyfills, isMediaStream, lazy, logBrowserInfo, merge, omit, parseQuery, players, randomString, sendHeartbeat, sendInitialTracking, supportsFeature, supportsModernJS, supportsWebKitPresentationMode };
|
|
4096
|
+
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 };
|