@brndts/brndts-ads 1.13.8 → 1.13.10
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 +17 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -73699,7 +73699,8 @@ var BradmaxMediaElement = /*#__PURE__*/ function(GenericMediaElement) {
|
|
73699
73699
|
var _this = this;
|
73700
73700
|
var _this_instance;
|
73701
73701
|
var videoElement = (_this_instance = this.instance) === null || _this_instance === void 0 ? void 0 : _this_instance.videoElementsManager.videoElementsInUse.find(function(videoElement2) {
|
73702
|
-
|
73702
|
+
var _videoElement2_contextMediaSource;
|
73703
|
+
return ((_videoElement2_contextMediaSource = videoElement2.contextMediaSource) === null || _videoElement2_contextMediaSource === void 0 ? void 0 : _videoElement2_contextMediaSource.url) === _this.source;
|
73703
73704
|
});
|
73704
73705
|
if (videoElement) {
|
73705
73706
|
return videoElement.element;
|
@@ -80032,6 +80033,10 @@ var Interface = /*#__PURE__*/ function(_import_events7_default) {
|
|
80032
80033
|
this.container = this.context.elements.container;
|
80033
80034
|
}
|
80034
80035
|
var backdrop = new Backdrop(this.context);
|
80036
|
+
var existingBackdrop = this.container.querySelector("#".concat(backdrop.view.id));
|
80037
|
+
if (existingBackdrop) {
|
80038
|
+
this.container.removeChild(existingBackdrop);
|
80039
|
+
}
|
80035
80040
|
this.container.firstChild ? this.container.insertBefore(backdrop.view, this.container.firstChild) : this.container.appendChild(backdrop.view);
|
80036
80041
|
this.migrateStyles();
|
80037
80042
|
if (this.media.view) {
|
@@ -80113,6 +80118,8 @@ var Interface = /*#__PURE__*/ function(_import_events7_default) {
|
|
80113
80118
|
value: function destroy() {
|
80114
80119
|
var _this_container_parentElement;
|
80115
80120
|
if (!this.context.elements.original) {
|
80121
|
+
var _this_context_elements_container;
|
80122
|
+
(_this_context_elements_container = this.context.elements.container) === null || _this_context_elements_container === void 0 ? void 0 : _this_context_elements_container.remove();
|
80116
80123
|
return;
|
80117
80124
|
}
|
80118
80125
|
(_this_container_parentElement = this.container.parentElement) === null || _this_container_parentElement === void 0 ? void 0 : _this_container_parentElement.replaceChild(this.context.elements.original, this.container);
|
@@ -81095,6 +81102,13 @@ var RegionRenderer = /*#__PURE__*/ function() {
|
|
81095
81102
|
{
|
81096
81103
|
key: "attach",
|
81097
81104
|
value: function attach(container, before) {
|
81105
|
+
if (!container) {
|
81106
|
+
this.context.logger.error("No container provided for regions");
|
81107
|
+
return;
|
81108
|
+
}
|
81109
|
+
if (container.querySelector("#BRNDTS_ARW")) {
|
81110
|
+
container.removeChild(container.querySelector("#BRNDTS_ARW"));
|
81111
|
+
}
|
81098
81112
|
if (before) {
|
81099
81113
|
container.insertBefore(this.regionsContainerView.view, before);
|
81100
81114
|
} else {
|
@@ -82521,9 +82535,10 @@ var VideoAds = /*#__PURE__*/ function() {
|
|
82521
82535
|
try {
|
82522
82536
|
for(var _iterator = medias[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
82523
82537
|
var media = _step.value;
|
82524
|
-
if (!media || media.closest("#BRNDTS_R") || media.querySelector("#BRNDTS_R")) {
|
82538
|
+
if (!media || media.closest("#BRNDTS_R") || media.querySelector("#BRNDTS_R") || media.dataset.b_I !== void 0) {
|
82525
82539
|
continue;
|
82526
82540
|
}
|
82541
|
+
media.dataset.b_I = "".concat(this.videoAdElements.length);
|
82527
82542
|
var videoAd = new VideoAd(this.context, media);
|
82528
82543
|
this.videoAdElements.push(videoAd);
|
82529
82544
|
videoAd.start();
|