@brndts/brndts-ads 1.0.1 → 1.1.0

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/index.js CHANGED
@@ -18598,14 +18598,13 @@ var Reporter = /*#__PURE__*/ function() {
18598
18598
  replaysOnErrorSampleRate: 1
18599
18599
  });
18600
18600
  this.scope = new Scope();
18601
- this.scope.setClient(this.client);
18602
18601
  this.client.init();
18603
18602
  }
18604
18603
  _create_class(Reporter, [
18605
18604
  {
18606
18605
  key: "capture",
18607
18606
  value: function capture(error) {
18608
- return this.scope.captureException(error);
18607
+ return this.client.captureException(error, {}, this.scope);
18609
18608
  }
18610
18609
  }
18611
18610
  ]);
@@ -18713,6 +18712,35 @@ function _getGeneralInfo() {
18713
18712
  });
18714
18713
  return _getGeneralInfo.apply(this, arguments);
18715
18714
  }
18715
+ // src/Common/utils/Changeable.ts
18716
+ var Changeable = /*#__PURE__*/ function() {
18717
+ function Changeable(value2) {
18718
+ _class_call_check(this, Changeable);
18719
+ this.listeners = [];
18720
+ this._value = value2;
18721
+ }
18722
+ _create_class(Changeable, [
18723
+ {
18724
+ key: "value",
18725
+ get: function get() {
18726
+ return this._value;
18727
+ },
18728
+ set: function set(value2) {
18729
+ this._value = value2;
18730
+ for(var index = 0; index < this.listeners.length; index++){
18731
+ this.listeners[index](this._value);
18732
+ }
18733
+ }
18734
+ },
18735
+ {
18736
+ key: "onUpdate",
18737
+ value: function onUpdate(listener3) {
18738
+ this.listeners.push(listener3);
18739
+ }
18740
+ }
18741
+ ]);
18742
+ return Changeable;
18743
+ }();
18716
18744
  // src/Common/utils/is.ts
18717
18745
  var getConstructor = function(input) {
18718
18746
  return input !== null && typeof input !== "undefined" ? input.constructor : null;
@@ -18845,7 +18873,7 @@ var defaults = {
18845
18873
  host: "http://localhost:8001"
18846
18874
  },
18847
18875
  controls: {
18848
- default: "none"
18876
+ default: "brndts_fs"
18849
18877
  },
18850
18878
  playback: {},
18851
18879
  volume: {
@@ -19062,7 +19090,7 @@ var Logger = /*#__PURE__*/ function() {
19062
19090
  {
19063
19091
  key: "error",
19064
19092
  get: function get() {
19065
- return this.enabled ? Function.prototype.bind.call(console.error, console) : noop;
19093
+ return Function.prototype.bind.call(console.error, console);
19066
19094
  }
19067
19095
  }
19068
19096
  ]);
@@ -19101,7 +19129,7 @@ var VideoRegionsDataCollection = /*#__PURE__*/ function() {
19101
19129
  var nextFrameInfo;
19102
19130
  var missingIntervals = {};
19103
19131
  if (this.timestampList.length === 0) {
19104
- missingIntervals[0] = {
19132
+ missingIntervals["0"] = {
19105
19133
  timestamp_start: 0,
19106
19134
  timestamp_end: this.totalLengthSeconds
19107
19135
  };
@@ -19172,9 +19200,6 @@ var VideoRegionsDataCollection = /*#__PURE__*/ function() {
19172
19200
  {
19173
19201
  key: "isValidRegionForTimestamp",
19174
19202
  value: function isValidRegionForTimestamp(region, timestamp) {
19175
- if (!region) {
19176
- return false;
19177
- }
19178
19203
  if (region.timestamp_start < timestamp && region.timestamp_end > timestamp) {
19179
19204
  return true;
19180
19205
  }
@@ -19213,14 +19238,6 @@ var VideoRegionsDataCollection = /*#__PURE__*/ function() {
19213
19238
  right = mid - 1;
19214
19239
  }
19215
19240
  }
19216
- leftInterval = this.frameInfo[this.timestampList[left]];
19217
- rightInterval = this.frameInfo[this.timestampList[right]];
19218
- if (this.isValidRegionForTimestamp(leftInterval, target)) {
19219
- return leftInterval;
19220
- }
19221
- if (this.isValidRegionForTimestamp(rightInterval, target)) {
19222
- return rightInterval;
19223
- }
19224
19241
  return null;
19225
19242
  }
19226
19243
  },
@@ -19364,7 +19381,11 @@ var VideoRegionsDataManager = /*#__PURE__*/ function() {
19364
19381
  },
19365
19382
  {
19366
19383
  key: "destroy",
19367
- value: function destroy() {}
19384
+ value: function destroy() {
19385
+ this.service.removeListener("result", this.handlePredictionResult);
19386
+ this.service.removeListener("completed", this.handlePredictionConpleted);
19387
+ this.service.removeListener("aborted", this.handlePredictionAborted);
19388
+ }
19368
19389
  }
19369
19390
  ]);
19370
19391
  return VideoRegionsDataManager;
@@ -19549,6 +19570,7 @@ var RegionBox = /*#__PURE__*/ function() {
19549
19570
  }();
19550
19571
  var Region = /*#__PURE__*/ function() {
19551
19572
  function Region(id, regionDescriptor, planeDescriptor, deps) {
19573
+ var _this = this;
19552
19574
  _class_call_check(this, Region);
19553
19575
  this.visible = false;
19554
19576
  this.id = id;
@@ -19574,6 +19596,16 @@ var Region = /*#__PURE__*/ function() {
19574
19596
  this.container.addEventListener("click", this.handleClick);
19575
19597
  this.container.addEventListener("mouseenter", this.handleMouseEnter);
19576
19598
  this.container.addEventListener("mouseleave", this.handleMouseLeave);
19599
+ if (this.deps.provider) {
19600
+ this.deps.provider.onRefreshContents(function(contents) {
19601
+ var _this_deps_recorder;
19602
+ _this.boxView.innerHTML = "";
19603
+ for(var index = 0; index < contents.length; index++){
19604
+ _this.boxView.appendChild(contents[index]);
19605
+ }
19606
+ (_this_deps_recorder = _this.deps.recorder) === null || _this_deps_recorder === void 0 ? void 0 : _this_deps_recorder.presentationStateChanged(_this);
19607
+ });
19608
+ }
19577
19609
  this.render(regionDescriptor.contours, regionDescriptor.box);
19578
19610
  if (this.boxArea > 0) {
19579
19611
  this.requestContent();
@@ -19583,19 +19615,7 @@ var Region = /*#__PURE__*/ function() {
19583
19615
  {
19584
19616
  key: "requestContent",
19585
19617
  value: function requestContent() {
19586
- var _this = this;
19587
- var _this_deps;
19588
- if ((_this_deps = this.deps) === null || _this_deps === void 0 ? void 0 : _this_deps.provider) {
19589
- this.deps.provider.onRefreshContents(function(contents) {
19590
- _this.boxView.innerHTML = "";
19591
- for(var index = 0; index < contents.length; index++){
19592
- _this.boxView.appendChild(contents[index]);
19593
- }
19594
- });
19595
- var content = this.deps.provider.contents();
19596
- for(var index = 0; index < content.length; index++){
19597
- this.boxView.appendChild(content[index]);
19598
- }
19618
+ if (this.deps.provider) {
19599
19619
  this.deps.provider.request({
19600
19620
  size: {
19601
19621
  width: this.boxWidth,
@@ -19611,22 +19631,22 @@ var Region = /*#__PURE__*/ function() {
19611
19631
  {
19612
19632
  key: "handleClick",
19613
19633
  value: function handleClick() {
19614
- var _this_deps_recorder, _this_deps;
19615
- this.isPresented && ((_this_deps = this.deps) === null || _this_deps === void 0 ? void 0 : (_this_deps_recorder = _this_deps.recorder) === null || _this_deps_recorder === void 0 ? void 0 : _this_deps_recorder.mouseClick(this));
19634
+ var _this_deps_recorder;
19635
+ this.isPresented && ((_this_deps_recorder = this.deps.recorder) === null || _this_deps_recorder === void 0 ? void 0 : _this_deps_recorder.mouseClick(this));
19616
19636
  }
19617
19637
  },
19618
19638
  {
19619
19639
  key: "handleMouseEnter",
19620
19640
  value: function handleMouseEnter() {
19621
- var _this_deps_recorder, _this_deps;
19622
- this.isPresented && ((_this_deps = this.deps) === null || _this_deps === void 0 ? void 0 : (_this_deps_recorder = _this_deps.recorder) === null || _this_deps_recorder === void 0 ? void 0 : _this_deps_recorder.mouseEnter(this));
19641
+ var _this_deps_recorder;
19642
+ this.isPresented && ((_this_deps_recorder = this.deps.recorder) === null || _this_deps_recorder === void 0 ? void 0 : _this_deps_recorder.mouseEnter(this));
19623
19643
  }
19624
19644
  },
19625
19645
  {
19626
19646
  key: "handleMouseLeave",
19627
19647
  value: function handleMouseLeave() {
19628
- var _this_deps_recorder, _this_deps;
19629
- this.isPresented && ((_this_deps = this.deps) === null || _this_deps === void 0 ? void 0 : (_this_deps_recorder = _this_deps.recorder) === null || _this_deps_recorder === void 0 ? void 0 : _this_deps_recorder.mouseLeave(this));
19648
+ var _this_deps_recorder;
19649
+ this.isPresented && ((_this_deps_recorder = this.deps.recorder) === null || _this_deps_recorder === void 0 ? void 0 : _this_deps_recorder.mouseLeave(this));
19630
19650
  }
19631
19651
  },
19632
19652
  {
@@ -19726,20 +19746,26 @@ var Region = /*#__PURE__*/ function() {
19726
19746
  return this.visible;
19727
19747
  }
19728
19748
  },
19749
+ {
19750
+ key: "hasContent",
19751
+ get: function get() {
19752
+ return this.boxView.children.length > 0;
19753
+ }
19754
+ },
19729
19755
  {
19730
19756
  key: "updateVisibility",
19731
19757
  value: function updateVisibility(value2) {
19732
- var _this_deps_recorder, _this_deps;
19758
+ var _this_deps_recorder;
19733
19759
  this.visible = value2;
19734
- (_this_deps = this.deps) === null || _this_deps === void 0 ? void 0 : (_this_deps_recorder = _this_deps.recorder) === null || _this_deps_recorder === void 0 ? void 0 : _this_deps_recorder.displayStateChanged(this);
19760
+ (_this_deps_recorder = this.deps.recorder) === null || _this_deps_recorder === void 0 ? void 0 : _this_deps_recorder.displayStateChanged(this);
19735
19761
  }
19736
19762
  },
19737
19763
  {
19738
19764
  key: "render",
19739
19765
  value: function render(contours, box) {
19740
19766
  var _this = this;
19741
- var _this_deps_recorder, _this_deps;
19742
- this.contours = contours || [];
19767
+ var _this_deps_recorder;
19768
+ this.contours = contours;
19743
19769
  var newBox = new RegionBox(box);
19744
19770
  if (!this.box.isEqual(newBox.coords) && newBox.area(this.plane.size) > 0) {
19745
19771
  this.box = newBox;
@@ -19753,7 +19779,6 @@ var Region = /*#__PURE__*/ function() {
19753
19779
  this.boxView.style.width = "".concat(Math.floor(this.boxWidth), "px");
19754
19780
  this.boxView.style.height = "".concat(Math.floor(this.boxHeight), "px");
19755
19781
  if (this.maskLayer) {
19756
- var _this_maskLayer;
19757
19782
  this.maskLayer.width = this.boxWidth;
19758
19783
  this.maskLayer.style.width = "".concat(this.boxWidth, "px");
19759
19784
  this.maskLayer.height = this.boxHeight;
@@ -19781,12 +19806,12 @@ var Region = /*#__PURE__*/ function() {
19781
19806
  ctx.fillStyle = "black";
19782
19807
  ctx.fill();
19783
19808
  }
19784
- var maskUrl = "url(" + ((_this_maskLayer = this.maskLayer) === null || _this_maskLayer === void 0 ? void 0 : _this_maskLayer.toDataURL()) + ")";
19809
+ var maskUrl = "url(" + this.maskLayer.toDataURL() + ")";
19785
19810
  if (this.boxView) {
19786
19811
  this.boxView.style.maskImage = maskUrl;
19787
19812
  }
19788
19813
  }
19789
- (_this_deps = this.deps) === null || _this_deps === void 0 ? void 0 : (_this_deps_recorder = _this_deps.recorder) === null || _this_deps_recorder === void 0 ? void 0 : _this_deps_recorder.presentationStateChanged(this);
19814
+ (_this_deps_recorder = this.deps.recorder) === null || _this_deps_recorder === void 0 ? void 0 : _this_deps_recorder.presentationStateChanged(this);
19790
19815
  }
19791
19816
  },
19792
19817
  {
@@ -20330,7 +20355,7 @@ var ContentProvider = /*#__PURE__*/ function() {
20330
20355
  ]);
20331
20356
  return ContentProvider;
20332
20357
  }();
20333
- // src/Ads/Providers/AdsTerraProvider.ts
20358
+ // src/Ads/Providers/AdsTerra/AdsTerraProvider.ts
20334
20359
  var ADSTERRA_BANNER_KEY = "f5024dbe632a4ccafec26462f39acaf8";
20335
20360
  var AdsTerraProvider = /*#__PURE__*/ function(ContentProvider) {
20336
20361
  _inherits(AdsTerraProvider, ContentProvider);
@@ -20349,7 +20374,7 @@ var AdsTerraProvider = /*#__PURE__*/ function(ContentProvider) {
20349
20374
  var conf = document.createElement("script");
20350
20375
  var script = document.createElement("script");
20351
20376
  script.type = "text/javascript";
20352
- script.src = "//www.highperformancedformats.com/".concat(atOptions.key, "/invoke.js");
20377
+ script.src = "http://www.highperformancedformats.com/".concat(atOptions.key, "/invoke.js");
20353
20378
  conf.innerHTML = "atOptions = ".concat(JSON.stringify(atOptions));
20354
20379
  _this.content.push(conf);
20355
20380
  _this.content.push(script);
@@ -20416,7 +20441,7 @@ var BRNDTSDefaultProvider = /*#__PURE__*/ function(ContentProvider) {
20416
20441
  ]);
20417
20442
  return BRNDTSDefaultProvider;
20418
20443
  }(ContentProvider);
20419
- // src/Ads/Providers/KevelProvider.ts
20444
+ // src/Ads/Providers/Kevel/KevelSDK.ts
20420
20445
  var KevelSDK = /*#__PURE__*/ function() {
20421
20446
  function KevelSDK(networkId, siteId) {
20422
20447
  _class_call_check(this, KevelSDK);
@@ -20469,6 +20494,7 @@ var KevelSDK = /*#__PURE__*/ function() {
20469
20494
  ]);
20470
20495
  return KevelSDK;
20471
20496
  }();
20497
+ // src/Ads/Providers/Kevel/KevelProvider.ts
20472
20498
  var KevelProvider = /*#__PURE__*/ function(ContentProvider) {
20473
20499
  _inherits(KevelProvider, ContentProvider);
20474
20500
  var _super = _create_super(KevelProvider);
@@ -20537,6 +20563,30 @@ var KevelProvider = /*#__PURE__*/ function(ContentProvider) {
20537
20563
  return KevelProvider;
20538
20564
  }(ContentProvider);
20539
20565
  // src/Ads/Providers/SmartyAds/SmartyAdsSDK.ts
20566
+ var PARAMS = [
20567
+ "res",
20568
+ "m",
20569
+ "ua",
20570
+ "ip",
20571
+ "w",
20572
+ "h",
20573
+ "gdpr",
20574
+ "gdpr_consent",
20575
+ "gpp",
20576
+ "gpp_sid",
20577
+ "coppa",
20578
+ "page",
20579
+ "domain",
20580
+ "secure",
20581
+ "lmt",
20582
+ "dnt",
20583
+ "ad_width",
20584
+ "ad_height",
20585
+ "language",
20586
+ "cattax",
20587
+ "keywords",
20588
+ "placementId"
20589
+ ];
20540
20590
  var SmartyadsSDK = /*#__PURE__*/ function() {
20541
20591
  function SmartyadsSDK() {
20542
20592
  _class_call_check(this, SmartyadsSDK);
@@ -20550,17 +20600,11 @@ var SmartyadsSDK = /*#__PURE__*/ function() {
20550
20600
  * @returns The query string with URL encoding.
20551
20601
  */ key: "buildQueryParams",
20552
20602
  value: function buildQueryParams(params) {
20553
- var queryKeys = Object.keys(params);
20554
- var queryString = queryKeys.map(function(key) {
20603
+ var queryString = PARAMS.map(function(key) {
20555
20604
  var value2 = params[key];
20556
20605
  if (value2 === null || value2 === void 0) {
20557
20606
  return "";
20558
20607
  }
20559
- if (Array.isArray(value2)) {
20560
- return value2.map(function(item) {
20561
- return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(item));
20562
- }).join("&");
20563
- }
20564
20608
  return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(value2));
20565
20609
  }).filter(function(part) {
20566
20610
  return part.length > 0;
@@ -20571,7 +20615,6 @@ var SmartyadsSDK = /*#__PURE__*/ function() {
20571
20615
  {
20572
20616
  key: "request",
20573
20617
  value: function request(params) {
20574
- var url2 = "https://n1.smartyads.com/?c=b&".concat(this.buildQueryParams(params));
20575
20618
  return fetch("https://n1.smartyads.com/?c=b&".concat(this.buildQueryParams(params))).then(function(response) {
20576
20619
  if (!response.ok) {
20577
20620
  throw new InternalError("Network response was not ok");
@@ -20595,7 +20638,7 @@ var SmartyadsProvider = /*#__PURE__*/ function(ContentProvider) {
20595
20638
  _class_call_check(this, SmartyadsProvider);
20596
20639
  var _this;
20597
20640
  _this = _super.call(this, context, options);
20598
- _this.placements = options.placements;
20641
+ _this.placements = options.placements || {};
20599
20642
  _this.smartyads = new SmartyadsSDK();
20600
20643
  return _this;
20601
20644
  }
@@ -20604,13 +20647,21 @@ var SmartyadsProvider = /*#__PURE__*/ function(ContentProvider) {
20604
20647
  key: "getPlacement",
20605
20648
  value: function getPlacement(regionId) {
20606
20649
  var availablePlacements = Object.keys(this.placements).map(parseInt);
20607
- if (!availablePlacements) {
20650
+ if (!availablePlacements.length) {
20608
20651
  throw new Error("No available placements!");
20609
20652
  }
20653
+ var foundPlacement;
20610
20654
  if (!regionId) {
20611
- return this.placements[availablePlacements[0]];
20655
+ foundPlacement = this.placements[availablePlacements[0]];
20656
+ } else {
20657
+ foundPlacement = this.placements[regionId];
20658
+ }
20659
+ if (typeof foundPlacement === "number") {
20660
+ return {
20661
+ id: foundPlacement
20662
+ };
20612
20663
  }
20613
- return this.placements[regionId];
20664
+ return foundPlacement;
20614
20665
  }
20615
20666
  },
20616
20667
  {
@@ -20618,18 +20669,19 @@ var SmartyadsProvider = /*#__PURE__*/ function(ContentProvider) {
20618
20669
  value: function request(params) {
20619
20670
  var _this = this;
20620
20671
  return _async_to_generator(function() {
20621
- var _params_params, smartyadsContent, div, index;
20672
+ var _params_params, placementInfo, smartyadsContent, div, index;
20622
20673
  return _ts_generator(this, function(_state) {
20623
20674
  switch(_state.label){
20624
20675
  case 0:
20625
20676
  if (!params || params.size.width === void 0 || params.size.width === 0 || params.size.height === void 0 || params.size.height === 0) {
20626
20677
  throw new InternalError("No Params!");
20627
20678
  }
20679
+ placementInfo = _this.getPlacement((_params_params = params.params) === null || _params_params === void 0 ? void 0 : _params_params.regionId);
20628
20680
  return [
20629
20681
  4,
20630
20682
  _this.smartyads.request(_object_spread_props(_object_spread({}, _this.options), {
20631
- ad_width: params.size.width,
20632
- ad_height: params.size.height,
20683
+ ad_width: placementInfo.w || params.size.width,
20684
+ ad_height: placementInfo.h || params.size.height,
20633
20685
  m: "api",
20634
20686
  ua: _this.context.info.ua || navigator.userAgent,
20635
20687
  w: window.innerWidth,
@@ -20637,7 +20689,7 @@ var SmartyadsProvider = /*#__PURE__*/ function(ContentProvider) {
20637
20689
  domain: _this.context.info.domain || window.location.hostname,
20638
20690
  page: window.location.href,
20639
20691
  ip: _this.context.info.ip,
20640
- placementId: _this.getPlacement((_params_params = params.params) === null || _params_params === void 0 ? void 0 : _params_params.regionId)
20692
+ placementId: placementInfo.id
20641
20693
  }))
20642
20694
  ];
20643
20695
  case 1:
@@ -20699,6 +20751,146 @@ var StaticImageProvider = /*#__PURE__*/ function(ContentProvider) {
20699
20751
  ]);
20700
20752
  return StaticImageProvider;
20701
20753
  }(ContentProvider);
20754
+ // src/Ads/Providers/Prebidjs/PrebidjsProvider.ts
20755
+ var PrebidjsProvider = /*#__PURE__*/ function(ContentProvider) {
20756
+ _inherits(PrebidjsProvider, ContentProvider);
20757
+ var _super = _create_super(PrebidjsProvider);
20758
+ function PrebidjsProvider(context, options) {
20759
+ _class_call_check(this, PrebidjsProvider);
20760
+ var _this;
20761
+ _this = _super.call(this, context, options);
20762
+ _this.ready = false;
20763
+ _this.processBids = _this.processBids.bind(_assert_this_initialized(_this));
20764
+ _this.loadPrebidJS().then(function() {
20765
+ _this.configurePrebidJS();
20766
+ _this.defineAdUnits();
20767
+ });
20768
+ return _this;
20769
+ }
20770
+ _create_class(PrebidjsProvider, [
20771
+ {
20772
+ key: "loadPrebidJS",
20773
+ value: function loadPrebidJS() {
20774
+ var _this = this;
20775
+ return new Promise(function(resolve, reject) {
20776
+ if (window.pbjs) {
20777
+ _this.ready = true;
20778
+ _this.prebidjs = window.pbjs;
20779
+ _this.context.logger.log("Prebid.js already loaded!");
20780
+ resolve();
20781
+ return;
20782
+ }
20783
+ var script = document.createElement("script");
20784
+ script.src = "https://cdn.jsdelivr.net/npm/prebid.js@latest/dist/not-for-prod/prebid.js";
20785
+ script.onload = function() {
20786
+ _this.ready = true;
20787
+ _this.prebidjs = window.pbjs;
20788
+ _this.context.logger.log("Prebid.js loaded!");
20789
+ resolve();
20790
+ };
20791
+ script.onerror = function() {
20792
+ reject(new Error("Failed to load Prebid.js"));
20793
+ };
20794
+ document.head.appendChild(script);
20795
+ });
20796
+ }
20797
+ },
20798
+ {
20799
+ key: "configurePrebidJS",
20800
+ value: function configurePrebidJS() {
20801
+ var _this = this;
20802
+ if (!this.prebidjs) {
20803
+ return;
20804
+ }
20805
+ this.prebidjs.que.push(function() {
20806
+ if (_this.prebidjs) {
20807
+ _this.prebidjs.setConfig({
20808
+ debug: true,
20809
+ priceGranularity: "high",
20810
+ enableSendAllBids: true
20811
+ });
20812
+ }
20813
+ });
20814
+ }
20815
+ },
20816
+ {
20817
+ key: "defineAdUnits",
20818
+ value: function defineAdUnits() {
20819
+ var _this = this;
20820
+ if (!this.ready) {
20821
+ throw new Error("Prebid.js is not loaded");
20822
+ }
20823
+ if (!this.prebidjs) {
20824
+ return;
20825
+ }
20826
+ this.prebidjs.que.push(function() {
20827
+ if (_this.prebidjs) {
20828
+ _this.prebidjs.addAdUnits(_this.options.units);
20829
+ }
20830
+ });
20831
+ }
20832
+ },
20833
+ {
20834
+ key: "processBid",
20835
+ value: function processBid(bid) {
20836
+ var _iframe_sandbox, _iframe_contentWindow;
20837
+ var iframe = document.createElement("iframe");
20838
+ iframe.name = "prebid_ads_iframe_".concat(bid.adUnitCode);
20839
+ iframe.title = "3rd party ad content";
20840
+ (_iframe_sandbox = iframe.sandbox) === null || _iframe_sandbox === void 0 ? void 0 : _iframe_sandbox.add("allow-forms", "allow-popups", "allow-popups-to-escape-sandbox", "allow-same-origin", "allow-scripts", "allow-top-navigation-by-user-activation");
20841
+ iframe.setAttribute("aria-label", "Advertisment");
20842
+ iframe.style.setProperty("border", "0");
20843
+ iframe.style.setProperty("margin", "0");
20844
+ iframe.style.setProperty("overflow", "hidden");
20845
+ var iframeDoc = (_iframe_contentWindow = iframe.contentWindow) === null || _iframe_contentWindow === void 0 ? void 0 : _iframe_contentWindow.document;
20846
+ if (!iframeDoc) {
20847
+ return;
20848
+ }
20849
+ if (this.prebidjs) {
20850
+ this.prebidjs.renderAd(iframeDoc, bid.adId);
20851
+ }
20852
+ var normalizeCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */button,hr,input{overflow:visible}progress,sub,sup{vertical-align:baseline}[type=checkbox],[type=radio],legend{box-sizing:border-box;padding:0}html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}details,main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:ButtonText dotted 1px}fieldset{padding:.35em .75em .625em}legend{color:inherit;display:table;max-width:100%;white-space:normal}textarea{overflow:auto}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}[hidden],template{display:none}";
20853
+ var iframeStyle = iframeDoc.createElement("style");
20854
+ iframeStyle.appendChild(iframeDoc.createTextNode(normalizeCss));
20855
+ iframeDoc.head.appendChild(iframeStyle);
20856
+ this.content = [
20857
+ iframe
20858
+ ];
20859
+ this.notify();
20860
+ }
20861
+ },
20862
+ {
20863
+ key: "processBids",
20864
+ value: function processBids(bids, timedOut, auctionId) {
20865
+ var _this_prebidjs;
20866
+ this.context.logger.log("Bids:", bids);
20867
+ var winners = ((_this_prebidjs = this.prebidjs) === null || _this_prebidjs === void 0 ? void 0 : _this_prebidjs.getHighestCpmBids()) || [];
20868
+ for(var i2 = 0; i2 < winners.length; i2++){
20869
+ this.processBid(winners[i2]);
20870
+ }
20871
+ }
20872
+ },
20873
+ {
20874
+ key: "request",
20875
+ value: function request(params) {
20876
+ var _this = this;
20877
+ if (!this.prebidjs) {
20878
+ return Promise.resolve();
20879
+ }
20880
+ this.prebidjs.que.push(function() {
20881
+ if (_this.prebidjs) {
20882
+ _this.prebidjs.requestBids({
20883
+ timeout: 1e3,
20884
+ bidsBackHandler: _this.processBids
20885
+ });
20886
+ }
20887
+ });
20888
+ return Promise.resolve();
20889
+ }
20890
+ }
20891
+ ]);
20892
+ return PrebidjsProvider;
20893
+ }(ContentProvider);
20702
20894
  // src/Ads/Providers/ProviderFactory.ts
20703
20895
  var ContentProviderFactory = /*#__PURE__*/ function() {
20704
20896
  function ContentProviderFactory() {
@@ -20723,8 +20915,11 @@ var ContentProviderFactory = /*#__PURE__*/ function() {
20723
20915
  if (options.params.code === "smartyads") {
20724
20916
  return new SmartyadsProvider(context, options.params);
20725
20917
  }
20918
+ if (options.params.code === "prebid") {
20919
+ return new PrebidjsProvider(context, options.params);
20920
+ }
20726
20921
  }
20727
- throw new InternalError("No provider found for type");
20922
+ throw new InternalError("No provider found for type: ".concat(options.type));
20728
20923
  }
20729
20924
  }
20730
20925
  ]);
@@ -20831,16 +21026,29 @@ var Ads = /*#__PURE__*/ function() {
20831
21026
  key: "mediaIsReady",
20832
21027
  value: function mediaIsReady() {
20833
21028
  this.videoRegions.fetch();
21029
+ console.log("media is ready");
20834
21030
  if (this.regionsRenderer) {
20835
21031
  return;
20836
21032
  }
20837
- this.regionsRenderer = new RegionRenderer(this.context.media.viewWidth, this.context.media.viewHeight, {
20838
- debug: this.context.config.get("debug"),
20839
- recorder: this.context.recorder,
20840
- provider: ContentProviderFactory.getProvider(this.context, this.context.config.get("ads").provider)
20841
- });
21033
+ console.log("creating regions renderer");
21034
+ try {
21035
+ this.regionsRenderer = new RegionRenderer(this.context.media.viewWidth, this.context.media.viewHeight, {
21036
+ debug: this.context.config.get("debug"),
21037
+ recorder: this.context.recorder,
21038
+ provider: ContentProviderFactory.getProvider(this.context, this.context.config.get("ads").provider)
21039
+ });
21040
+ } catch (e2) {
21041
+ if (_instanceof(e2, Error)) {
21042
+ var error = new InternalError(e2.message);
21043
+ error.stack = e2.stack;
21044
+ this.context.logger.error(e2);
21045
+ ErrorHandler.handle(error);
21046
+ }
21047
+ }
21048
+ console.log("attaching regions renderer", this.context.elements.container);
20842
21049
  if (this.context.elements.container) {
20843
- this.regionsRenderer.attach(this.context.elements.container);
21050
+ var _this_regionsRenderer;
21051
+ (_this_regionsRenderer = this.regionsRenderer) === null || _this_regionsRenderer === void 0 ? void 0 : _this_regionsRenderer.attach(this.context.elements.container);
20844
21052
  }
20845
21053
  }
20846
21054
  },
@@ -20848,6 +21056,7 @@ var Ads = /*#__PURE__*/ function() {
20848
21056
  key: "handleState",
20849
21057
  value: function handleState() {
20850
21058
  var state = this.context.store.getState();
21059
+ console.log("state", state);
20851
21060
  if (state.ready) {
20852
21061
  this.mediaIsReady();
20853
21062
  }
@@ -20903,6 +21112,7 @@ var Ads = /*#__PURE__*/ function() {
20903
21112
  (_this_context_media = this.context.media) === null || _this_context_media === void 0 ? void 0 : _this_context_media.on("SEEKED", function() {
20904
21113
  _this.videoRegions.seek(_this.context.media.currentTime);
20905
21114
  });
21115
+ console.log("ads started");
20906
21116
  this.handleState();
20907
21117
  }
20908
21118
  },
@@ -24425,6 +24635,7 @@ var ImpressionModel = /*#__PURE__*/ function() {
24425
24635
  _class_call_check(this, ImpressionModel);
24426
24636
  this.service = service;
24427
24637
  this.currentImpression = {
24638
+ datetime: /* @__PURE__ */ new Date().toISOString(),
24428
24639
  type: "impression",
24429
24640
  session: sessionInfo,
24430
24641
  video: video,
@@ -24439,11 +24650,10 @@ var ImpressionModel = /*#__PURE__*/ function() {
24439
24650
  value: function insertNewHit(newHit) {
24440
24651
  var _this = this;
24441
24652
  return _async_to_generator(function() {
24442
- var _this_currentImpression_extra, result;
24653
+ var result;
24443
24654
  return _ts_generator(this, function(_state) {
24444
24655
  if (_this.currentImpression.type === "impression") {
24445
- ;
24446
- (_this_currentImpression_extra = _this.currentImpression.extra) === null || _this_currentImpression_extra === void 0 ? void 0 : _this_currentImpression_extra.hits.push(newHit);
24656
+ _this.currentImpression.extra.hits.push(newHit);
24447
24657
  if (!_this.currentImpression.id) {
24448
24658
  if (_this.currentImpression.video) {
24449
24659
  _this.currentImpression.video.ts = newHit.start;
@@ -24465,41 +24675,59 @@ var ImpressionModel = /*#__PURE__*/ function() {
24465
24675
  })();
24466
24676
  }
24467
24677
  },
24678
+ {
24679
+ key: "startNewImpressionHit",
24680
+ value: function startNewImpressionHit(region, ts) {
24681
+ this.inProgressHit = {
24682
+ ts_start: ts,
24683
+ dt_start: /* @__PURE__ */ new Date(),
24684
+ totalDisplayingTime: 0,
24685
+ area: region.polygonArea
24686
+ };
24687
+ if (region.isVisible) {
24688
+ this.inProgressHit.displayingStart = this.inProgressHit.dt_start;
24689
+ }
24690
+ }
24691
+ },
24692
+ {
24693
+ key: "finishInProgressHit",
24694
+ value: function finishInProgressHit(ts) {
24695
+ if (!this.inProgressHit) {
24696
+ return;
24697
+ }
24698
+ this.inProgressHit.ts_end = ts;
24699
+ this.inProgressHit.dt_end = /* @__PURE__ */ new Date();
24700
+ if (this.inProgressHit.displayingStart !== void 0) {
24701
+ this.inProgressHit.displayingEnd = /* @__PURE__ */ new Date();
24702
+ this.inProgressHit.totalDisplayingTime += (this.inProgressHit.displayingEnd.getTime() - this.inProgressHit.displayingStart.getTime()) / 1e3;
24703
+ this.inProgressHit.displayingStart = void 0;
24704
+ this.inProgressHit.displayingEnd = void 0;
24705
+ }
24706
+ var inProgress = this.inProgressHit;
24707
+ var presentationTime = // @ts-expect-error
24708
+ (inProgress.dt_end.getTime() - inProgress.dt_start.getTime()) / 1e3;
24709
+ this.inProgressHit = void 0;
24710
+ this.insertNewHit({
24711
+ presentation_time: presentationTime,
24712
+ display_time: inProgress.totalDisplayingTime,
24713
+ start: inProgress.ts_start,
24714
+ // @ts-expect-error
24715
+ end: inProgress.ts_end,
24716
+ area: inProgress.area || 0
24717
+ });
24718
+ }
24719
+ },
24468
24720
  {
24469
24721
  key: "presentationChanged",
24470
24722
  value: function presentationChanged(region, ts) {
24471
- if (region.isPresented && this.inProgressHit) {
24472
- return;
24473
- } else if (region.isPresented && !this.inProgressHit) {
24474
- this.inProgressHit = {
24475
- ts_start: ts,
24476
- dt_start: /* @__PURE__ */ new Date(),
24477
- totalDisplayingTime: 0,
24478
- area: region.polygonArea
24479
- };
24480
- if (region.isVisible) {
24481
- this.inProgressHit.displayingStart = this.inProgressHit.dt_start;
24723
+ if (!this.inProgressHit) {
24724
+ if (region.isPresented && region.hasContent) {
24725
+ this.startNewImpressionHit(region, ts);
24482
24726
  }
24483
- } else if (!region.isPresented && this.inProgressHit) {
24484
- var _inProgress_dt_end;
24485
- this.inProgressHit.ts_end = ts;
24486
- this.inProgressHit.dt_end = /* @__PURE__ */ new Date();
24487
- if (this.inProgressHit.displayingStart !== void 0) {
24488
- this.inProgressHit.displayingEnd = /* @__PURE__ */ new Date();
24489
- this.inProgressHit.totalDisplayingTime += (this.inProgressHit.displayingEnd.getTime() - this.inProgressHit.displayingStart.getTime()) / 1e3;
24490
- this.inProgressHit.displayingStart = void 0;
24491
- this.inProgressHit.displayingEnd = void 0;
24727
+ } else {
24728
+ if (!region.isPresented || !region.hasContent) {
24729
+ this.finishInProgressHit(ts);
24492
24730
  }
24493
- var inProgress = this.inProgressHit;
24494
- var presentationTime = ((((_inProgress_dt_end = inProgress.dt_end) === null || _inProgress_dt_end === void 0 ? void 0 : _inProgress_dt_end.getTime()) || 0) - inProgress.dt_start.getTime()) / 1e3;
24495
- this.inProgressHit = void 0;
24496
- this.insertNewHit({
24497
- presentation_time: presentationTime,
24498
- display_time: inProgress.totalDisplayingTime,
24499
- start: inProgress.ts_start,
24500
- end: inProgress.ts_end || inProgress.ts_start,
24501
- area: inProgress.area || 0
24502
- });
24503
24731
  }
24504
24732
  }
24505
24733
  },
@@ -24525,7 +24753,6 @@ var ImpressionModel = /*#__PURE__*/ function() {
24525
24753
  key: "destroy",
24526
24754
  value: function destroy() {
24527
24755
  if (this.inProgressHit) {
24528
- var _inProgress_dt_end;
24529
24756
  this.inProgressHit.dt_end = /* @__PURE__ */ new Date();
24530
24757
  if (this.inProgressHit.displayingStart !== void 0) {
24531
24758
  this.inProgressHit.displayingEnd = /* @__PURE__ */ new Date();
@@ -24534,7 +24761,8 @@ var ImpressionModel = /*#__PURE__*/ function() {
24534
24761
  this.inProgressHit.displayingEnd = void 0;
24535
24762
  }
24536
24763
  var inProgress = this.inProgressHit;
24537
- var presentationTime = ((((_inProgress_dt_end = inProgress.dt_end) === null || _inProgress_dt_end === void 0 ? void 0 : _inProgress_dt_end.getTime()) || 0) - inProgress.dt_start.getTime()) / 1e3;
24764
+ var presentationTime = // @ts-expect-error
24765
+ (inProgress.dt_end.getTime() - inProgress.dt_start.getTime()) / 1e3;
24538
24766
  this.inProgressHit = void 0;
24539
24767
  this.insertNewHit({
24540
24768
  presentation_time: presentationTime,
@@ -28563,34 +28791,6 @@ Object.assign(lookup2, {
28563
28791
  connect: lookup2
28564
28792
  });
28565
28793
  // src/BRNDTSService.ts
28566
- var Changeable = /*#__PURE__*/ function() {
28567
- function Changeable(value2) {
28568
- _class_call_check(this, Changeable);
28569
- this.listeners = [];
28570
- this._value = value2;
28571
- }
28572
- _create_class(Changeable, [
28573
- {
28574
- key: "value",
28575
- get: function get() {
28576
- return this._value;
28577
- },
28578
- set: function set(value2) {
28579
- this._value = value2;
28580
- for(var index = 0; index < this.listeners.length; index++){
28581
- this.listeners[index](this._value);
28582
- }
28583
- }
28584
- },
28585
- {
28586
- key: "onUpdate",
28587
- value: function onUpdate(listener3) {
28588
- this.listeners.push(listener3);
28589
- }
28590
- }
28591
- ]);
28592
- return Changeable;
28593
- }();
28594
28794
  var BRNDTSService = /*#__PURE__*/ function(_import_events4_default) {
28595
28795
  _inherits(BRNDTSService, _import_events4_default);
28596
28796
  var _super = _create_super(BRNDTSService);
@@ -28657,8 +28857,7 @@ var BRNDTSService = /*#__PURE__*/ function(_import_events4_default) {
28657
28857
  payload[_key - 1] = arguments[_key];
28658
28858
  }
28659
28859
  var _this_socket;
28660
- var _this_socket1;
28661
- return (_this_socket1 = this.socket) === null || _this_socket1 === void 0 ? void 0 : (_this_socket = _this_socket1).emit.apply(_this_socket, [
28860
+ return (_this_socket = this.socket).emit.apply(_this_socket, [
28662
28861
  event
28663
28862
  ].concat(_to_consumable_array(payload)));
28664
28863
  }
@@ -28666,16 +28865,14 @@ var BRNDTSService = /*#__PURE__*/ function(_import_events4_default) {
28666
28865
  {
28667
28866
  key: "handle",
28668
28867
  value: function handle(event, handler) {
28669
- var _this_socket;
28670
- return (_this_socket = this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.on(event, handler);
28868
+ return this.socket.on(event, handler);
28671
28869
  }
28672
28870
  },
28673
28871
  {
28674
28872
  key: "destroy",
28675
28873
  value: function destroy() {
28676
- var _this_socket, _this_socket1;
28677
- (_this_socket = this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.emit("stop");
28678
- (_this_socket1 = this.socket) === null || _this_socket1 === void 0 ? void 0 : _this_socket1.close();
28874
+ this.socket.emit("stop");
28875
+ this.socket.close();
28679
28876
  }
28680
28877
  }
28681
28878
  ]);
@@ -29045,6 +29242,7 @@ var YoutubeMediaElement = /*#__PURE__*/ function(GenericMediaElement1) {
29045
29242
  var container = elements_default.createElement("div", {
29046
29243
  id: id
29047
29244
  });
29245
+ this.context.elements.original = media;
29048
29246
  media = elements_default.replaceElement(container, media);
29049
29247
  var ytPlayer = new window.YT.Player(media, {
29050
29248
  videoId: videoId || void 0,
@@ -29208,13 +29406,13 @@ var YoutubeMediaElement = /*#__PURE__*/ function(GenericMediaElement1) {
29208
29406
  {
29209
29407
  key: "disableNativeControls",
29210
29408
  value: function disableNativeControls() {
29211
- throw new InternalError("Method not implemented.");
29409
+ this.context.logger.log("Disabling native controls");
29212
29410
  }
29213
29411
  },
29214
29412
  {
29215
29413
  key: "enableNativeControls",
29216
29414
  value: function enableNativeControls() {
29217
- throw new InternalError("Method not implemented.");
29415
+ this.context.logger.log("Enabling native controls");
29218
29416
  }
29219
29417
  },
29220
29418
  {
@@ -29294,6 +29492,85 @@ var YoutubeMediaElement = /*#__PURE__*/ function(GenericMediaElement1) {
29294
29492
  ]);
29295
29493
  return YoutubeMediaElement;
29296
29494
  }(GenericMediaElement);
29495
+ // src/Common/utils/videoColor.ts
29496
+ function getAverageRGB(imgEl, block) {
29497
+ var blockSize = block;
29498
+ var defaultRGB = {
29499
+ r: 0,
29500
+ g: 0,
29501
+ b: 0
29502
+ };
29503
+ var canvas = document.createElement("canvas");
29504
+ var context = canvas.getContext && canvas.getContext("2d");
29505
+ var data;
29506
+ var width;
29507
+ var height;
29508
+ var i2 = -4;
29509
+ var length2;
29510
+ var rgb = {
29511
+ r: 0,
29512
+ g: 0,
29513
+ b: 0
29514
+ };
29515
+ var count = 0;
29516
+ if (!block) {
29517
+ blockSize = 5;
29518
+ }
29519
+ if (!context) {
29520
+ return defaultRGB;
29521
+ }
29522
+ height = canvas.height = imgEl.offsetHeight || imgEl.height;
29523
+ width = canvas.width = imgEl.offsetWidth || imgEl.width;
29524
+ context.drawImage(imgEl, 0, 0);
29525
+ try {
29526
+ data = context.getImageData(0, 0, width, height);
29527
+ } catch (e2) {
29528
+ return defaultRGB;
29529
+ }
29530
+ length2 = data.data.length;
29531
+ while((i2 += blockSize * 4) < length2){
29532
+ ++count;
29533
+ rgb.r += data.data[i2];
29534
+ rgb.g += data.data[i2 + 1];
29535
+ rgb.b += data.data[i2 + 2];
29536
+ }
29537
+ rgb.r = ~~(rgb.r / count);
29538
+ rgb.g = ~~(rgb.g / count);
29539
+ rgb.b = ~~(rgb.b / count);
29540
+ return rgb;
29541
+ }
29542
+ function getVideoAverageColor(video) {
29543
+ var defaultRGB = {
29544
+ r: 0,
29545
+ g: 0,
29546
+ b: 0
29547
+ };
29548
+ var canvas = document.createElement("canvas");
29549
+ canvas.width = video.offsetWidth;
29550
+ canvas.height = video.offsetHeight;
29551
+ var context = canvas.getContext("2d");
29552
+ if (!context) {
29553
+ return defaultRGB;
29554
+ }
29555
+ context.drawImage(video, 0, 0, canvas.width, canvas.height);
29556
+ return getAverageRGB(canvas, 5);
29557
+ }
29558
+ function getVideoDominantColor(video) {
29559
+ var defaultRGB = {
29560
+ r: 0,
29561
+ g: 0,
29562
+ b: 0
29563
+ };
29564
+ var canvas = document.createElement("canvas");
29565
+ canvas.width = 1;
29566
+ canvas.height = 1;
29567
+ var context = canvas.getContext("2d");
29568
+ if (!context) {
29569
+ return defaultRGB;
29570
+ }
29571
+ context.drawImage(video, 0, 0, 1, 1);
29572
+ return getAverageRGB(canvas, 1);
29573
+ }
29297
29574
  // src/Media/NativeMediaElement.ts
29298
29575
  var DEFAULT_SEEK_INTERVAL2 = 10;
29299
29576
  var EVENT_LIST_TO_HANDLE = [
@@ -29646,6 +29923,18 @@ var NativeMediaElement = /*#__PURE__*/ function(GenericMediaElement1) {
29646
29923
  value: function resetSize() {
29647
29924
  return this.setSize(this.context.dimensions.w, this.context.dimensions.h);
29648
29925
  }
29926
+ },
29927
+ {
29928
+ key: "getAverageColor",
29929
+ value: function getAverageColor() {
29930
+ return getVideoAverageColor(this.media);
29931
+ }
29932
+ },
29933
+ {
29934
+ key: "getVideoDominantColor",
29935
+ value: function getVideoDominantColor1() {
29936
+ return getVideoDominantColor(this.media);
29937
+ }
29649
29938
  }
29650
29939
  ]);
29651
29940
  return NativeMediaElement;
@@ -29784,6 +30073,10 @@ var BrndtsAds = /*#__PURE__*/ function() {
29784
30073
  }
29785
30074
  };
29786
30075
  try {
30076
+ if (!this.context.config.get("enabled")) {
30077
+ this.context.logger.error("Setup failed: disabled by config");
30078
+ return;
30079
+ }
29787
30080
  this.context.media = MediaElementFactory.getMediaElement(this.context);
29788
30081
  this.context.media.on("ERROR", function(error) {
29789
30082
  ErrorHandler.handle(error);
@@ -29806,16 +30099,13 @@ var BrndtsAds = /*#__PURE__*/ function() {
29806
30099
  key: "initialize",
29807
30100
  value: function initialize() {
29808
30101
  var _this = this;
30102
+ console.log("initialize");
29809
30103
  try {
29810
30104
  this.context.recorder = new InteractionLog(this.context);
29811
30105
  this.context.media.on("RESIZED", function() {
29812
30106
  var _this_context_ads;
29813
30107
  (_this_context_ads = _this.context.ads) === null || _this_context_ads === void 0 ? void 0 : _this_context_ads.updateSize();
29814
30108
  });
29815
- if (!this.context.config.get("enabled")) {
29816
- this.context.logger.error("Setup failed: disabled by config");
29817
- return;
29818
- }
29819
30109
  this.context.interface = new Interface(this.context);
29820
30110
  if (this.context.media.view.brndts) {
29821
30111
  this.context.logger.error("Setup failed: target already setup");
@@ -29829,6 +30119,7 @@ var BrndtsAds = /*#__PURE__*/ function() {
29829
30119
  if (this.context.config.get("debug")) {
29830
30120
  window.brndts = this;
29831
30121
  }
30122
+ console.log("start ads", this.context.config.get("ads"));
29832
30123
  if (this.context.config.get("ads").enabled) {
29833
30124
  this.context.ads = new Ads_default(this.context);
29834
30125
  this.context.ads.start();
@@ -29865,6 +30156,7 @@ var BrndtsAds = /*#__PURE__*/ function() {
29865
30156
  });
29866
30157
  });
29867
30158
  this.context.service.handle("info", function(data) {
30159
+ console.log("info", data);
29868
30160
  if (!data.video) {
29869
30161
  ErrorHandler.handle(new InternalError("Setup failed: no video identifier"));
29870
30162
  return;