@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.mjs CHANGED
@@ -18615,14 +18615,13 @@ var Reporter = /*#__PURE__*/ function() {
18615
18615
  replaysOnErrorSampleRate: 1
18616
18616
  });
18617
18617
  this.scope = new Scope();
18618
- this.scope.setClient(this.client);
18619
18618
  this.client.init();
18620
18619
  }
18621
18620
  _create_class(Reporter, [
18622
18621
  {
18623
18622
  key: "capture",
18624
18623
  value: function capture(error) {
18625
- return this.scope.captureException(error);
18624
+ return this.client.captureException(error, {}, this.scope);
18626
18625
  }
18627
18626
  }
18628
18627
  ]);
@@ -18733,6 +18732,36 @@ function _getGeneralInfo() {
18733
18732
  });
18734
18733
  return _getGeneralInfo.apply(this, arguments);
18735
18734
  }
18735
+ // src/Common/utils/Changeable.ts
18736
+ var Changeable = /*#__PURE__*/ function() {
18737
+ "use strict";
18738
+ function Changeable(value2) {
18739
+ _class_call_check(this, Changeable);
18740
+ this.listeners = [];
18741
+ this._value = value2;
18742
+ }
18743
+ _create_class(Changeable, [
18744
+ {
18745
+ key: "value",
18746
+ get: function get() {
18747
+ return this._value;
18748
+ },
18749
+ set: function set(value2) {
18750
+ this._value = value2;
18751
+ for(var index = 0; index < this.listeners.length; index++){
18752
+ this.listeners[index](this._value);
18753
+ }
18754
+ }
18755
+ },
18756
+ {
18757
+ key: "onUpdate",
18758
+ value: function onUpdate(listener3) {
18759
+ this.listeners.push(listener3);
18760
+ }
18761
+ }
18762
+ ]);
18763
+ return Changeable;
18764
+ }();
18736
18765
  // src/Common/utils/is.ts
18737
18766
  var getConstructor = function(input) {
18738
18767
  return input !== null && typeof input !== "undefined" ? input.constructor : null;
@@ -18865,7 +18894,7 @@ var defaults = {
18865
18894
  host: "http://localhost:8001"
18866
18895
  },
18867
18896
  controls: {
18868
- default: "none"
18897
+ default: "brndts_fs"
18869
18898
  },
18870
18899
  playback: {},
18871
18900
  volume: {
@@ -19085,7 +19114,7 @@ var Logger = /*#__PURE__*/ function() {
19085
19114
  {
19086
19115
  key: "error",
19087
19116
  get: function get() {
19088
- return this.enabled ? Function.prototype.bind.call(console.error, console) : noop;
19117
+ return Function.prototype.bind.call(console.error, console);
19089
19118
  }
19090
19119
  }
19091
19120
  ]);
@@ -19125,7 +19154,7 @@ var VideoRegionsDataCollection = /*#__PURE__*/ function() {
19125
19154
  var nextFrameInfo;
19126
19155
  var missingIntervals = {};
19127
19156
  if (this.timestampList.length === 0) {
19128
- missingIntervals[0] = {
19157
+ missingIntervals["0"] = {
19129
19158
  timestamp_start: 0,
19130
19159
  timestamp_end: this.totalLengthSeconds
19131
19160
  };
@@ -19196,9 +19225,6 @@ var VideoRegionsDataCollection = /*#__PURE__*/ function() {
19196
19225
  {
19197
19226
  key: "isValidRegionForTimestamp",
19198
19227
  value: function isValidRegionForTimestamp(region, timestamp) {
19199
- if (!region) {
19200
- return false;
19201
- }
19202
19228
  if (region.timestamp_start < timestamp && region.timestamp_end > timestamp) {
19203
19229
  return true;
19204
19230
  }
@@ -19237,14 +19263,6 @@ var VideoRegionsDataCollection = /*#__PURE__*/ function() {
19237
19263
  right = mid - 1;
19238
19264
  }
19239
19265
  }
19240
- leftInterval = this.frameInfo[this.timestampList[left]];
19241
- rightInterval = this.frameInfo[this.timestampList[right]];
19242
- if (this.isValidRegionForTimestamp(leftInterval, target)) {
19243
- return leftInterval;
19244
- }
19245
- if (this.isValidRegionForTimestamp(rightInterval, target)) {
19246
- return rightInterval;
19247
- }
19248
19266
  return null;
19249
19267
  }
19250
19268
  },
@@ -19389,7 +19407,11 @@ var VideoRegionsDataManager = /*#__PURE__*/ function() {
19389
19407
  },
19390
19408
  {
19391
19409
  key: "destroy",
19392
- value: function destroy() {}
19410
+ value: function destroy() {
19411
+ this.service.removeListener("result", this.handlePredictionResult);
19412
+ this.service.removeListener("completed", this.handlePredictionConpleted);
19413
+ this.service.removeListener("aborted", this.handlePredictionAborted);
19414
+ }
19393
19415
  }
19394
19416
  ]);
19395
19417
  return VideoRegionsDataManager;
@@ -19579,6 +19601,7 @@ var RegionBox = /*#__PURE__*/ function() {
19579
19601
  var Region = /*#__PURE__*/ function() {
19580
19602
  "use strict";
19581
19603
  function Region(id, regionDescriptor, planeDescriptor, deps) {
19604
+ var _this = this;
19582
19605
  _class_call_check(this, Region);
19583
19606
  this.visible = false;
19584
19607
  this.id = id;
@@ -19604,6 +19627,16 @@ var Region = /*#__PURE__*/ function() {
19604
19627
  this.container.addEventListener("click", this.handleClick);
19605
19628
  this.container.addEventListener("mouseenter", this.handleMouseEnter);
19606
19629
  this.container.addEventListener("mouseleave", this.handleMouseLeave);
19630
+ if (this.deps.provider) {
19631
+ this.deps.provider.onRefreshContents(function(contents) {
19632
+ var _this_deps_recorder;
19633
+ _this.boxView.innerHTML = "";
19634
+ for(var index = 0; index < contents.length; index++){
19635
+ _this.boxView.appendChild(contents[index]);
19636
+ }
19637
+ (_this_deps_recorder = _this.deps.recorder) === null || _this_deps_recorder === void 0 ? void 0 : _this_deps_recorder.presentationStateChanged(_this);
19638
+ });
19639
+ }
19607
19640
  this.render(regionDescriptor.contours, regionDescriptor.box);
19608
19641
  if (this.boxArea > 0) {
19609
19642
  this.requestContent();
@@ -19613,19 +19646,7 @@ var Region = /*#__PURE__*/ function() {
19613
19646
  {
19614
19647
  key: "requestContent",
19615
19648
  value: function requestContent() {
19616
- var _this = this;
19617
- var _this_deps;
19618
- if ((_this_deps = this.deps) === null || _this_deps === void 0 ? void 0 : _this_deps.provider) {
19619
- this.deps.provider.onRefreshContents(function(contents) {
19620
- _this.boxView.innerHTML = "";
19621
- for(var index = 0; index < contents.length; index++){
19622
- _this.boxView.appendChild(contents[index]);
19623
- }
19624
- });
19625
- var content = this.deps.provider.contents();
19626
- for(var index = 0; index < content.length; index++){
19627
- this.boxView.appendChild(content[index]);
19628
- }
19649
+ if (this.deps.provider) {
19629
19650
  this.deps.provider.request({
19630
19651
  size: {
19631
19652
  width: this.boxWidth,
@@ -19641,22 +19662,22 @@ var Region = /*#__PURE__*/ function() {
19641
19662
  {
19642
19663
  key: "handleClick",
19643
19664
  value: function handleClick() {
19644
- var _this_deps_recorder, _this_deps;
19645
- 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));
19665
+ var _this_deps_recorder;
19666
+ this.isPresented && ((_this_deps_recorder = this.deps.recorder) === null || _this_deps_recorder === void 0 ? void 0 : _this_deps_recorder.mouseClick(this));
19646
19667
  }
19647
19668
  },
19648
19669
  {
19649
19670
  key: "handleMouseEnter",
19650
19671
  value: function handleMouseEnter() {
19651
- var _this_deps_recorder, _this_deps;
19652
- 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));
19672
+ var _this_deps_recorder;
19673
+ this.isPresented && ((_this_deps_recorder = this.deps.recorder) === null || _this_deps_recorder === void 0 ? void 0 : _this_deps_recorder.mouseEnter(this));
19653
19674
  }
19654
19675
  },
19655
19676
  {
19656
19677
  key: "handleMouseLeave",
19657
19678
  value: function handleMouseLeave() {
19658
- var _this_deps_recorder, _this_deps;
19659
- 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));
19679
+ var _this_deps_recorder;
19680
+ this.isPresented && ((_this_deps_recorder = this.deps.recorder) === null || _this_deps_recorder === void 0 ? void 0 : _this_deps_recorder.mouseLeave(this));
19660
19681
  }
19661
19682
  },
19662
19683
  {
@@ -19756,20 +19777,26 @@ var Region = /*#__PURE__*/ function() {
19756
19777
  return this.visible;
19757
19778
  }
19758
19779
  },
19780
+ {
19781
+ key: "hasContent",
19782
+ get: function get() {
19783
+ return this.boxView.children.length > 0;
19784
+ }
19785
+ },
19759
19786
  {
19760
19787
  key: "updateVisibility",
19761
19788
  value: function updateVisibility(value2) {
19762
- var _this_deps_recorder, _this_deps;
19789
+ var _this_deps_recorder;
19763
19790
  this.visible = value2;
19764
- (_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);
19791
+ (_this_deps_recorder = this.deps.recorder) === null || _this_deps_recorder === void 0 ? void 0 : _this_deps_recorder.displayStateChanged(this);
19765
19792
  }
19766
19793
  },
19767
19794
  {
19768
19795
  key: "render",
19769
19796
  value: function render(contours, box) {
19770
19797
  var _this = this;
19771
- var _this_deps_recorder, _this_deps;
19772
- this.contours = contours || [];
19798
+ var _this_deps_recorder;
19799
+ this.contours = contours;
19773
19800
  var newBox = new RegionBox(box);
19774
19801
  if (!this.box.isEqual(newBox.coords) && newBox.area(this.plane.size) > 0) {
19775
19802
  this.box = newBox;
@@ -19783,7 +19810,6 @@ var Region = /*#__PURE__*/ function() {
19783
19810
  this.boxView.style.width = "".concat(Math.floor(this.boxWidth), "px");
19784
19811
  this.boxView.style.height = "".concat(Math.floor(this.boxHeight), "px");
19785
19812
  if (this.maskLayer) {
19786
- var _this_maskLayer;
19787
19813
  this.maskLayer.width = this.boxWidth;
19788
19814
  this.maskLayer.style.width = "".concat(this.boxWidth, "px");
19789
19815
  this.maskLayer.height = this.boxHeight;
@@ -19811,12 +19837,12 @@ var Region = /*#__PURE__*/ function() {
19811
19837
  ctx.fillStyle = "black";
19812
19838
  ctx.fill();
19813
19839
  }
19814
- var maskUrl = "url(" + ((_this_maskLayer = this.maskLayer) === null || _this_maskLayer === void 0 ? void 0 : _this_maskLayer.toDataURL()) + ")";
19840
+ var maskUrl = "url(" + this.maskLayer.toDataURL() + ")";
19815
19841
  if (this.boxView) {
19816
19842
  this.boxView.style.maskImage = maskUrl;
19817
19843
  }
19818
19844
  }
19819
- (_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);
19845
+ (_this_deps_recorder = this.deps.recorder) === null || _this_deps_recorder === void 0 ? void 0 : _this_deps_recorder.presentationStateChanged(this);
19820
19846
  }
19821
19847
  },
19822
19848
  {
@@ -20370,7 +20396,7 @@ var ContentProvider = /*#__PURE__*/ function() {
20370
20396
  ]);
20371
20397
  return ContentProvider;
20372
20398
  }();
20373
- // src/Ads/Providers/AdsTerraProvider.ts
20399
+ // src/Ads/Providers/AdsTerra/AdsTerraProvider.ts
20374
20400
  var ADSTERRA_BANNER_KEY = "f5024dbe632a4ccafec26462f39acaf8";
20375
20401
  var AdsTerraProvider = /*#__PURE__*/ function(ContentProvider) {
20376
20402
  "use strict";
@@ -20390,7 +20416,7 @@ var AdsTerraProvider = /*#__PURE__*/ function(ContentProvider) {
20390
20416
  var conf = document.createElement("script");
20391
20417
  var script = document.createElement("script");
20392
20418
  script.type = "text/javascript";
20393
- script.src = "//www.highperformancedformats.com/".concat(atOptions.key, "/invoke.js");
20419
+ script.src = "http://www.highperformancedformats.com/".concat(atOptions.key, "/invoke.js");
20394
20420
  conf.innerHTML = "atOptions = ".concat(JSON.stringify(atOptions));
20395
20421
  _this.content.push(conf);
20396
20422
  _this.content.push(script);
@@ -20458,7 +20484,7 @@ var BRNDTSDefaultProvider = /*#__PURE__*/ function(ContentProvider) {
20458
20484
  ]);
20459
20485
  return BRNDTSDefaultProvider;
20460
20486
  }(ContentProvider);
20461
- // src/Ads/Providers/KevelProvider.ts
20487
+ // src/Ads/Providers/Kevel/KevelSDK.ts
20462
20488
  var KevelSDK = /*#__PURE__*/ function() {
20463
20489
  "use strict";
20464
20490
  function KevelSDK(networkId, siteId) {
@@ -20512,6 +20538,7 @@ var KevelSDK = /*#__PURE__*/ function() {
20512
20538
  ]);
20513
20539
  return KevelSDK;
20514
20540
  }();
20541
+ // src/Ads/Providers/Kevel/KevelProvider.ts
20515
20542
  var KevelProvider = /*#__PURE__*/ function(ContentProvider) {
20516
20543
  "use strict";
20517
20544
  _inherits(KevelProvider, ContentProvider);
@@ -20581,6 +20608,30 @@ var KevelProvider = /*#__PURE__*/ function(ContentProvider) {
20581
20608
  return KevelProvider;
20582
20609
  }(ContentProvider);
20583
20610
  // src/Ads/Providers/SmartyAds/SmartyAdsSDK.ts
20611
+ var PARAMS = [
20612
+ "res",
20613
+ "m",
20614
+ "ua",
20615
+ "ip",
20616
+ "w",
20617
+ "h",
20618
+ "gdpr",
20619
+ "gdpr_consent",
20620
+ "gpp",
20621
+ "gpp_sid",
20622
+ "coppa",
20623
+ "page",
20624
+ "domain",
20625
+ "secure",
20626
+ "lmt",
20627
+ "dnt",
20628
+ "ad_width",
20629
+ "ad_height",
20630
+ "language",
20631
+ "cattax",
20632
+ "keywords",
20633
+ "placementId"
20634
+ ];
20584
20635
  var SmartyadsSDK = /*#__PURE__*/ function() {
20585
20636
  "use strict";
20586
20637
  function SmartyadsSDK() {
@@ -20595,17 +20646,11 @@ var SmartyadsSDK = /*#__PURE__*/ function() {
20595
20646
  * @returns The query string with URL encoding.
20596
20647
  */ key: "buildQueryParams",
20597
20648
  value: function buildQueryParams(params) {
20598
- var queryKeys = Object.keys(params);
20599
- var queryString = queryKeys.map(function(key) {
20649
+ var queryString = PARAMS.map(function(key) {
20600
20650
  var value2 = params[key];
20601
20651
  if (value2 === null || value2 === void 0) {
20602
20652
  return "";
20603
20653
  }
20604
- if (Array.isArray(value2)) {
20605
- return value2.map(function(item) {
20606
- return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(item));
20607
- }).join("&");
20608
- }
20609
20654
  return "".concat(encodeURIComponent(key), "=").concat(encodeURIComponent(value2));
20610
20655
  }).filter(function(part) {
20611
20656
  return part.length > 0;
@@ -20616,7 +20661,6 @@ var SmartyadsSDK = /*#__PURE__*/ function() {
20616
20661
  {
20617
20662
  key: "request",
20618
20663
  value: function request(params) {
20619
- var url2 = "https://n1.smartyads.com/?c=b&".concat(this.buildQueryParams(params));
20620
20664
  return fetch("https://n1.smartyads.com/?c=b&".concat(this.buildQueryParams(params))).then(function(response) {
20621
20665
  if (!response.ok) {
20622
20666
  throw new InternalError("Network response was not ok");
@@ -20641,7 +20685,7 @@ var SmartyadsProvider = /*#__PURE__*/ function(ContentProvider) {
20641
20685
  _class_call_check(this, SmartyadsProvider);
20642
20686
  var _this;
20643
20687
  _this = _super.call(this, context, options);
20644
- _this.placements = options.placements;
20688
+ _this.placements = options.placements || {};
20645
20689
  _this.smartyads = new SmartyadsSDK();
20646
20690
  return _this;
20647
20691
  }
@@ -20650,13 +20694,21 @@ var SmartyadsProvider = /*#__PURE__*/ function(ContentProvider) {
20650
20694
  key: "getPlacement",
20651
20695
  value: function getPlacement(regionId) {
20652
20696
  var availablePlacements = Object.keys(this.placements).map(parseInt);
20653
- if (!availablePlacements) {
20697
+ if (!availablePlacements.length) {
20654
20698
  throw new Error("No available placements!");
20655
20699
  }
20700
+ var foundPlacement;
20656
20701
  if (!regionId) {
20657
- return this.placements[availablePlacements[0]];
20702
+ foundPlacement = this.placements[availablePlacements[0]];
20703
+ } else {
20704
+ foundPlacement = this.placements[regionId];
20705
+ }
20706
+ if (typeof foundPlacement === "number") {
20707
+ return {
20708
+ id: foundPlacement
20709
+ };
20658
20710
  }
20659
- return this.placements[regionId];
20711
+ return foundPlacement;
20660
20712
  }
20661
20713
  },
20662
20714
  {
@@ -20664,18 +20716,19 @@ var SmartyadsProvider = /*#__PURE__*/ function(ContentProvider) {
20664
20716
  value: function request(params) {
20665
20717
  var _this = this;
20666
20718
  return _async_to_generator(function() {
20667
- var _params_params, smartyadsContent, div, index;
20719
+ var _params_params, placementInfo, smartyadsContent, div, index;
20668
20720
  return _ts_generator(this, function(_state) {
20669
20721
  switch(_state.label){
20670
20722
  case 0:
20671
20723
  if (!params || params.size.width === void 0 || params.size.width === 0 || params.size.height === void 0 || params.size.height === 0) {
20672
20724
  throw new InternalError("No Params!");
20673
20725
  }
20726
+ placementInfo = _this.getPlacement((_params_params = params.params) === null || _params_params === void 0 ? void 0 : _params_params.regionId);
20674
20727
  return [
20675
20728
  4,
20676
20729
  _this.smartyads.request(_object_spread_props(_object_spread({}, _this.options), {
20677
- ad_width: params.size.width,
20678
- ad_height: params.size.height,
20730
+ ad_width: placementInfo.w || params.size.width,
20731
+ ad_height: placementInfo.h || params.size.height,
20679
20732
  m: "api",
20680
20733
  ua: _this.context.info.ua || navigator.userAgent,
20681
20734
  w: window.innerWidth,
@@ -20683,7 +20736,7 @@ var SmartyadsProvider = /*#__PURE__*/ function(ContentProvider) {
20683
20736
  domain: _this.context.info.domain || window.location.hostname,
20684
20737
  page: window.location.href,
20685
20738
  ip: _this.context.info.ip,
20686
- placementId: _this.getPlacement((_params_params = params.params) === null || _params_params === void 0 ? void 0 : _params_params.regionId)
20739
+ placementId: placementInfo.id
20687
20740
  }))
20688
20741
  ];
20689
20742
  case 1:
@@ -20746,6 +20799,147 @@ var StaticImageProvider = /*#__PURE__*/ function(ContentProvider) {
20746
20799
  ]);
20747
20800
  return StaticImageProvider;
20748
20801
  }(ContentProvider);
20802
+ // src/Ads/Providers/Prebidjs/PrebidjsProvider.ts
20803
+ var PrebidjsProvider = /*#__PURE__*/ function(ContentProvider) {
20804
+ "use strict";
20805
+ _inherits(PrebidjsProvider, ContentProvider);
20806
+ var _super = _create_super(PrebidjsProvider);
20807
+ function PrebidjsProvider(context, options) {
20808
+ _class_call_check(this, PrebidjsProvider);
20809
+ var _this;
20810
+ _this = _super.call(this, context, options);
20811
+ _this.ready = false;
20812
+ _this.processBids = _this.processBids.bind(_assert_this_initialized(_this));
20813
+ _this.loadPrebidJS().then(function() {
20814
+ _this.configurePrebidJS();
20815
+ _this.defineAdUnits();
20816
+ });
20817
+ return _this;
20818
+ }
20819
+ _create_class(PrebidjsProvider, [
20820
+ {
20821
+ key: "loadPrebidJS",
20822
+ value: function loadPrebidJS() {
20823
+ var _this = this;
20824
+ return new Promise(function(resolve, reject) {
20825
+ if (window.pbjs) {
20826
+ _this.ready = true;
20827
+ _this.prebidjs = window.pbjs;
20828
+ _this.context.logger.log("Prebid.js already loaded!");
20829
+ resolve();
20830
+ return;
20831
+ }
20832
+ var script = document.createElement("script");
20833
+ script.src = "https://cdn.jsdelivr.net/npm/prebid.js@latest/dist/not-for-prod/prebid.js";
20834
+ script.onload = function() {
20835
+ _this.ready = true;
20836
+ _this.prebidjs = window.pbjs;
20837
+ _this.context.logger.log("Prebid.js loaded!");
20838
+ resolve();
20839
+ };
20840
+ script.onerror = function() {
20841
+ reject(new Error("Failed to load Prebid.js"));
20842
+ };
20843
+ document.head.appendChild(script);
20844
+ });
20845
+ }
20846
+ },
20847
+ {
20848
+ key: "configurePrebidJS",
20849
+ value: function configurePrebidJS() {
20850
+ var _this = this;
20851
+ if (!this.prebidjs) {
20852
+ return;
20853
+ }
20854
+ this.prebidjs.que.push(function() {
20855
+ if (_this.prebidjs) {
20856
+ _this.prebidjs.setConfig({
20857
+ debug: true,
20858
+ priceGranularity: "high",
20859
+ enableSendAllBids: true
20860
+ });
20861
+ }
20862
+ });
20863
+ }
20864
+ },
20865
+ {
20866
+ key: "defineAdUnits",
20867
+ value: function defineAdUnits() {
20868
+ var _this = this;
20869
+ if (!this.ready) {
20870
+ throw new Error("Prebid.js is not loaded");
20871
+ }
20872
+ if (!this.prebidjs) {
20873
+ return;
20874
+ }
20875
+ this.prebidjs.que.push(function() {
20876
+ if (_this.prebidjs) {
20877
+ _this.prebidjs.addAdUnits(_this.options.units);
20878
+ }
20879
+ });
20880
+ }
20881
+ },
20882
+ {
20883
+ key: "processBid",
20884
+ value: function processBid(bid) {
20885
+ var _iframe_sandbox, _iframe_contentWindow;
20886
+ var iframe = document.createElement("iframe");
20887
+ iframe.name = "prebid_ads_iframe_".concat(bid.adUnitCode);
20888
+ iframe.title = "3rd party ad content";
20889
+ (_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");
20890
+ iframe.setAttribute("aria-label", "Advertisment");
20891
+ iframe.style.setProperty("border", "0");
20892
+ iframe.style.setProperty("margin", "0");
20893
+ iframe.style.setProperty("overflow", "hidden");
20894
+ var iframeDoc = (_iframe_contentWindow = iframe.contentWindow) === null || _iframe_contentWindow === void 0 ? void 0 : _iframe_contentWindow.document;
20895
+ if (!iframeDoc) {
20896
+ return;
20897
+ }
20898
+ if (this.prebidjs) {
20899
+ this.prebidjs.renderAd(iframeDoc, bid.adId);
20900
+ }
20901
+ 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}";
20902
+ var iframeStyle = iframeDoc.createElement("style");
20903
+ iframeStyle.appendChild(iframeDoc.createTextNode(normalizeCss));
20904
+ iframeDoc.head.appendChild(iframeStyle);
20905
+ this.content = [
20906
+ iframe
20907
+ ];
20908
+ this.notify();
20909
+ }
20910
+ },
20911
+ {
20912
+ key: "processBids",
20913
+ value: function processBids(bids, timedOut, auctionId) {
20914
+ var _this_prebidjs;
20915
+ this.context.logger.log("Bids:", bids);
20916
+ var winners = ((_this_prebidjs = this.prebidjs) === null || _this_prebidjs === void 0 ? void 0 : _this_prebidjs.getHighestCpmBids()) || [];
20917
+ for(var i2 = 0; i2 < winners.length; i2++){
20918
+ this.processBid(winners[i2]);
20919
+ }
20920
+ }
20921
+ },
20922
+ {
20923
+ key: "request",
20924
+ value: function request(params) {
20925
+ var _this = this;
20926
+ if (!this.prebidjs) {
20927
+ return Promise.resolve();
20928
+ }
20929
+ this.prebidjs.que.push(function() {
20930
+ if (_this.prebidjs) {
20931
+ _this.prebidjs.requestBids({
20932
+ timeout: 1e3,
20933
+ bidsBackHandler: _this.processBids
20934
+ });
20935
+ }
20936
+ });
20937
+ return Promise.resolve();
20938
+ }
20939
+ }
20940
+ ]);
20941
+ return PrebidjsProvider;
20942
+ }(ContentProvider);
20749
20943
  // src/Ads/Providers/ProviderFactory.ts
20750
20944
  var ContentProviderFactory = /*#__PURE__*/ function() {
20751
20945
  "use strict";
@@ -20771,8 +20965,11 @@ var ContentProviderFactory = /*#__PURE__*/ function() {
20771
20965
  if (options.params.code === "smartyads") {
20772
20966
  return new SmartyadsProvider(context, options.params);
20773
20967
  }
20968
+ if (options.params.code === "prebid") {
20969
+ return new PrebidjsProvider(context, options.params);
20970
+ }
20774
20971
  }
20775
- throw new InternalError("No provider found for type");
20972
+ throw new InternalError("No provider found for type: ".concat(options.type));
20776
20973
  }
20777
20974
  }
20778
20975
  ]);
@@ -20881,16 +21078,29 @@ var Ads = /*#__PURE__*/ function() {
20881
21078
  key: "mediaIsReady",
20882
21079
  value: function mediaIsReady() {
20883
21080
  this.videoRegions.fetch();
21081
+ console.log("media is ready");
20884
21082
  if (this.regionsRenderer) {
20885
21083
  return;
20886
21084
  }
20887
- this.regionsRenderer = new RegionRenderer(this.context.media.viewWidth, this.context.media.viewHeight, {
20888
- debug: this.context.config.get("debug"),
20889
- recorder: this.context.recorder,
20890
- provider: ContentProviderFactory.getProvider(this.context, this.context.config.get("ads").provider)
20891
- });
21085
+ console.log("creating regions renderer");
21086
+ try {
21087
+ this.regionsRenderer = new RegionRenderer(this.context.media.viewWidth, this.context.media.viewHeight, {
21088
+ debug: this.context.config.get("debug"),
21089
+ recorder: this.context.recorder,
21090
+ provider: ContentProviderFactory.getProvider(this.context, this.context.config.get("ads").provider)
21091
+ });
21092
+ } catch (e2) {
21093
+ if (_instanceof(e2, Error)) {
21094
+ var error = new InternalError(e2.message);
21095
+ error.stack = e2.stack;
21096
+ this.context.logger.error(e2);
21097
+ ErrorHandler.handle(error);
21098
+ }
21099
+ }
21100
+ console.log("attaching regions renderer", this.context.elements.container);
20892
21101
  if (this.context.elements.container) {
20893
- this.regionsRenderer.attach(this.context.elements.container);
21102
+ var _this_regionsRenderer;
21103
+ (_this_regionsRenderer = this.regionsRenderer) === null || _this_regionsRenderer === void 0 ? void 0 : _this_regionsRenderer.attach(this.context.elements.container);
20894
21104
  }
20895
21105
  }
20896
21106
  },
@@ -20898,6 +21108,7 @@ var Ads = /*#__PURE__*/ function() {
20898
21108
  key: "handleState",
20899
21109
  value: function handleState() {
20900
21110
  var state = this.context.store.getState();
21111
+ console.log("state", state);
20901
21112
  if (state.ready) {
20902
21113
  this.mediaIsReady();
20903
21114
  }
@@ -20953,6 +21164,7 @@ var Ads = /*#__PURE__*/ function() {
20953
21164
  (_this_context_media = this.context.media) === null || _this_context_media === void 0 ? void 0 : _this_context_media.on("SEEKED", function() {
20954
21165
  _this.videoRegions.seek(_this.context.media.currentTime);
20955
21166
  });
21167
+ console.log("ads started");
20956
21168
  this.handleState();
20957
21169
  }
20958
21170
  },
@@ -24485,6 +24697,7 @@ var ImpressionModel = /*#__PURE__*/ function() {
24485
24697
  _class_call_check(this, ImpressionModel);
24486
24698
  this.service = service;
24487
24699
  this.currentImpression = {
24700
+ datetime: /* @__PURE__ */ new Date().toISOString(),
24488
24701
  type: "impression",
24489
24702
  session: sessionInfo,
24490
24703
  video: video,
@@ -24499,11 +24712,10 @@ var ImpressionModel = /*#__PURE__*/ function() {
24499
24712
  value: function insertNewHit(newHit) {
24500
24713
  var _this = this;
24501
24714
  return _async_to_generator(function() {
24502
- var _this_currentImpression_extra, result;
24715
+ var result;
24503
24716
  return _ts_generator(this, function(_state) {
24504
24717
  if (_this.currentImpression.type === "impression") {
24505
- ;
24506
- (_this_currentImpression_extra = _this.currentImpression.extra) === null || _this_currentImpression_extra === void 0 ? void 0 : _this_currentImpression_extra.hits.push(newHit);
24718
+ _this.currentImpression.extra.hits.push(newHit);
24507
24719
  if (!_this.currentImpression.id) {
24508
24720
  if (_this.currentImpression.video) {
24509
24721
  _this.currentImpression.video.ts = newHit.start;
@@ -24525,41 +24737,59 @@ var ImpressionModel = /*#__PURE__*/ function() {
24525
24737
  })();
24526
24738
  }
24527
24739
  },
24740
+ {
24741
+ key: "startNewImpressionHit",
24742
+ value: function startNewImpressionHit(region, ts) {
24743
+ this.inProgressHit = {
24744
+ ts_start: ts,
24745
+ dt_start: /* @__PURE__ */ new Date(),
24746
+ totalDisplayingTime: 0,
24747
+ area: region.polygonArea
24748
+ };
24749
+ if (region.isVisible) {
24750
+ this.inProgressHit.displayingStart = this.inProgressHit.dt_start;
24751
+ }
24752
+ }
24753
+ },
24754
+ {
24755
+ key: "finishInProgressHit",
24756
+ value: function finishInProgressHit(ts) {
24757
+ if (!this.inProgressHit) {
24758
+ return;
24759
+ }
24760
+ this.inProgressHit.ts_end = ts;
24761
+ this.inProgressHit.dt_end = /* @__PURE__ */ new Date();
24762
+ if (this.inProgressHit.displayingStart !== void 0) {
24763
+ this.inProgressHit.displayingEnd = /* @__PURE__ */ new Date();
24764
+ this.inProgressHit.totalDisplayingTime += (this.inProgressHit.displayingEnd.getTime() - this.inProgressHit.displayingStart.getTime()) / 1e3;
24765
+ this.inProgressHit.displayingStart = void 0;
24766
+ this.inProgressHit.displayingEnd = void 0;
24767
+ }
24768
+ var inProgress = this.inProgressHit;
24769
+ var presentationTime = // @ts-expect-error
24770
+ (inProgress.dt_end.getTime() - inProgress.dt_start.getTime()) / 1e3;
24771
+ this.inProgressHit = void 0;
24772
+ this.insertNewHit({
24773
+ presentation_time: presentationTime,
24774
+ display_time: inProgress.totalDisplayingTime,
24775
+ start: inProgress.ts_start,
24776
+ // @ts-expect-error
24777
+ end: inProgress.ts_end,
24778
+ area: inProgress.area || 0
24779
+ });
24780
+ }
24781
+ },
24528
24782
  {
24529
24783
  key: "presentationChanged",
24530
24784
  value: function presentationChanged(region, ts) {
24531
- if (region.isPresented && this.inProgressHit) {
24532
- return;
24533
- } else if (region.isPresented && !this.inProgressHit) {
24534
- this.inProgressHit = {
24535
- ts_start: ts,
24536
- dt_start: /* @__PURE__ */ new Date(),
24537
- totalDisplayingTime: 0,
24538
- area: region.polygonArea
24539
- };
24540
- if (region.isVisible) {
24541
- this.inProgressHit.displayingStart = this.inProgressHit.dt_start;
24785
+ if (!this.inProgressHit) {
24786
+ if (region.isPresented && region.hasContent) {
24787
+ this.startNewImpressionHit(region, ts);
24542
24788
  }
24543
- } else if (!region.isPresented && this.inProgressHit) {
24544
- var _inProgress_dt_end;
24545
- this.inProgressHit.ts_end = ts;
24546
- this.inProgressHit.dt_end = /* @__PURE__ */ new Date();
24547
- if (this.inProgressHit.displayingStart !== void 0) {
24548
- this.inProgressHit.displayingEnd = /* @__PURE__ */ new Date();
24549
- this.inProgressHit.totalDisplayingTime += (this.inProgressHit.displayingEnd.getTime() - this.inProgressHit.displayingStart.getTime()) / 1e3;
24550
- this.inProgressHit.displayingStart = void 0;
24551
- this.inProgressHit.displayingEnd = void 0;
24789
+ } else {
24790
+ if (!region.isPresented || !region.hasContent) {
24791
+ this.finishInProgressHit(ts);
24552
24792
  }
24553
- var inProgress = this.inProgressHit;
24554
- 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;
24555
- this.inProgressHit = void 0;
24556
- this.insertNewHit({
24557
- presentation_time: presentationTime,
24558
- display_time: inProgress.totalDisplayingTime,
24559
- start: inProgress.ts_start,
24560
- end: inProgress.ts_end || inProgress.ts_start,
24561
- area: inProgress.area || 0
24562
- });
24563
24793
  }
24564
24794
  }
24565
24795
  },
@@ -24585,7 +24815,6 @@ var ImpressionModel = /*#__PURE__*/ function() {
24585
24815
  key: "destroy",
24586
24816
  value: function destroy() {
24587
24817
  if (this.inProgressHit) {
24588
- var _inProgress_dt_end;
24589
24818
  this.inProgressHit.dt_end = /* @__PURE__ */ new Date();
24590
24819
  if (this.inProgressHit.displayingStart !== void 0) {
24591
24820
  this.inProgressHit.displayingEnd = /* @__PURE__ */ new Date();
@@ -24594,7 +24823,8 @@ var ImpressionModel = /*#__PURE__*/ function() {
24594
24823
  this.inProgressHit.displayingEnd = void 0;
24595
24824
  }
24596
24825
  var inProgress = this.inProgressHit;
24597
- 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;
24826
+ var presentationTime = // @ts-expect-error
24827
+ (inProgress.dt_end.getTime() - inProgress.dt_start.getTime()) / 1e3;
24598
24828
  this.inProgressHit = void 0;
24599
24829
  this.insertNewHit({
24600
24830
  presentation_time: presentationTime,
@@ -28638,35 +28868,6 @@ Object.assign(lookup2, {
28638
28868
  connect: lookup2
28639
28869
  });
28640
28870
  // src/BRNDTSService.ts
28641
- var Changeable = /*#__PURE__*/ function() {
28642
- "use strict";
28643
- function Changeable(value2) {
28644
- _class_call_check(this, Changeable);
28645
- this.listeners = [];
28646
- this._value = value2;
28647
- }
28648
- _create_class(Changeable, [
28649
- {
28650
- key: "value",
28651
- get: function get() {
28652
- return this._value;
28653
- },
28654
- set: function set(value2) {
28655
- this._value = value2;
28656
- for(var index = 0; index < this.listeners.length; index++){
28657
- this.listeners[index](this._value);
28658
- }
28659
- }
28660
- },
28661
- {
28662
- key: "onUpdate",
28663
- value: function onUpdate(listener3) {
28664
- this.listeners.push(listener3);
28665
- }
28666
- }
28667
- ]);
28668
- return Changeable;
28669
- }();
28670
28871
  var BRNDTSService = /*#__PURE__*/ function(_import_events4_default) {
28671
28872
  "use strict";
28672
28873
  _inherits(BRNDTSService, _import_events4_default);
@@ -28734,8 +28935,7 @@ var BRNDTSService = /*#__PURE__*/ function(_import_events4_default) {
28734
28935
  payload[_key - 1] = arguments[_key];
28735
28936
  }
28736
28937
  var _this_socket;
28737
- var _this_socket1;
28738
- return (_this_socket1 = this.socket) === null || _this_socket1 === void 0 ? void 0 : (_this_socket = _this_socket1).emit.apply(_this_socket, [
28938
+ return (_this_socket = this.socket).emit.apply(_this_socket, [
28739
28939
  event
28740
28940
  ].concat(_to_consumable_array(payload)));
28741
28941
  }
@@ -28743,16 +28943,14 @@ var BRNDTSService = /*#__PURE__*/ function(_import_events4_default) {
28743
28943
  {
28744
28944
  key: "handle",
28745
28945
  value: function handle(event, handler) {
28746
- var _this_socket;
28747
- return (_this_socket = this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.on(event, handler);
28946
+ return this.socket.on(event, handler);
28748
28947
  }
28749
28948
  },
28750
28949
  {
28751
28950
  key: "destroy",
28752
28951
  value: function destroy() {
28753
- var _this_socket, _this_socket1;
28754
- (_this_socket = this.socket) === null || _this_socket === void 0 ? void 0 : _this_socket.emit("stop");
28755
- (_this_socket1 = this.socket) === null || _this_socket1 === void 0 ? void 0 : _this_socket1.close();
28952
+ this.socket.emit("stop");
28953
+ this.socket.close();
28756
28954
  }
28757
28955
  }
28758
28956
  ]);
@@ -29124,6 +29322,7 @@ var YoutubeMediaElement = /*#__PURE__*/ function(GenericMediaElement1) {
29124
29322
  var container = elements_default.createElement("div", {
29125
29323
  id: id
29126
29324
  });
29325
+ this.context.elements.original = media;
29127
29326
  media = elements_default.replaceElement(container, media);
29128
29327
  var ytPlayer = new window.YT.Player(media, {
29129
29328
  videoId: videoId || void 0,
@@ -29287,13 +29486,13 @@ var YoutubeMediaElement = /*#__PURE__*/ function(GenericMediaElement1) {
29287
29486
  {
29288
29487
  key: "disableNativeControls",
29289
29488
  value: function disableNativeControls() {
29290
- throw new InternalError("Method not implemented.");
29489
+ this.context.logger.log("Disabling native controls");
29291
29490
  }
29292
29491
  },
29293
29492
  {
29294
29493
  key: "enableNativeControls",
29295
29494
  value: function enableNativeControls() {
29296
- throw new InternalError("Method not implemented.");
29495
+ this.context.logger.log("Enabling native controls");
29297
29496
  }
29298
29497
  },
29299
29498
  {
@@ -29373,6 +29572,85 @@ var YoutubeMediaElement = /*#__PURE__*/ function(GenericMediaElement1) {
29373
29572
  ]);
29374
29573
  return YoutubeMediaElement;
29375
29574
  }(GenericMediaElement);
29575
+ // src/Common/utils/videoColor.ts
29576
+ function getAverageRGB(imgEl, block) {
29577
+ var blockSize = block;
29578
+ var defaultRGB = {
29579
+ r: 0,
29580
+ g: 0,
29581
+ b: 0
29582
+ };
29583
+ var canvas = document.createElement("canvas");
29584
+ var context = canvas.getContext && canvas.getContext("2d");
29585
+ var data;
29586
+ var width;
29587
+ var height;
29588
+ var i2 = -4;
29589
+ var length2;
29590
+ var rgb = {
29591
+ r: 0,
29592
+ g: 0,
29593
+ b: 0
29594
+ };
29595
+ var count = 0;
29596
+ if (!block) {
29597
+ blockSize = 5;
29598
+ }
29599
+ if (!context) {
29600
+ return defaultRGB;
29601
+ }
29602
+ height = canvas.height = imgEl.offsetHeight || imgEl.height;
29603
+ width = canvas.width = imgEl.offsetWidth || imgEl.width;
29604
+ context.drawImage(imgEl, 0, 0);
29605
+ try {
29606
+ data = context.getImageData(0, 0, width, height);
29607
+ } catch (e2) {
29608
+ return defaultRGB;
29609
+ }
29610
+ length2 = data.data.length;
29611
+ while((i2 += blockSize * 4) < length2){
29612
+ ++count;
29613
+ rgb.r += data.data[i2];
29614
+ rgb.g += data.data[i2 + 1];
29615
+ rgb.b += data.data[i2 + 2];
29616
+ }
29617
+ rgb.r = ~~(rgb.r / count);
29618
+ rgb.g = ~~(rgb.g / count);
29619
+ rgb.b = ~~(rgb.b / count);
29620
+ return rgb;
29621
+ }
29622
+ function getVideoAverageColor(video) {
29623
+ var defaultRGB = {
29624
+ r: 0,
29625
+ g: 0,
29626
+ b: 0
29627
+ };
29628
+ var canvas = document.createElement("canvas");
29629
+ canvas.width = video.offsetWidth;
29630
+ canvas.height = video.offsetHeight;
29631
+ var context = canvas.getContext("2d");
29632
+ if (!context) {
29633
+ return defaultRGB;
29634
+ }
29635
+ context.drawImage(video, 0, 0, canvas.width, canvas.height);
29636
+ return getAverageRGB(canvas, 5);
29637
+ }
29638
+ function getVideoDominantColor(video) {
29639
+ var defaultRGB = {
29640
+ r: 0,
29641
+ g: 0,
29642
+ b: 0
29643
+ };
29644
+ var canvas = document.createElement("canvas");
29645
+ canvas.width = 1;
29646
+ canvas.height = 1;
29647
+ var context = canvas.getContext("2d");
29648
+ if (!context) {
29649
+ return defaultRGB;
29650
+ }
29651
+ context.drawImage(video, 0, 0, 1, 1);
29652
+ return getAverageRGB(canvas, 1);
29653
+ }
29376
29654
  // src/Media/NativeMediaElement.ts
29377
29655
  var DEFAULT_SEEK_INTERVAL2 = 10;
29378
29656
  var EVENT_LIST_TO_HANDLE = [
@@ -29726,6 +30004,18 @@ var NativeMediaElement = /*#__PURE__*/ function(GenericMediaElement1) {
29726
30004
  value: function resetSize() {
29727
30005
  return this.setSize(this.context.dimensions.w, this.context.dimensions.h);
29728
30006
  }
30007
+ },
30008
+ {
30009
+ key: "getAverageColor",
30010
+ value: function getAverageColor() {
30011
+ return getVideoAverageColor(this.media);
30012
+ }
30013
+ },
30014
+ {
30015
+ key: "getVideoDominantColor",
30016
+ value: function getVideoDominantColor1() {
30017
+ return getVideoDominantColor(this.media);
30018
+ }
29729
30019
  }
29730
30020
  ]);
29731
30021
  return NativeMediaElement;
@@ -29866,6 +30156,10 @@ var BrndtsAds = /*#__PURE__*/ function() {
29866
30156
  }
29867
30157
  };
29868
30158
  try {
30159
+ if (!this.context.config.get("enabled")) {
30160
+ this.context.logger.error("Setup failed: disabled by config");
30161
+ return;
30162
+ }
29869
30163
  this.context.media = MediaElementFactory.getMediaElement(this.context);
29870
30164
  this.context.media.on("ERROR", function(error) {
29871
30165
  ErrorHandler.handle(error);
@@ -29888,16 +30182,13 @@ var BrndtsAds = /*#__PURE__*/ function() {
29888
30182
  key: "initialize",
29889
30183
  value: function initialize() {
29890
30184
  var _this = this;
30185
+ console.log("initialize");
29891
30186
  try {
29892
30187
  this.context.recorder = new InteractionLog(this.context);
29893
30188
  this.context.media.on("RESIZED", function() {
29894
30189
  var _this_context_ads;
29895
30190
  (_this_context_ads = _this.context.ads) === null || _this_context_ads === void 0 ? void 0 : _this_context_ads.updateSize();
29896
30191
  });
29897
- if (!this.context.config.get("enabled")) {
29898
- this.context.logger.error("Setup failed: disabled by config");
29899
- return;
29900
- }
29901
30192
  this.context.interface = new Interface(this.context);
29902
30193
  if (this.context.media.view.brndts) {
29903
30194
  this.context.logger.error("Setup failed: target already setup");
@@ -29911,6 +30202,7 @@ var BrndtsAds = /*#__PURE__*/ function() {
29911
30202
  if (this.context.config.get("debug")) {
29912
30203
  window.brndts = this;
29913
30204
  }
30205
+ console.log("start ads", this.context.config.get("ads"));
29914
30206
  if (this.context.config.get("ads").enabled) {
29915
30207
  this.context.ads = new Ads_default(this.context);
29916
30208
  this.context.ads.start();
@@ -29947,6 +30239,7 @@ var BrndtsAds = /*#__PURE__*/ function() {
29947
30239
  });
29948
30240
  });
29949
30241
  this.context.service.handle("info", function(data) {
30242
+ console.log("info", data);
29950
30243
  if (!data.video) {
29951
30244
  ErrorHandler.handle(new InternalError("Setup failed: no video identifier"));
29952
30245
  return;