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.
@@ -2428,6 +2428,9 @@ var DEFAULT_MQTT_CONFIG = {
2428
2428
  qos: 1
2429
2429
  };
2430
2430
  var mqttConfig = _object_spread({}, DEFAULT_MQTT_CONFIG);
2431
+ function applyMQTTConfig(overrides) {
2432
+ Object.assign(mqttConfig, overrides);
2433
+ }
2431
2434
  function isMQTTEnabled() {
2432
2435
  return mqttConfig.enabled;
2433
2436
  }
@@ -5402,6 +5405,20 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
5402
5405
  return !!(this.config.isVmap && ((_this_config_vmapUrl = this.config.vmapUrl) === null || _this_config_vmapUrl === void 0 ? void 0 : _this_config_vmapUrl.trim()));
5403
5406
  }
5404
5407
  },
5408
+ {
5409
+ key: "applyMqttConfigFromResponse",
5410
+ value: function applyMqttConfigFromResponse(data) {
5411
+ var _data_response;
5412
+ var mqttConfig2 = (_data_response = data.response) === null || _data_response === void 0 ? void 0 : _data_response.mqtt_config;
5413
+ if (!mqttConfig2 || (typeof mqttConfig2 === "undefined" ? "undefined" : _type_of(mqttConfig2)) !== "object") {
5414
+ return;
5415
+ }
5416
+ applyMQTTConfig(mqttConfig2);
5417
+ if (this.config.debugAdTiming) {
5418
+ console.log("[StormcloudVideoPlayer] Applied MQTT config from /ads/web:", mqttConfig2);
5419
+ }
5420
+ }
5421
+ },
5405
5422
  {
5406
5423
  key: "fetchAdConfiguration",
5407
5424
  value: function fetchAdConfiguration() {
@@ -5488,6 +5505,7 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
5488
5505
  ];
5489
5506
  case 4:
5490
5507
  data = _state.sent();
5508
+ this.applyMqttConfigFromResponse(data);
5491
5509
  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;
5492
5510
  if (imaPayload) {
5493
5511
  this.apiVastTagUrl = decodeURIComponent(imaPayload);