@brndts/brndts-ads 1.13.18 → 1.13.20
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 +9 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -70883,7 +70883,7 @@ var PrebidGAMProvider = /*#__PURE__*/ function(ContentProvider1) {
|
|
70883
70883
|
PrebidGAMEventsInstance.onSlotRenderEnd(function(event) {
|
70884
70884
|
var slot = event.slot;
|
70885
70885
|
if ("".concat(_this.workingSlotId) === event.slot.getSlotElementId()) {
|
70886
|
-
var _this_content_extra_sz, _this_content_extra_sz1;
|
70886
|
+
var _event_size, _this_content_extra_sz, _event_size1, _this_content_extra_sz1;
|
70887
70887
|
if (!_this.content.extra) {
|
70888
70888
|
_this.content.extra = {};
|
70889
70889
|
}
|
@@ -70894,8 +70894,8 @@ var PrebidGAMProvider = /*#__PURE__*/ function(ContentProvider1) {
|
|
70894
70894
|
_this.content.extra.bidder = slot.getTargeting("hb_bidder")[0];
|
70895
70895
|
}
|
70896
70896
|
_this.content.extra.sz = {
|
70897
|
-
w: event.size[0] || ((_this_content_extra_sz = _this.content.extra.sz) === null || _this_content_extra_sz === void 0 ? void 0 : _this_content_extra_sz.w) || 0,
|
70898
|
-
h: event.size[1] || ((_this_content_extra_sz1 = _this.content.extra.sz) === null || _this_content_extra_sz1 === void 0 ? void 0 : _this_content_extra_sz1.h) || 0
|
70897
|
+
w: ((_event_size = event.size) === null || _event_size === void 0 ? void 0 : _event_size[0]) || ((_this_content_extra_sz = _this.content.extra.sz) === null || _this_content_extra_sz === void 0 ? void 0 : _this_content_extra_sz.w) || 0,
|
70898
|
+
h: ((_event_size1 = event.size) === null || _event_size1 === void 0 ? void 0 : _event_size1[1]) || ((_this_content_extra_sz1 = _this.content.extra.sz) === null || _this_content_extra_sz1 === void 0 ? void 0 : _this_content_extra_sz1.h) || 0
|
70899
70899
|
};
|
70900
70900
|
_this.content.pending = false;
|
70901
70901
|
_this.fullfill();
|
@@ -74321,6 +74321,9 @@ var BradmaxMediaElement = /*#__PURE__*/ function(GenericMediaElement) {
|
|
74321
74321
|
}(GenericMediaElement);
|
74322
74322
|
// src/Ads/VideoAds/Media/DailymotionMediaElement.ts
|
74323
74323
|
var URLMatch = /^https:\/\/geo\.dailymotion\.com\/player(?:\/[a-zA-Z0-9]+)?\.html\?video=([a-zA-Z0-9]+)/;
|
74324
|
+
function generateId2(prefix) {
|
74325
|
+
return "".concat(prefix, "-").concat(Math.floor(Math.random() * 1e4));
|
74326
|
+
}
|
74324
74327
|
function aspectRatioToNumber(ratioString) {
|
74325
74328
|
var parts2 = ratioString.split(":");
|
74326
74329
|
if (parts2.length !== 2) {
|
@@ -74498,6 +74501,9 @@ var DailymotionMediaElement = /*#__PURE__*/ function(GenericMediaElement) {
|
|
74498
74501
|
key: "setMediaElement",
|
74499
74502
|
value: function setMediaElement(target) {
|
74500
74503
|
var _this = this;
|
74504
|
+
if (!target.id) {
|
74505
|
+
target.id = generateId2("brndts-dailymotion");
|
74506
|
+
}
|
74501
74507
|
this.context.logger.log("Checking DM API");
|
74502
74508
|
if (is_default.object(window.dailymotion)) {
|
74503
74509
|
this.context.logger.log("DM API is already loaded");
|