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.
@@ -1892,6 +1892,9 @@ var DEFAULT_MQTT_CONFIG = {
1892
1892
  qos: 1
1893
1893
  };
1894
1894
  var mqttConfig = _object_spread({}, DEFAULT_MQTT_CONFIG);
1895
+ function applyMQTTConfig(overrides) {
1896
+ Object.assign(mqttConfig, overrides);
1897
+ }
1895
1898
  function isMQTTEnabled() {
1896
1899
  return mqttConfig.enabled;
1897
1900
  }
@@ -5063,6 +5066,7 @@ var AdConfigManager = /*#__PURE__*/ function() {
5063
5066
  ];
5064
5067
  case 4:
5065
5068
  data = _state.sent();
5069
+ this.applyMqttConfigFromResponse(data);
5066
5070
  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;
5067
5071
  if (imaPayload) {
5068
5072
  decodedPayload = imaPayload;
@@ -5096,6 +5100,20 @@ var AdConfigManager = /*#__PURE__*/ function() {
5096
5100
  }).call(this);
5097
5101
  }
5098
5102
  },
5103
+ {
5104
+ key: "applyMqttConfigFromResponse",
5105
+ value: function applyMqttConfigFromResponse(data) {
5106
+ var _data_response;
5107
+ var mqttConfig2 = (_data_response = data.response) === null || _data_response === void 0 ? void 0 : _data_response.mqtt_config;
5108
+ if (!mqttConfig2 || (typeof mqttConfig2 === "undefined" ? "undefined" : _type_of(mqttConfig2)) !== "object") {
5109
+ return;
5110
+ }
5111
+ applyMQTTConfig(mqttConfig2);
5112
+ if (this.debug) {
5113
+ console.log("[StormcloudVideoPlayer] Applied MQTT config from /ads/web:", mqttConfig2);
5114
+ }
5115
+ }
5116
+ },
5099
5117
  {
5100
5118
  key: "fetchAndParseVmap",
5101
5119
  value: function fetchAndParseVmap(vmapUrl) {