stormcloud-video-player 0.3.65 → 0.3.66
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/stormcloud-vp.min.js +1 -1
- package/lib/index.cjs +15 -0
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +20 -19
- package/lib/index.d.ts +20 -19
- package/lib/index.js +15 -0
- package/lib/index.js.map +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +18 -0
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/player/StormcloudVideoPlayer.d.cts +1 -0
- package/lib/players/HlsPlayer.cjs +18 -0
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/index.cjs +18 -0
- package/lib/players/index.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +18 -0
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/package.json +1 -1
|
@@ -134,6 +134,7 @@ declare class StormcloudVideoPlayer {
|
|
|
134
134
|
private initializeTracking;
|
|
135
135
|
private sendHeartbeatIfNeeded;
|
|
136
136
|
private isVmapEnabled;
|
|
137
|
+
private applyMqttConfigFromResponse;
|
|
137
138
|
private fetchAdConfiguration;
|
|
138
139
|
private fetchAndParseVmap;
|
|
139
140
|
private parseVmapToBreaks;
|
|
@@ -2442,6 +2442,9 @@ var DEFAULT_MQTT_CONFIG = {
|
|
|
2442
2442
|
qos: 1
|
|
2443
2443
|
};
|
|
2444
2444
|
var mqttConfig = _object_spread({}, DEFAULT_MQTT_CONFIG);
|
|
2445
|
+
function applyMQTTConfig(overrides) {
|
|
2446
|
+
Object.assign(mqttConfig, overrides);
|
|
2447
|
+
}
|
|
2445
2448
|
function isMQTTEnabled() {
|
|
2446
2449
|
return mqttConfig.enabled;
|
|
2447
2450
|
}
|
|
@@ -5416,6 +5419,20 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
5416
5419
|
return !!(this.config.isVmap && ((_this_config_vmapUrl = this.config.vmapUrl) === null || _this_config_vmapUrl === void 0 ? void 0 : _this_config_vmapUrl.trim()));
|
|
5417
5420
|
}
|
|
5418
5421
|
},
|
|
5422
|
+
{
|
|
5423
|
+
key: "applyMqttConfigFromResponse",
|
|
5424
|
+
value: function applyMqttConfigFromResponse(data) {
|
|
5425
|
+
var _data_response;
|
|
5426
|
+
var mqttConfig2 = (_data_response = data.response) === null || _data_response === void 0 ? void 0 : _data_response.mqtt_config;
|
|
5427
|
+
if (!mqttConfig2 || (typeof mqttConfig2 === "undefined" ? "undefined" : _type_of(mqttConfig2)) !== "object") {
|
|
5428
|
+
return;
|
|
5429
|
+
}
|
|
5430
|
+
applyMQTTConfig(mqttConfig2);
|
|
5431
|
+
if (this.config.debugAdTiming) {
|
|
5432
|
+
console.log("[StormcloudVideoPlayer] Applied MQTT config from /ads/web:", mqttConfig2);
|
|
5433
|
+
}
|
|
5434
|
+
}
|
|
5435
|
+
},
|
|
5419
5436
|
{
|
|
5420
5437
|
key: "fetchAdConfiguration",
|
|
5421
5438
|
value: function fetchAdConfiguration() {
|
|
@@ -5502,6 +5519,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
5502
5519
|
];
|
|
5503
5520
|
case 4:
|
|
5504
5521
|
data = _state.sent();
|
|
5522
|
+
this.applyMqttConfigFromResponse(data);
|
|
5505
5523
|
imaPayload = (_data_response = data.response) === null || _data_response === void 0 ? void 0 : (_data_response_ima = _data_response.ima) === null || _data_response_ima === void 0 ? void 0 : (_data_response_ima_publisherdeskima = _data_response_ima["publisherdesk.ima"]) === null || _data_response_ima_publisherdeskima === void 0 ? void 0 : _data_response_ima_publisherdeskima.payload;
|
|
5506
5524
|
if (imaPayload) {
|
|
5507
5525
|
this.apiVastTagUrl = decodeURIComponent(imaPayload);
|