stormcloud-video-player 0.8.35 → 0.8.36

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.
@@ -1906,6 +1906,9 @@ var DEFAULT_MQTT_CONFIG = {
1906
1906
  qos: 1
1907
1907
  };
1908
1908
  var mqttConfig = _object_spread({}, DEFAULT_MQTT_CONFIG);
1909
+ function applyMQTTConfig(overrides) {
1910
+ Object.assign(mqttConfig, overrides);
1911
+ }
1909
1912
  function isMQTTEnabled() {
1910
1913
  return mqttConfig.enabled;
1911
1914
  }
@@ -5077,6 +5080,7 @@ var AdConfigManager = /*#__PURE__*/ function() {
5077
5080
  ];
5078
5081
  case 4:
5079
5082
  data = _state.sent();
5083
+ this.applyMqttConfigFromResponse(data);
5080
5084
  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;
5081
5085
  if (imaPayload) {
5082
5086
  decodedPayload = imaPayload;
@@ -5110,6 +5114,20 @@ var AdConfigManager = /*#__PURE__*/ function() {
5110
5114
  }).call(this);
5111
5115
  }
5112
5116
  },
5117
+ {
5118
+ key: "applyMqttConfigFromResponse",
5119
+ value: function applyMqttConfigFromResponse(data) {
5120
+ var _data_response;
5121
+ var mqttConfig2 = (_data_response = data.response) === null || _data_response === void 0 ? void 0 : _data_response.mqtt_config;
5122
+ if (!mqttConfig2 || (typeof mqttConfig2 === "undefined" ? "undefined" : _type_of(mqttConfig2)) !== "object") {
5123
+ return;
5124
+ }
5125
+ applyMQTTConfig(mqttConfig2);
5126
+ if (this.debug) {
5127
+ console.log("[StormcloudVideoPlayer] Applied MQTT config from /ads/web:", mqttConfig2);
5128
+ }
5129
+ }
5130
+ },
5113
5131
  {
5114
5132
  key: "fetchAndParseVmap",
5115
5133
  value: function fetchAndParseVmap(vmapUrl) {