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.
@@ -2390,6 +2390,9 @@ var DEFAULT_MQTT_CONFIG = {
2390
2390
  qos: 1
2391
2391
  };
2392
2392
  var mqttConfig = _object_spread({}, DEFAULT_MQTT_CONFIG);
2393
+ function applyMQTTConfig(overrides) {
2394
+ Object.assign(mqttConfig, overrides);
2395
+ }
2393
2396
  function isMQTTEnabled() {
2394
2397
  return mqttConfig.enabled;
2395
2398
  }
@@ -5364,6 +5367,20 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
5364
5367
  return !!(this.config.isVmap && ((_this_config_vmapUrl = this.config.vmapUrl) === null || _this_config_vmapUrl === void 0 ? void 0 : _this_config_vmapUrl.trim()));
5365
5368
  }
5366
5369
  },
5370
+ {
5371
+ key: "applyMqttConfigFromResponse",
5372
+ value: function applyMqttConfigFromResponse(data) {
5373
+ var _data_response;
5374
+ var mqttConfig2 = (_data_response = data.response) === null || _data_response === void 0 ? void 0 : _data_response.mqtt_config;
5375
+ if (!mqttConfig2 || (typeof mqttConfig2 === "undefined" ? "undefined" : _type_of(mqttConfig2)) !== "object") {
5376
+ return;
5377
+ }
5378
+ applyMQTTConfig(mqttConfig2);
5379
+ if (this.config.debugAdTiming) {
5380
+ console.log("[StormcloudVideoPlayer] Applied MQTT config from /ads/web:", mqttConfig2);
5381
+ }
5382
+ }
5383
+ },
5367
5384
  {
5368
5385
  key: "fetchAdConfiguration",
5369
5386
  value: function fetchAdConfiguration() {
@@ -5450,6 +5467,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
5450
5467
  ];
5451
5468
  case 4:
5452
5469
  data = _state.sent();
5470
+ this.applyMqttConfigFromResponse(data);
5453
5471
  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;
5454
5472
  if (imaPayload) {
5455
5473
  this.apiVastTagUrl = decodeURIComponent(imaPayload);