prebid.js 7.22.0 → 7.24.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/33acrossBidAdapter.js +1 -1
- package/dist/aaxBlockmeterRtdProvider.js +1 -0
- package/dist/adagioBidAdapter.js +1 -1
- package/dist/adbookpspBidAdapter.js +1 -1
- package/dist/adgenerationBidAdapter.js +1 -1
- package/dist/admaticBidAdapter.js +1 -0
- package/dist/adrelevantisBidAdapter.js +1 -1
- package/dist/adtrgtmeBidAdapter.js +1 -1
- package/dist/adxcgBidAdapter.js +1 -1
- package/dist/adyoulikeBidAdapter.js +1 -1
- package/dist/ajaBidAdapter.js +1 -1
- package/dist/amxBidAdapter.js +1 -1
- package/dist/amxIdSystem.js +1 -1
- package/dist/analyticsAdapter.js +1 -1
- package/dist/appierAnalyticsAdapter.js +1 -1
- package/dist/appnexusBidAdapter.js +1 -1
- package/dist/asoBidAdapter.js +1 -1
- package/dist/audiencerunBidAdapter.js +1 -1
- package/dist/axonixBidAdapter.js +1 -1
- package/dist/bidViewability.js +1 -1
- package/dist/bidViewabilityIO.js +1 -1
- package/dist/bidglassBidAdapter.js +1 -1
- package/dist/big-richmediaBidAdapter.js +1 -1
- package/dist/bluebillywigBidAdapter.js +1 -1
- package/dist/bridgewellBidAdapter.js +1 -1
- package/dist/brightMountainMediaBidAdapter.js +1 -1
- package/dist/browsiRtdProvider.js +1 -1
- package/dist/carodaBidAdapter.js +1 -1
- package/dist/chtnwBidAdapter.js +1 -0
- package/dist/cleanioRtdProvider.js +1 -1
- package/dist/concertBidAdapter.js +1 -1
- package/dist/connectIdSystem.js +1 -1
- package/dist/connectadBidAdapter.js +1 -1
- package/dist/consentManagement.js +1 -1
- package/dist/consentManagementUsp.js +1 -1
- package/dist/consumableBidAdapter.js +1 -1
- package/dist/conversantBidAdapter.js +1 -1
- package/dist/craftBidAdapter.js +1 -1
- package/dist/criteoBidAdapter.js +1 -1
- package/dist/currency.js +1 -1
- package/dist/dependencies.json +19 -0
- package/dist/dfpAdServerVideo.js +1 -1
- package/dist/dgkeywordRtdProvider.js +1 -1
- package/dist/dspxBidAdapter.js +1 -1
- package/dist/eplanningBidAdapter.js +1 -1
- package/dist/finativeBidAdapter.js +1 -1
- package/dist/gdprEnforcement.js +1 -1
- package/dist/glimpseBidAdapter.js +1 -1
- package/dist/gmosspBidAdapter.js +1 -1
- package/dist/goldbachBidAdapter.js +1 -1
- package/dist/googleAnalyticsAdapter.js +1 -1
- package/dist/gridBidAdapter.js +1 -1
- package/dist/gridNMBidAdapter.js +1 -1
- package/dist/growthCodeIdSystem.js +1 -1
- package/dist/gumgumBidAdapter.js +1 -1
- package/dist/h12mediaBidAdapter.js +1 -1
- package/dist/id5AnalyticsAdapter.js +1 -1
- package/dist/id5IdSystem.js +1 -1
- package/dist/impactifyBidAdapter.js +1 -1
- package/dist/improvedigitalBidAdapter.js +1 -1
- package/dist/inmarBidAdapter.js +1 -1
- package/dist/insticatorBidAdapter.js +1 -1
- package/dist/instreamTracking.js +1 -1
- package/dist/ixBidAdapter.js +1 -1
- package/dist/jixieBidAdapter.js +1 -1
- package/dist/justpremiumBidAdapter.js +1 -1
- package/dist/jwplayerVideoProvider.js +1 -0
- package/dist/kargoBidAdapter.js +1 -1
- package/dist/konduitAnalyticsAdapter.js +1 -1
- package/dist/kueezBidAdapter.js +1 -1
- package/dist/kueezRtbBidAdapter.js +1 -0
- package/dist/lassoBidAdapter.js +1 -1
- package/dist/lifestreetBidAdapter.js +1 -1
- package/dist/liveyieldAnalyticsAdapter.js +1 -1
- package/dist/logicadBidAdapter.js +1 -1
- package/dist/loglyliftBidAdapter.js +1 -1
- package/dist/magniteAnalyticsAdapter.js +1 -1
- package/dist/malltvAnalyticsAdapter.js +1 -1
- package/dist/marsmediaBidAdapter.js +1 -1
- package/dist/mediafuseBidAdapter.js +1 -1
- package/dist/mediakeysBidAdapter.js +1 -1
- package/dist/mediasquareBidAdapter.js +1 -1
- package/dist/mgidBidAdapter.js +1 -1
- package/dist/mgidRtdProvider.js +1 -0
- package/dist/minutemediaBidAdapter.js +1 -1
- package/dist/multibid.js +1 -1
- package/dist/not-for-prod/prebid.js +153 -141
- package/dist/oguryBidAdapter.js +1 -1
- package/dist/onetagBidAdapter.js +1 -1
- package/dist/ooloAnalyticsAdapter.js +1 -1
- package/dist/openxOrtbBidAdapter.js +1 -1
- package/dist/ortbConverter.js +1 -0
- package/dist/outbrainBidAdapter.js +1 -1
- package/dist/oxxionRtdProvider.js +1 -0
- package/dist/parrableIdSystem.js +1 -1
- package/dist/pbsExtensions.js +1 -0
- package/dist/permutiveRtdProvider.js +1 -1
- package/dist/pixfutureBidAdapter.js +1 -1
- package/dist/prebid-core.js +1 -1
- package/dist/prebidServerBidAdapter.js +1 -1
- package/dist/priceFloors.js +1 -1
- package/dist/pubCommonId.js +1 -1
- package/dist/publinkIdSystem.js +1 -1
- package/dist/pubmaticBidAdapter.js +1 -1
- package/dist/pubwiseAnalyticsAdapter.js +1 -1
- package/dist/pxyzBidAdapter.js +1 -1
- package/dist/quantcastBidAdapter.js +1 -1
- package/dist/readpeakBidAdapter.js +1 -1
- package/dist/relaidoBidAdapter.js +1 -1
- package/dist/rhythmoneBidAdapter.js +1 -1
- package/dist/riseBidAdapter.js +1 -1
- package/dist/rtdModule.js +1 -1
- package/dist/rubiconAnalyticsAdapter.js +1 -1
- package/dist/rubiconBidAdapter.js +1 -1
- package/dist/schain.js +1 -1
- package/dist/seedingAllianceBidAdapter.js +1 -1
- package/dist/seedtagBidAdapter.js +1 -1
- package/dist/sharethroughAnalyticsAdapter.js +1 -1
- package/dist/sharethroughBidAdapter.js +1 -1
- package/dist/shinezBidAdapter.js +1 -1
- package/dist/smaatoBidAdapter.js +1 -1
- package/dist/smartadserverBidAdapter.js +1 -1
- package/dist/smartxBidAdapter.js +1 -1
- package/dist/smilewantedBidAdapter.js +1 -1
- package/dist/sonobiBidAdapter.js +1 -1
- package/dist/sovrnAnalyticsAdapter.js +1 -1
- package/dist/sovrnBidAdapter.js +1 -1
- package/dist/spotxBidAdapter.js +1 -1
- package/dist/sspBCBidAdapter.js +1 -1
- package/dist/sublimeBidAdapter.js +1 -1
- package/dist/synacormediaBidAdapter.js +1 -1
- package/dist/targetVideoBidAdapter.js +1 -1
- package/dist/teadsBidAdapter.js +1 -1
- package/dist/teadsIdSystem.js +1 -1
- package/dist/trionBidAdapter.js +1 -1
- package/dist/tripleliftBidAdapter.js +1 -1
- package/dist/ttdBidAdapter.js +1 -1
- package/dist/ucfunnelAnalyticsAdapter.js +1 -1
- package/dist/underdogmediaBidAdapter.js +1 -1
- package/dist/undertoneBidAdapter.js +1 -1
- package/dist/userId.js +1 -1
- package/dist/vidazooBidAdapter.js +1 -1
- package/dist/video.js +1 -0
- package/dist/videoModule.js +1 -0
- package/dist/videobyteBidAdapter.js +1 -1
- package/dist/videojsVideoProvider.js +1 -0
- package/dist/visxBidAdapter.js +1 -1
- package/dist/vuukleBidAdapter.js +1 -1
- package/dist/widespaceBidAdapter.js +1 -1
- package/dist/winrBidAdapter.js +1 -1
- package/dist/yahoosspBidAdapter.js +1 -1
- package/dist/yieldmoBidAdapter.js +1 -1
- package/dist/yieldoneAnalyticsAdapter.js +1 -1
- package/integrationExamples/gpt/mgidRtdProvider_example.html +143 -0
- package/integrationExamples/videoModule/jwplayer/bidMarkedAsUsed.html +98 -0
- package/integrationExamples/videoModule/jwplayer/bidRequestScheduling.html +89 -0
- package/integrationExamples/videoModule/jwplayer/eventListeners.html +244 -0
- package/integrationExamples/videoModule/jwplayer/gamAdServerMediation.html +122 -0
- package/integrationExamples/videoModule/jwplayer/mediaMetadata.html +80 -0
- package/integrationExamples/videoModule/jwplayer/playlist.html +122 -0
- package/integrationExamples/videoModule/videojs/bidMarkedAsUsed.html +126 -0
- package/integrationExamples/videoModule/videojs/bidRequestScheduling.html +132 -0
- package/integrationExamples/videoModule/videojs/eventListeners.html +238 -0
- package/integrationExamples/videoModule/videojs/gamAdServerMediation.html +138 -0
- package/integrationExamples/videoModule/videojs/mediaMetadata.html +103 -0
- package/integrationExamples/videoModule/videojs/playlist.html +151 -0
- package/libraries/ortbConverter/README.md +378 -0
- package/libraries/ortbConverter/converter.js +135 -0
- package/libraries/ortbConverter/lib/composer.js +43 -0
- package/libraries/ortbConverter/lib/mergeProcessors.js +9 -0
- package/libraries/ortbConverter/lib/sizes.js +14 -0
- package/libraries/ortbConverter/processors/banner.js +40 -0
- package/libraries/ortbConverter/processors/default.js +167 -0
- package/libraries/ortbConverter/processors/mediaType.js +21 -0
- package/libraries/ortbConverter/processors/native.js +37 -0
- package/libraries/ortbConverter/processors/video.js +66 -0
- package/libraries/pbsExtensions/pbsExtensions.js +12 -0
- package/libraries/pbsExtensions/processors/aliases.js +17 -0
- package/libraries/pbsExtensions/processors/mediaType.js +23 -0
- package/libraries/pbsExtensions/processors/params.js +22 -0
- package/libraries/pbsExtensions/processors/pbs.js +99 -0
- package/libraries/pbsExtensions/processors/requestExtPrebid.js +30 -0
- package/libraries/pbsExtensions/processors/video.js +23 -0
- package/libraries/video/constants/enums.js +5 -0
- package/libraries/video/constants/events.js +97 -0
- package/libraries/video/constants/ortb.js +169 -0
- package/libraries/video/constants/vendorCodes.js +6 -0
- package/libraries/video/shared/eventHandler.js +18 -0
- package/libraries/video/shared/parentModule.js +82 -0
- package/libraries/video/shared/state.js +47 -0
- package/libraries/video/shared/vastXmlBuilder.js +77 -0
- package/libraries/video/shared/vastXmlEditor.js +115 -0
- package/modules/.submodules.json +7 -1
- package/modules/aaxBlockmeterRtdProvider.js +59 -0
- package/modules/aaxBlockmeterRtdProvider.md +48 -0
- package/modules/admaticBidAdapter.js +147 -0
- package/modules/admaticBidAdapter.md +48 -0
- package/modules/amxBidAdapter.js +1 -0
- package/modules/appnexusBidAdapter.js +38 -1
- package/modules/chtnwBidAdapter.js +110 -0
- package/modules/chtnwBidAdapter.md +31 -0
- package/modules/concertBidAdapter.js +44 -2
- package/modules/connectIdSystem.js +36 -23
- package/modules/connectIdSystem.md +3 -2
- package/modules/consentManagement.js +22 -1
- package/modules/consentManagementUsp.js +29 -7
- package/modules/criteoBidAdapter.js +25 -5
- package/modules/currency.js +9 -0
- package/modules/dgkeywordRtdProvider.js +3 -3
- package/modules/gridNMBidAdapter.js +10 -14
- package/modules/growthCodeIdSystem.js +9 -5
- package/modules/gumgumBidAdapter.js +4 -0
- package/modules/improvedigitalBidAdapter.js +191 -470
- package/modules/ixBidAdapter.js +54 -71
- package/modules/jwplayerVideoProvider.js +929 -0
- package/modules/jwplayerVideoProvider.md +25 -0
- package/modules/kargoBidAdapter.js +1 -1
- package/modules/kueezRtbBidAdapter.js +278 -0
- package/modules/kueezRtbBidAdapter.md +35 -0
- package/modules/magniteAnalyticsAdapter.js +6 -1
- package/modules/mgidRtdProvider.js +190 -0
- package/modules/mgidRtdProvider.md +51 -0
- package/modules/multibid/index.js +12 -0
- package/modules/openxOrtbBidAdapter.js +120 -275
- package/modules/oxxionRtdProvider.js +119 -0
- package/modules/oxxionRtdProvider.md +48 -0
- package/modules/permutiveRtdProvider.js +2 -1
- package/modules/permutiveRtdProvider.md +36 -1
- package/modules/prebidServerBidAdapter/index.js +19 -716
- package/modules/prebidServerBidAdapter/ortbConverter.js +274 -0
- package/modules/priceFloors.js +73 -1
- package/modules/pubmaticBidAdapter.js +21 -29
- package/modules/rtdModule/index.js +22 -1
- package/modules/schain.js +24 -1
- package/modules/spotxBidAdapter.js +16 -15
- package/modules/synacormediaBidAdapter.js +1 -1
- package/modules/teadsIdSystem.js +5 -0
- package/modules/tripleliftBidAdapter.js +1 -1
- package/modules/userId/eids.js +3 -10
- package/modules/userId/index.js +64 -6
- package/modules/videoModule/addingSubmodule.md +521 -0
- package/modules/videoModule/coreVideo.js +234 -0
- package/modules/videoModule/gamAdServerSubmodule.js +27 -0
- package/modules/videoModule/index.js +244 -0
- package/modules/videoModule/videoImpressionVerifier.js +206 -0
- package/modules/videojsVideoProvider.js +854 -0
- package/modules/videojsVideoProvider.md +17 -0
- package/package.json +12 -8
- package/src/adRendering.js +1 -1
- package/src/adapterManager.js +56 -7
- package/src/adloader.js +3 -1
- package/src/auction.js +6 -1
- package/src/events.js +5 -1
- package/src/pbjsORTB.js +35 -0
- package/src/prebid.js +137 -112
- package/src/targeting.js +10 -2
- package/src/utils/currency.js +16 -0
- package/src/utils.js +21 -0
- package/test/spec/auctionmanager_spec.js +15 -0
- package/test/spec/modules/aaxBlockmeter_spec.js +58 -0
- package/test/spec/modules/admaticBidAdapter_spec.js +46 -0
- package/test/spec/modules/chtnwBidAdapter_spec.js +105 -0
- package/test/spec/modules/concertBidAdapter_spec.js +56 -0
- package/test/spec/modules/connectIdSystem_spec.js +175 -5
- package/test/spec/modules/consentManagementUsp_spec.js +64 -18
- package/test/spec/modules/criteoBidAdapter_spec.js +28 -0
- package/test/spec/modules/dgkeywordRtdProvider_spec.js +3 -3
- package/test/spec/modules/eids_spec.js +10 -7
- package/test/spec/modules/ftrackIdSystem_spec.js +34 -22
- package/test/spec/modules/gumgumBidAdapter_spec.js +15 -0
- package/test/spec/modules/improvedigitalBidAdapter_spec.js +231 -211
- package/test/spec/modules/ixBidAdapter_spec.js +412 -350
- package/test/spec/modules/kueezRtbBidAdapter_spec.js +396 -0
- package/test/spec/modules/magniteAnalyticsAdapter_spec.js +26 -0
- package/test/spec/modules/mgidRtdProvider_spec.js +366 -0
- package/test/spec/modules/openxOrtbBidAdapter_spec.js +77 -49
- package/test/spec/modules/oxxionRtdProvider_spec.js +142 -0
- package/test/spec/modules/permutiveRtdProvider_spec.js +64 -5
- package/test/spec/modules/prebidServerBidAdapter_spec.js +139 -137
- package/test/spec/modules/realTimeDataModule_spec.js +65 -0
- package/test/spec/modules/tripleliftBidAdapter_spec.js +14 -0
- package/test/spec/modules/userId_spec.js +67 -1
- package/test/spec/modules/videoModule/coreVideo_spec.js +98 -0
- package/test/spec/modules/videoModule/pbVideo_spec.js +362 -0
- package/test/spec/modules/videoModule/shared/parentModule_spec.js +73 -0
- package/test/spec/modules/videoModule/shared/state_spec.js +26 -0
- package/test/spec/modules/videoModule/shared/vastXmlBuilder_spec.js +103 -0
- package/test/spec/modules/videoModule/shared/vastXmlEditor_spec.js +209 -0
- package/test/spec/modules/videoModule/submodules/jwplayerVideoProvider_spec.js +846 -0
- package/test/spec/modules/videoModule/submodules/videojsVideoProvider_spec.js +391 -0
- package/test/spec/modules/videoModule/videoImpressionVerifier_spec.js +112 -0
- package/test/spec/ortbConverter/banner_spec.js +203 -0
- package/test/spec/ortbConverter/composer_spec.js +69 -0
- package/test/spec/ortbConverter/converter_spec.js +283 -0
- package/test/spec/ortbConverter/currency_spec.js +40 -0
- package/test/spec/ortbConverter/default_processors_spec.js +61 -0
- package/test/spec/ortbConverter/gdpr_spec.js +38 -0
- package/test/spec/ortbConverter/mediaTypes_spec.js +67 -0
- package/test/spec/ortbConverter/mergeProcessors_spec.js +59 -0
- package/test/spec/ortbConverter/multibid_spec.js +35 -0
- package/test/spec/ortbConverter/native_spec.js +95 -0
- package/test/spec/ortbConverter/pbjsORTB_spec.js +67 -0
- package/test/spec/ortbConverter/pbsExtensions/aliases_spec.js +57 -0
- package/test/spec/ortbConverter/pbsExtensions/params_spec.js +96 -0
- package/test/spec/ortbConverter/pbsExtensions/video_spec.js +52 -0
- package/test/spec/ortbConverter/priceFloors_spec.js +143 -0
- package/test/spec/ortbConverter/schain_spec.js +33 -0
- package/test/spec/ortbConverter/userId_spec.js +21 -0
- package/test/spec/ortbConverter/usp_spec.js +15 -0
- package/test/spec/ortbConverter/video_spec.js +189 -0
- package/test/spec/unit/core/adapterManager_spec.js +102 -0
- package/test/spec/unit/core/targeting_spec.js +34 -0
- package/test/spec/unit/pbjs_api_spec.js +124 -45
- package/test/spec/utils_spec.js +45 -1
package/modules/userId/index.js
CHANGED
|
@@ -129,7 +129,7 @@ import {find, includes} from '../../src/polyfill.js';
|
|
|
129
129
|
import {config} from '../../src/config.js';
|
|
130
130
|
import * as events from '../../src/events.js';
|
|
131
131
|
import {getGlobal} from '../../src/prebidGlobal.js';
|
|
132
|
-
import {gdprDataHandler} from '../../src/adapterManager.js';
|
|
132
|
+
import adapterManager, {gdprDataHandler} from '../../src/adapterManager.js';
|
|
133
133
|
import CONSTANTS from '../../src/constants.json';
|
|
134
134
|
import {hook, module, ready as hooksReady} from '../../src/hook.js';
|
|
135
135
|
import {buildEidPermissions, createEidsArray, USER_IDS_CONFIG} from './eids.js';
|
|
@@ -149,11 +149,12 @@ import {
|
|
|
149
149
|
logInfo,
|
|
150
150
|
logWarn,
|
|
151
151
|
timestamp,
|
|
152
|
-
isEmpty
|
|
152
|
+
isEmpty, deepSetValue
|
|
153
153
|
} from '../../src/utils.js';
|
|
154
154
|
import {getPPID as coreGetPPID} from '../../src/adserver.js';
|
|
155
155
|
import {defer, GreedyPromise} from '../../src/utils/promise.js';
|
|
156
156
|
import {hasPurpose1Consent} from '../../src/utils/gpdr.js';
|
|
157
|
+
import {registerOrtbProcessor, REQUEST} from '../../src/pbjsORTB.js';
|
|
157
158
|
import {newMetrics, timedAuctionHook, useMetrics} from '../../src/utils/perfMetrics.js';
|
|
158
159
|
|
|
159
160
|
const MODULE_NAME = 'User ID';
|
|
@@ -216,6 +217,14 @@ export function setSubmoduleRegistry(submodules) {
|
|
|
216
217
|
submoduleRegistry = submodules;
|
|
217
218
|
}
|
|
218
219
|
|
|
220
|
+
function cookieSetter(submodule) {
|
|
221
|
+
const domainOverride = (typeof submodule.submodule.domainOverride === 'function') ? submodule.submodule.domainOverride() : null;
|
|
222
|
+
const name = submodule.config.storage.name;
|
|
223
|
+
return function setCookie(suffix, value, expiration) {
|
|
224
|
+
coreStorage.setCookie(name + (suffix || ''), value, expiration, 'Lax', domainOverride);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
219
228
|
/**
|
|
220
229
|
* @param {SubmoduleContainer} submodule
|
|
221
230
|
* @param {(Object|string)} value
|
|
@@ -225,15 +234,15 @@ export function setStoredValue(submodule, value) {
|
|
|
225
234
|
* @type {SubmoduleStorage}
|
|
226
235
|
*/
|
|
227
236
|
const storage = submodule.config.storage;
|
|
228
|
-
const domainOverride = (typeof submodule.submodule.domainOverride === 'function') ? submodule.submodule.domainOverride() : null;
|
|
229
237
|
|
|
230
238
|
try {
|
|
231
|
-
const valueStr = isPlainObject(value) ? JSON.stringify(value) : value;
|
|
232
239
|
const expiresStr = (new Date(Date.now() + (storage.expires * (60 * 60 * 24 * 1000)))).toUTCString();
|
|
240
|
+
const valueStr = isPlainObject(value) ? JSON.stringify(value) : value;
|
|
233
241
|
if (storage.type === COOKIE) {
|
|
234
|
-
|
|
242
|
+
const setCookie = cookieSetter(submodule);
|
|
243
|
+
setCookie(null, value, expiresStr);
|
|
235
244
|
if (typeof storage.refreshInSeconds === 'number') {
|
|
236
|
-
|
|
245
|
+
setCookie('_last', new Date().toUTCString(), expiresStr);
|
|
237
246
|
}
|
|
238
247
|
} else if (storage.type === LOCAL_STORAGE) {
|
|
239
248
|
coreStorage.setDataInLocalStorage(`${storage.name}_exp`, expiresStr);
|
|
@@ -247,6 +256,31 @@ export function setStoredValue(submodule, value) {
|
|
|
247
256
|
}
|
|
248
257
|
}
|
|
249
258
|
|
|
259
|
+
export function deleteStoredValue(submodule) {
|
|
260
|
+
let deleter, suffixes;
|
|
261
|
+
switch (submodule.config?.storage?.type) {
|
|
262
|
+
case COOKIE:
|
|
263
|
+
const setCookie = cookieSetter(submodule);
|
|
264
|
+
const expiry = (new Date(Date.now() - 1000 * 60 * 60 * 24)).toUTCString();
|
|
265
|
+
deleter = (suffix) => setCookie(suffix, '', expiry)
|
|
266
|
+
suffixes = ['', '_last'];
|
|
267
|
+
break;
|
|
268
|
+
case LOCAL_STORAGE:
|
|
269
|
+
deleter = (suffix) => coreStorage.removeDataFromLocalStorage(submodule.config.storage.name + suffix)
|
|
270
|
+
suffixes = ['', '_last', '_exp'];
|
|
271
|
+
break;
|
|
272
|
+
}
|
|
273
|
+
if (deleter) {
|
|
274
|
+
suffixes.forEach(suffix => {
|
|
275
|
+
try {
|
|
276
|
+
deleter(suffix)
|
|
277
|
+
} catch (e) {
|
|
278
|
+
logError(e);
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
250
284
|
function setPrebidServerEidPermissions(initializedSubmodules) {
|
|
251
285
|
let setEidPermissions = getPrebidInternal().setEidPermissions;
|
|
252
286
|
if (typeof setEidPermissions === 'function' && isArray(initializedSubmodules)) {
|
|
@@ -1009,12 +1043,28 @@ function updateSubmodules() {
|
|
|
1009
1043
|
if (!addedUserIdHook && submodules.length) {
|
|
1010
1044
|
// priority value 40 will load after consentManagement with a priority of 50
|
|
1011
1045
|
getGlobal().requestBids.before(requestBidsHook, 40);
|
|
1046
|
+
adapterManager.callDataDeletionRequest.before(requestDataDeletion);
|
|
1012
1047
|
coreGetPPID.after((next) => next(getPPID()));
|
|
1013
1048
|
logInfo(`${MODULE_NAME} - usersync config updated for ${submodules.length} submodules: `, submodules.map(a => a.submodule.name));
|
|
1014
1049
|
addedUserIdHook = true;
|
|
1015
1050
|
}
|
|
1016
1051
|
}
|
|
1017
1052
|
|
|
1053
|
+
export function requestDataDeletion(next, ...args) {
|
|
1054
|
+
logInfo('UserID: received data deletion request; deleting all stored IDs...')
|
|
1055
|
+
submodules.forEach(submodule => {
|
|
1056
|
+
if (typeof submodule.submodule.onDataDeletionRequest === 'function') {
|
|
1057
|
+
try {
|
|
1058
|
+
submodule.submodule.onDataDeletionRequest(submodule.config, submodule.idObj, ...args);
|
|
1059
|
+
} catch (e) {
|
|
1060
|
+
logError(`Error calling onDataDeletionRequest for ID submodule ${submodule.submodule.name}`, e);
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
deleteStoredValue(submodule);
|
|
1064
|
+
})
|
|
1065
|
+
next.apply(this, args);
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1018
1068
|
/**
|
|
1019
1069
|
* enable submodule in User ID
|
|
1020
1070
|
* @param {Submodule} submodule
|
|
@@ -1082,3 +1132,11 @@ export function init(config, {delay = GreedyPromise.timeout} = {}) {
|
|
|
1082
1132
|
init(config);
|
|
1083
1133
|
|
|
1084
1134
|
module('userId', attachIdSystem);
|
|
1135
|
+
|
|
1136
|
+
export function setOrtbUserExtEids(ortbRequest, bidderRequest, context) {
|
|
1137
|
+
const eids = deepAccess(context, 'bidRequests.0.userIdAsEids');
|
|
1138
|
+
if (eids) {
|
|
1139
|
+
deepSetValue(ortbRequest, 'user.ext.eids', eids);
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
registerOrtbProcessor({type: REQUEST, name: 'userExtEids', fn: setOrtbUserExtEids});
|
|
@@ -0,0 +1,521 @@
|
|
|
1
|
+
# How to Add a Video Submodule
|
|
2
|
+
|
|
3
|
+
Video submodules interact with the Video Module to integrate Prebid with Video Players, allowing Prebid to automatically:
|
|
4
|
+
- render bids in the desired video player
|
|
5
|
+
- mark used bids as won
|
|
6
|
+
- trigger player and media events
|
|
7
|
+
- populate the oRTB Video Impression and Content params in the bid request
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
The Prebid Video Module simplifies the way Prebid integrates with video players by acting as a single point of contact for everything video.
|
|
12
|
+
In order for the Video Module to connect to a video player, a submodule must be implemented. The submodule acts as a bridge between the Video Module and the video player.
|
|
13
|
+
The Video Module will route commands and tasks to the appropriate submodule instance.
|
|
14
|
+
A submodule is expected to work for a specific video player. i.e. the JW Player submodule is used to integrate Prebid with JW Player. The video.js submdule connects to video.js.
|
|
15
|
+
Publishers who use players from different vendors on the same page can use multiple video submodules.
|
|
16
|
+
|
|
17
|
+
## Requirements
|
|
18
|
+
|
|
19
|
+
The Video Module only supports integration with Video Players that meet the following requirements:
|
|
20
|
+
- Must support parsing and reproduction of VAST ads
|
|
21
|
+
- Input can be an ad tag URL or the actual Vast XML.
|
|
22
|
+
- Must expose an API that allows the procurement of [Open RTB params](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) for Video (section 3.2.7) and Content (section 3.2.16).
|
|
23
|
+
- Must emit javascript events for Ads and Media
|
|
24
|
+
- see [Event Registration](#event-registration)
|
|
25
|
+
|
|
26
|
+
## Creating a Submodule
|
|
27
|
+
|
|
28
|
+
### Step 1: Add a markdown file describing the submodule
|
|
29
|
+
|
|
30
|
+
Create a markdown file under `modules` with the name of the module suffixed with 'VideoProvider', i.e. `exampleVideoProvider.md`.
|
|
31
|
+
|
|
32
|
+
Example markdown file:
|
|
33
|
+
```markdown
|
|
34
|
+
# Overview
|
|
35
|
+
|
|
36
|
+
Module Name: Example Video Provider
|
|
37
|
+
Module Type: Video Submodule
|
|
38
|
+
Video Player: Example player
|
|
39
|
+
Player website: example-player.com
|
|
40
|
+
Maintainer: someone@example.com
|
|
41
|
+
|
|
42
|
+
# Description
|
|
43
|
+
|
|
44
|
+
Video provider for Example Player. Contact someone@example.com for information.
|
|
45
|
+
|
|
46
|
+
# Requirements
|
|
47
|
+
|
|
48
|
+
Your page must link the Example Player build from our CDN. Alternatively yu can use npm to load the build.
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Step 2: Add a Vendor Code
|
|
52
|
+
|
|
53
|
+
Vendor codes are required to indicate which submodule type to instantiate. Add your vendor code constant to an export const in `vendorCodes.js` in Prebid.js under `libraries/video/constants/vendorCodes.js`.
|
|
54
|
+
i.e. in `vendorCodes.js`:
|
|
55
|
+
|
|
56
|
+
```javascript
|
|
57
|
+
export const EXAMPLE_PLAYER_VENDOR = 3;
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Step 2: Build the Module
|
|
61
|
+
|
|
62
|
+
Now create a javascript file under `modules` with the name of the module suffixed with 'VideoProvider', e.g., `exampleVideoProvider.js`.
|
|
63
|
+
|
|
64
|
+
#### The Submodule factory
|
|
65
|
+
|
|
66
|
+
The Video Module will need a submodule instance for every player instance registered with Prebid. You will therefore need to implement a submodule factory which is called with a `videoProviderConfig` argument and returns a Video Provider instance.
|
|
67
|
+
Your submodule should import your vendor code constant and set it to a `vendorCode` property on your submodule factory.
|
|
68
|
+
Your submodule should also import the `submodule` function from `src/hook.js` and should use it to register as a submodule of `'video'`.
|
|
69
|
+
|
|
70
|
+
**Code Example**
|
|
71
|
+
|
|
72
|
+
```javascript
|
|
73
|
+
import { submodule } from '../src/hook.js';
|
|
74
|
+
|
|
75
|
+
function exampleSubmoduleFactory(videoProviderConfig) {
|
|
76
|
+
const videoProvider = {
|
|
77
|
+
// implementation
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
return videoProvider;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
exampleSubmoduleFactory.vendorCode = EXAMPLE_VENDOR;
|
|
84
|
+
submodule('video', exampleSubmoduleFactory);
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
#### The Submodule object
|
|
88
|
+
|
|
89
|
+
The submodule object must adhere to the `VideoProvider` interface defined in the `coreVideo.js` inline documentation.
|
|
90
|
+
|
|
91
|
+
#### Event registration
|
|
92
|
+
|
|
93
|
+
Submodules must support attaching and detaching event listeners on the video player. The list of events are defined in the Events file in the Video Library: `libraries/video/constants/events.js`.
|
|
94
|
+
All events and their params must be supported.
|
|
95
|
+
|
|
96
|
+
##### Event params
|
|
97
|
+
|
|
98
|
+
All Video Module events include a `divId` and `type` param in the payload by default.
|
|
99
|
+
The `divId` is the div id string of the player emitting the event; it can be used as an identifier. The `type` is the string name of the event.
|
|
100
|
+
The remaining Payload params are listed in the following:
|
|
101
|
+
|
|
102
|
+
###### SETUP_COMPLETE
|
|
103
|
+
|
|
104
|
+
| argument name | type | description |
|
|
105
|
+
| ------------- | ---- | ----------- |
|
|
106
|
+
| playerVersion | string | The version of the player on the page |
|
|
107
|
+
| viewable | boolean | Is the player currently viewable? |
|
|
108
|
+
| viewabilityPercentage | number | The percentage of the video that is currently viewable on the user's screen. |
|
|
109
|
+
| mute | boolean | Whether or not the player is currently muted. |
|
|
110
|
+
| volumePercentage | number | The volume of the player, as a percentage |
|
|
111
|
+
|
|
112
|
+
###### SETUP_FAILED
|
|
113
|
+
|
|
114
|
+
| argument name | type | description |
|
|
115
|
+
| ------------- | ---- | ----------- |
|
|
116
|
+
| playerVersion | string | The version of the player on the page |
|
|
117
|
+
| errorCode | number | The identifier of the error preventing the media from rendering |
|
|
118
|
+
| errorMessage | string | Developer friendly description of the reason the error occurred. |
|
|
119
|
+
| sourceError | object | The underlying root Error which prevented the playback. |
|
|
120
|
+
|
|
121
|
+
###### DESTROYED
|
|
122
|
+
No additional params.
|
|
123
|
+
|
|
124
|
+
###### AD_REQUEST
|
|
125
|
+
|
|
126
|
+
| argument name | type | description |
|
|
127
|
+
| ------------- | ---- | ----------- |
|
|
128
|
+
| adTagUrl | string | The URL for the ad tag associated with the given ad event |
|
|
129
|
+
|
|
130
|
+
###### AD_BREAK_START
|
|
131
|
+
|
|
132
|
+
| argument name | type | description |
|
|
133
|
+
| ------------- | ---- | ----------- |
|
|
134
|
+
| offset | string | Scheduled position in the video for the ad to play. For mid-rolls, will be the position in seconds as string. Other options: 'pre' (pre-roll), 'post' (post-roll), 'api' (ad was not scheduled) |
|
|
135
|
+
|
|
136
|
+
###### AD_LOADED
|
|
137
|
+
|
|
138
|
+
| argument name | type | description |
|
|
139
|
+
| ------------- | ---- | ----------- |
|
|
140
|
+
| adTagUrl | string | The URL for the ad tag associated with the given ad event |
|
|
141
|
+
| offset | string | Scheduled position in the video for the ad to play. For mid-rolls, will be the position in seconds as string. Other options: 'pre' (pre-roll), 'post' (post-roll), 'api' (ad was not scheduled) |
|
|
142
|
+
| loadTime | number | Time the ad took to load in milliseconds |
|
|
143
|
+
| vastAdId | string | The ID given to the ad within the ad tag's XML. Nullable when absent from the VAST xml. |
|
|
144
|
+
| adDescription | string | Description of the ad pulled from the ad tag's XML. Nullable when absent from the VAST xml. |
|
|
145
|
+
| adServer | string | Ad server used (e.g. dart or mediamind) from the vast tag. Nullable when absent from the VAST xml. |
|
|
146
|
+
| adTitle | string | Title of the ad pulled from the ad tag's XML. Nullable when absent from the VAST xml. |
|
|
147
|
+
| advertiserId | string | Optional identifier for the advertiser, provided by the ad server. Nullable when absent from the VAST xml. |
|
|
148
|
+
| advertiserName | string | Name of the advertiser as defined by the ad serving party, from the vast XML. Nullable when absent from the VAST xml. |
|
|
149
|
+
| dealId | string | The ID of the Ads deal. Generally relates to Direct Sold Ad Campaigns. Nullable when absent from the VAST xml. |
|
|
150
|
+
| linear | boolean | Is the ad linear or not? |
|
|
151
|
+
| vastVersion | string | Version of VAST being reported from the tag |
|
|
152
|
+
| creativeUrl | string | The URL representing the VPAID or MP4 ad that is run |
|
|
153
|
+
| adId | string | Unique Ad ID - refers to the 'attribute' of the <Ad> node within the VAST. Nullable when absent from the VAST xml. |
|
|
154
|
+
| universalAdId | string | Unique identifier for an ad in VAST4. Nullable when absent from the VAST xml. |
|
|
155
|
+
| creativeId | string | Ad server's unique ID for the creative pulled from the ad tag's XML. Should be used to specify the ad server’s unique identifier as opposed to the Universal Ad Id which is used for maintaining a creative id for the ad across multiple systems. Nullable when absent from the VAST xml. |
|
|
156
|
+
| creativeType | string | The MIME type of the ad creative currently being displayed |
|
|
157
|
+
| redirectUrl | string | the url to which the viewer is being redirected after clicking the ad. Nullable when absent from the VAST xml. |
|
|
158
|
+
| adPlacementType | number | The video placements per IAB guidelines. Enum list: In-Stream: 1, In-Banner: 2, In-Article: 3, In-Feed: 4, Interstitial/Slider/Floating: 5 |
|
|
159
|
+
| waterfallIndex | number | Index of the current item in the ad waterfall |
|
|
160
|
+
| waterfallCount | number | The count of items in a given ad waterfall |
|
|
161
|
+
| adPodCount | number | the total number of ads in the pod |
|
|
162
|
+
| adPodIndex | number | The index of the currently playing ad within an ad pod |
|
|
163
|
+
| wrapperAdIds | array[string] | Ad IDs of the VAST Wrappers that were loaded while loading the Ad tag. The list returned starts at the inline ad (innermost) and traverses to the outermost wrapper ad. An empty array is returned if there are no wrapper ads. |
|
|
164
|
+
|
|
165
|
+
###### AD_STARTED
|
|
166
|
+
|
|
167
|
+
| argument name | type | description |
|
|
168
|
+
| ------------- | ---- | ----------- |
|
|
169
|
+
| adTagUrl | string | The URL for the ad tag associated with the given ad event |
|
|
170
|
+
| offset | string | Scheduled position in the video for the ad to play. For mid-rolls, will be the position in seconds as string. Other options: 'pre' (pre-roll), 'post' (post-roll), 'api' (ad was not scheduled) |
|
|
171
|
+
| loadTime | number | Time the ad took to load in milliseconds |
|
|
172
|
+
| vastAdId | string | The ID given to the ad within the ad tag's XML. Nullable when absent from the VAST xml. |
|
|
173
|
+
| adDescription | string | Description of the ad pulled from the ad tag's XML. Nullable when absent from the VAST xml. |
|
|
174
|
+
| adServer | string | Ad server used (e.g. dart or mediamind) from the vast tag. Nullable when absent from the VAST xml. |
|
|
175
|
+
| adTitle | string | Title of the ad pulled from the ad tag's XML. Nullable when absent from the VAST xml. |
|
|
176
|
+
| advertiserId | string | Optional identifier for the advertiser, provided by the ad server. Nullable when absent from the VAST xml. |
|
|
177
|
+
| advertiserName | string | Name of the advertiser as defined by the ad serving party, from the vast XML. Nullable when absent from the VAST xml. |
|
|
178
|
+
| dealId | string | The ID of the Ads deal. Generally relates to Direct Sold Ad Campaigns. Nullable when absent from the VAST xml. |
|
|
179
|
+
| linear | boolean | Is the ad linear or not? |
|
|
180
|
+
| vastVersion | string | Version of VAST being reported from the tag |
|
|
181
|
+
| creativeUrl | string | The URL representing the VPAID or MP4 ad that is run |
|
|
182
|
+
| adId | string | Unique Ad ID - refers to the 'attribute' of the <Ad> node within the VAST. Nullable when absent from the VAST xml. |
|
|
183
|
+
| universalAdId | string | Unique identifier for an ad in VAST4. Nullable when absent from the VAST xml. |
|
|
184
|
+
| creativeId | string | Ad server's unique ID for the creative pulled from the ad tag's XML. Should be used to specify the ad server’s unique identifier as opposed to the Universal Ad Id which is used for maintaining a creative id for the ad across multiple systems. Nullable when absent from the VAST xml. |
|
|
185
|
+
| creativeType | string | The MIME type of the ad creative currently being displayed |
|
|
186
|
+
| redirectUrl | string | the url to which the viewer is being redirected after clicking the ad. Nullable when absent from the VAST xml. |
|
|
187
|
+
| adPlacementType | number | The video placements per IAB guidelines. Enum list: In-Stream: 1, In-Banner: 2, In-Article: 3, In-Feed: 4, Interstitial/Slider/Floating: 5 |
|
|
188
|
+
| waterfallIndex | number | Index of the current item in the ad waterfall |
|
|
189
|
+
| waterfallCount | number | The count of items in a given ad waterfall |
|
|
190
|
+
| adPodCount | number | the total number of ads in the pod |
|
|
191
|
+
| adPodIndex | number | The index of the currently playing ad within an ad pod |
|
|
192
|
+
| wrapperAdIds | array[string] | Ad IDs of the VAST Wrappers that were loaded while loading the Ad tag. The list returned starts at the inline ad (innermost) and traverses to the outermost wrapper ad. An empty array is returned if there are no wrapper ads. |
|
|
193
|
+
|
|
194
|
+
<a name="ad-impression-params" />
|
|
195
|
+
|
|
196
|
+
###### AD_IMPRESSION
|
|
197
|
+
|
|
198
|
+
| argument name | type | description |
|
|
199
|
+
| ------------- | ---- | ----------- |
|
|
200
|
+
| adTagUrl | string | The URL for the ad tag associated with the given ad event |
|
|
201
|
+
| offset | string | Scheduled position in the video for the ad to play. For mid-rolls, will be the position in seconds as string. Other options: 'pre' (pre-roll), 'post' (post-roll), 'api' (ad was not scheduled) |
|
|
202
|
+
| loadTime | number | Time the ad took to load in milliseconds |
|
|
203
|
+
| vastAdId | string | The ID given to the ad within the ad tag's XML. Nullable when absent from the VAST xml. |
|
|
204
|
+
| adDescription | string | Description of the ad pulled from the ad tag's XML. Nullable when absent from the VAST xml. |
|
|
205
|
+
| adServer | string | Ad server used (e.g. dart or mediamind) from the vast tag. Nullable when absent from the VAST xml. |
|
|
206
|
+
| adTitle | string | Title of the ad pulled from the ad tag's XML. Nullable when absent from the VAST xml. |
|
|
207
|
+
| advertiserId | string | Optional identifier for the advertiser, provided by the ad server. Nullable when absent from the VAST xml. |
|
|
208
|
+
| advertiserName | string | Name of the advertiser as defined by the ad serving party, from the vast XML. Nullable when absent from the VAST xml. |
|
|
209
|
+
| dealId | string | The ID of the Ads deal. Generally relates to Direct Sold Ad Campaigns. Nullable when absent from the VAST xml. |
|
|
210
|
+
| linear | boolean | Is the ad linear or not? |
|
|
211
|
+
| vastVersion | string | Version of VAST being reported from the tag |
|
|
212
|
+
| creativeUrl | string | The URL representing the VPAID or MP4 ad that is run |
|
|
213
|
+
| adId | string | Unique Ad ID - refers to the 'attribute' of the <Ad> node within the VAST. Nullable when absent from the VAST xml. |
|
|
214
|
+
| universalAdId | string | Unique identifier for an ad in VAST4. Nullable when absent from the VAST xml. |
|
|
215
|
+
| creativeId | string | Ad server's unique ID for the creative pulled from the ad tag's XML. Should be used to specify the ad server’s unique identifier as opposed to the Universal Ad Id which is used for maintaining a creative id for the ad across multiple systems. Nullable when absent from the VAST xml. |
|
|
216
|
+
| creativeType | string | The MIME type of the ad creative currently being displayed |
|
|
217
|
+
| redirectUrl | string | the url to which the viewer is being redirected after clicking the ad. Nullable when absent from the VAST xml. |
|
|
218
|
+
| adPlacementType | number | The video placements per IAB guidelines. Enum list: In-Stream: 1, In-Banner: 2, In-Article: 3, In-Feed: 4, Interstitial/Slider/Floating: 5 |
|
|
219
|
+
| waterfallIndex | number | Index of the current item in the ad waterfall |
|
|
220
|
+
| waterfallCount | number | The count of items in a given ad waterfall |
|
|
221
|
+
| adPodCount | number | the total number of ads in the pod |
|
|
222
|
+
| adPodIndex | number | The index of the currently playing ad within an ad pod |
|
|
223
|
+
| wrapperAdIds | array[string] | Ad IDs of the VAST Wrappers that were loaded while loading the Ad tag. The list returned starts at the inline ad (innermost) and traverses to the outermost wrapper ad. An empty array is returned if there are no wrapper ads. |
|
|
224
|
+
| time | number | The playback time in the ad when the event occurs, in seconds. |
|
|
225
|
+
| duration | number | Total duration of an ad in seconds |
|
|
226
|
+
|
|
227
|
+
###### AD_PLAY
|
|
228
|
+
|
|
229
|
+
| argument name | type | description |
|
|
230
|
+
| ------------- | ---- | ----------- |
|
|
231
|
+
| adTagUrl | string | The URL for the ad tag associated with the given ad event |
|
|
232
|
+
|
|
233
|
+
###### AD_TIME
|
|
234
|
+
|
|
235
|
+
| argument name | type | description |
|
|
236
|
+
| ------------- | ---- | ----------- |
|
|
237
|
+
| adTagUrl | string | The URL for the ad tag associated with the given ad event |
|
|
238
|
+
| time | number | The current poisition in the ad timeline |
|
|
239
|
+
| duration | number | Total duration of an ad in seconds |
|
|
240
|
+
|
|
241
|
+
###### AD_PAUSE
|
|
242
|
+
|
|
243
|
+
| argument name | type | description |
|
|
244
|
+
| ------------- | ---- | ----------- |
|
|
245
|
+
| adTagUrl | string | The URL for the ad tag associated with the given ad event |
|
|
246
|
+
|
|
247
|
+
###### AD_CLICK
|
|
248
|
+
|
|
249
|
+
| argument name | type | description |
|
|
250
|
+
| ------------- | ---- | ----------- |
|
|
251
|
+
| adTagUrl | string | The URL for the ad tag associated with the given ad event |
|
|
252
|
+
| offset | string | Scheduled position in the video for the ad to play. For mid-rolls, will be the position in seconds as string. Other options: 'pre' (pre-roll), 'post' (post-roll), 'api' (ad was not scheduled) |
|
|
253
|
+
| loadTime | number | Time the ad took to load in milliseconds |
|
|
254
|
+
| vastAdId | string | The ID given to the ad within the ad tag's XML. Nullable when absent from the VAST xml. |
|
|
255
|
+
| adDescription | string | Description of the ad pulled from the ad tag's XML. Nullable when absent from the VAST xml. |
|
|
256
|
+
| adServer | string | Ad server used (e.g. dart or mediamind) from the vast tag. Nullable when absent from the VAST xml. |
|
|
257
|
+
| adTitle | string | Title of the ad pulled from the ad tag's XML. Nullable when absent from the VAST xml. |
|
|
258
|
+
| advertiserId | string | Optional identifier for the advertiser, provided by the ad server. Nullable when absent from the VAST xml. |
|
|
259
|
+
| advertiserName | string | Name of the advertiser as defined by the ad serving party, from the vast XML. Nullable when absent from the VAST xml. |
|
|
260
|
+
| dealId | string | The ID of the Ads deal. Generally relates to Direct Sold Ad Campaigns. Nullable when absent from the VAST xml. |
|
|
261
|
+
| linear | boolean | Is the ad linear or not? |
|
|
262
|
+
| vastVersion | string | Version of VAST being reported from the tag |
|
|
263
|
+
| creativeUrl | string | The URL representing the VPAID or MP4 ad that is run |
|
|
264
|
+
| adId | string | Unique Ad ID - refers to the 'attribute' of the <Ad> node within the VAST. Nullable when absent from the VAST xml. |
|
|
265
|
+
| universalAdId | string | Unique identifier for an ad in VAST4. Nullable when absent from the VAST xml. |
|
|
266
|
+
| creativeId | string | Ad server's unique ID for the creative pulled from the ad tag's XML. Should be used to specify the ad server’s unique identifier as opposed to the Universal Ad Id which is used for maintaining a creative id for the ad across multiple systems. Nullable when absent from the VAST xml. |
|
|
267
|
+
| creativeType | string | The MIME type of the ad creative currently being displayed |
|
|
268
|
+
| redirectUrl | string | the url to which the viewer is being redirected after clicking the ad. Nullable when absent from the VAST xml. |
|
|
269
|
+
| adPlacementType | number | The video placements per IAB guidelines. Enum list: In-Stream: 1, In-Banner: 2, In-Article: 3, In-Feed: 4, Interstitial/Slider/Floating: 5 |
|
|
270
|
+
| waterfallIndex | number | Index of the current item in the ad waterfall |
|
|
271
|
+
| waterfallCount | number | The count of items in a given ad waterfall |
|
|
272
|
+
| adPodCount | number | the total number of ads in the pod |
|
|
273
|
+
| adPodIndex | number | The index of the currently playing ad within an ad pod |
|
|
274
|
+
| wrapperAdIds | array[string] | Ad IDs of the VAST Wrappers that were loaded while loading the Ad tag. The list returned starts at the inline ad (innermost) and traverses to the outermost wrapper ad. An empty array is returned if there are no wrapper ads. |
|
|
275
|
+
| time | number | The playback time in the ad when the event occurs, in seconds. |
|
|
276
|
+
| duration | number | Total duration of an ad in seconds |
|
|
277
|
+
|
|
278
|
+
###### AD_SKIPPED
|
|
279
|
+
|
|
280
|
+
| argument name | type | description |
|
|
281
|
+
| ------------- | ---- | ----------- |
|
|
282
|
+
| time | number | The playback time in the ad when the event occurs, in seconds. |
|
|
283
|
+
| duration | number | Total duration of an ad in seconds |
|
|
284
|
+
|
|
285
|
+
<a name="ad-error-params" />
|
|
286
|
+
|
|
287
|
+
###### AD_ERROR
|
|
288
|
+
|
|
289
|
+
| argument name | type | description |
|
|
290
|
+
| ------------- | ---- | ----------- |
|
|
291
|
+
| playerErrorCode | number | The ad error code from the Player’s internal spec. |
|
|
292
|
+
| vastErrorCode | number | The error code for the VAST response that is returned from the request, as defined in the VAST spec. |
|
|
293
|
+
| errorMessage | string | Developer friendly description of the reason the error occurred. |
|
|
294
|
+
| sourceError | object | The underlying root Error which prevented the playback. |
|
|
295
|
+
| adTagUrl | string | The URL for the ad tag associated with the given ad event |
|
|
296
|
+
| offset | string | Scheduled position in the video for the ad to play. For mid-rolls, will be the position in seconds as string. Other options: 'pre' (pre-roll), 'post' (post-roll), 'api' (ad was not scheduled) |
|
|
297
|
+
| loadTime | number | Time the ad took to load in milliseconds |
|
|
298
|
+
| vastAdId | string | The ID given to the ad within the ad tag's XML. Nullable when absent from the VAST xml. |
|
|
299
|
+
| adDescription | string | Description of the ad pulled from the ad tag's XML. Nullable when absent from the VAST xml. |
|
|
300
|
+
| adServer | string | Ad server used (e.g. dart or mediamind) from the vast tag. Nullable when absent from the VAST xml. |
|
|
301
|
+
| adTitle | string | Title of the ad pulled from the ad tag's XML. Nullable when absent from the VAST xml. |
|
|
302
|
+
| advertiserId | string | Optional identifier for the advertiser, provided by the ad server. Nullable when absent from the VAST xml. |
|
|
303
|
+
| advertiserName | string | Name of the advertiser as defined by the ad serving party, from the vast XML. Nullable when absent from the VAST xml. |
|
|
304
|
+
| dealId | string | The ID of the Ads deal. Generally relates to Direct Sold Ad Campaigns. Nullable when absent from the VAST xml. |
|
|
305
|
+
| linear | boolean | Is the ad linear or not? |
|
|
306
|
+
| vastVersion | string | Version of VAST being reported from the tag |
|
|
307
|
+
| creativeUrl | string | The URL representing the VPAID or MP4 ad that is run |
|
|
308
|
+
| adId | string | Unique Ad ID - refers to the 'attribute' of the <Ad> node within the VAST. Nullable when absent from the VAST xml. |
|
|
309
|
+
| universalAdId | string | Unique identifier for an ad in VAST4. Nullable when absent from the VAST xml. |
|
|
310
|
+
| creativeId | string | Ad server's unique ID for the creative pulled from the ad tag's XML. Should be used to specify the ad server’s unique identifier as opposed to the Universal Ad Id which is used for maintaining a creative id for the ad across multiple systems. Nullable when absent from the VAST xml. |
|
|
311
|
+
| creativeType | string | The MIME type of the ad creative currently being displayed |
|
|
312
|
+
| redirectUrl | string | the url to which the viewer is being redirected after clicking the ad. Nullable when absent from the VAST xml. |
|
|
313
|
+
| adPlacementType | number | The video placements per IAB guidelines. Enum list: In-Stream: 1, In-Banner: 2, In-Article: 3, In-Feed: 4, Interstitial/Slider/Floating: 5 |
|
|
314
|
+
| waterfallIndex | number | Index of the current item in the ad waterfall |
|
|
315
|
+
| waterfallCount | number | The count of items in a given ad waterfall |
|
|
316
|
+
| adPodCount | number | the total number of ads in the pod |
|
|
317
|
+
| adPodIndex | number | The index of the currently playing ad within an ad pod |
|
|
318
|
+
| wrapperAdIds | array[string] | Ad IDs of the VAST Wrappers that were loaded while loading the Ad tag. The list returned starts at the inline ad (innermost) and traverses to the outermost wrapper ad. An empty array is returned if there are no wrapper ads. |
|
|
319
|
+
| time | number | The playback time in the ad when the event occurs, in seconds. |
|
|
320
|
+
| duration | number | Total duration of an ad in seconds |
|
|
321
|
+
|
|
322
|
+
###### AD_COMPLETE
|
|
323
|
+
|
|
324
|
+
| argument name | type | description |
|
|
325
|
+
| ------------- | ---- | ----------- |
|
|
326
|
+
| adTagUrl | string | The URL for the ad tag associated with the given ad event |
|
|
327
|
+
|
|
328
|
+
###### AD_BREAK_END
|
|
329
|
+
|
|
330
|
+
| argument name | type | description |
|
|
331
|
+
| ------------- | ---- | ----------- |
|
|
332
|
+
| offset | string | Scheduled position in the video for the ad to play. For mid-rolls, will be the position in seconds as string. Other options: 'pre' (pre-roll), 'post' (post-roll), 'api' (ad was not scheduled) |
|
|
333
|
+
|
|
334
|
+
###### PLAYLIST
|
|
335
|
+
|
|
336
|
+
| argument name | type | description |
|
|
337
|
+
| ------------- | ---- | ----------- |
|
|
338
|
+
| playlistItemCount | number | The number of items in the current playlist |
|
|
339
|
+
| autostart | boolean | Whether or not the player is set to begin playing automatically. |
|
|
340
|
+
|
|
341
|
+
###### PLAYBACK_REQUEST
|
|
342
|
+
|
|
343
|
+
| argument name | type | description |
|
|
344
|
+
| ------------- | ---- | ----------- |
|
|
345
|
+
| playReason | string | wWy the play attempt originated. Options: ‘Unknown’ (Unknown reason:we cannot tell), ‘Interaction’ (A viewer interacts with the UI), ‘Auto’ (Autoplay based on the configuration of the player - autoStart), ‘autoOnViewable’ (autoStart when viewable), ‘autoRepeat’ (media automatically restarted after completion, without any user interaction), ‘Api’ (caused by a call on the player’s API), ‘Internal’ (started because of an internal mechanism i.e. playlist progressed to a recommended item) |
|
|
346
|
+
|
|
347
|
+
###### AUTOSTART_BLOCKED
|
|
348
|
+
|
|
349
|
+
| argument name | type | description |
|
|
350
|
+
| ------------- | ---- | ----------- |
|
|
351
|
+
| errorCode | number | The identifier of error preventing the media from rendering |
|
|
352
|
+
| errorMessage | string | Developer friendly description of the reason the error occurred. |
|
|
353
|
+
| sourceError | object | The underlying root Error which prevented the playback. |
|
|
354
|
+
|
|
355
|
+
###### PLAY_ATTEMPT_FAILED
|
|
356
|
+
|
|
357
|
+
| argument name | type | description |
|
|
358
|
+
| ------------- | ---- | ----------- |
|
|
359
|
+
| playReason | string | Why the play attempt originated. Options: ‘Unknown’ (Unknown reason:we cannot tell), ‘Interaction’ (A viewer interacts with the UI), ‘Auto’ (Autoplay based on the configuration of the player - autoStart), ‘autoOnViewable’ (autoStart when viewable), ‘autoRepeat’ (media automatically restarted after completion, without any user interaction), ‘Api’ (caused by a call on the player’s API), ‘Internal’ (started because of an internal mechanism i.e. playlist progressed to a recommended item) |
|
|
360
|
+
| errorCode | number | The identifier of error preventing the media from rendering |
|
|
361
|
+
| errorMessage | string | Developer friendly description of the reason the error occurred. |
|
|
362
|
+
| sourceError | object | The underlying root Error which prevented the playback. |
|
|
363
|
+
|
|
364
|
+
###### CONTENT_LOADED
|
|
365
|
+
|
|
366
|
+
| argument name | type | description |
|
|
367
|
+
| ------------- | ---- | ----------- |
|
|
368
|
+
| contentId | string | The unique identifier of the media item being rendered by the video player. Nullable when not provided by Publisher, or unknown. |
|
|
369
|
+
| contentUrl | string | The URL of the media source of the playlist item |
|
|
370
|
+
| title | string | The title of the content; not meant to be used as a unique identifier. Nullable when not provided by Publisher, or unknown. |
|
|
371
|
+
| description | string | The description of the content. Nullable when not provided by Publisher, or unknown. |
|
|
372
|
+
| playlistIndex | number | The currently playing media item's index in the playlist. |
|
|
373
|
+
| contentTags | array[string] | Customer media level tags describing the content. Nullable when not provided by Publisher, or unknown. |
|
|
374
|
+
|
|
375
|
+
###### PLAY
|
|
376
|
+
|
|
377
|
+
No additional params.
|
|
378
|
+
|
|
379
|
+
###### PAUSE
|
|
380
|
+
|
|
381
|
+
No additional params.
|
|
382
|
+
|
|
383
|
+
###### BUFFER
|
|
384
|
+
|
|
385
|
+
| argument name | type | description |
|
|
386
|
+
| ------------- | ---- | ----------- |
|
|
387
|
+
| time | number | Playback position of the media in seconds |
|
|
388
|
+
| duration | number | Current media’s length in seconds |
|
|
389
|
+
| playbackMode | number | The current playback mode used by a given player. Enum list: vod: 0, live: 1, dvr: 2 |
|
|
390
|
+
|
|
391
|
+
###### TIME
|
|
392
|
+
|
|
393
|
+
| argument name | type | description |
|
|
394
|
+
| ------------- | ---- | ----------- |
|
|
395
|
+
| position | number | Playback position of the media in seconds |
|
|
396
|
+
| duration | number | Current media’s length in seconds |
|
|
397
|
+
|
|
398
|
+
###### SEEK_START
|
|
399
|
+
|
|
400
|
+
| argument name | type | description |
|
|
401
|
+
| ------------- | ---- | ----------- |
|
|
402
|
+
| position | number | Playback position of the media in seconds, when the seek begins |
|
|
403
|
+
| destination | number | Desired playback position of a seek action, in seconds |
|
|
404
|
+
| duration | number | Current media’s length in seconds |
|
|
405
|
+
|
|
406
|
+
###### SEEK_END
|
|
407
|
+
|
|
408
|
+
| argument name | type | description |
|
|
409
|
+
| ------------- | ---- | ----------- |
|
|
410
|
+
| position | number | Playback position of the media in seconds, when the seek has ended |
|
|
411
|
+
| duration | number | Current media’s length in seconds |
|
|
412
|
+
|
|
413
|
+
###### MUTE
|
|
414
|
+
|
|
415
|
+
| argument name | type | description |
|
|
416
|
+
| ------------- | ---- | ----------- |
|
|
417
|
+
| mute | boolean | Whether or not the player is currently muted. |
|
|
418
|
+
|
|
419
|
+
###### VOLUME
|
|
420
|
+
|
|
421
|
+
| argument name | type | description |
|
|
422
|
+
| ------------- | ---- | ----------- |
|
|
423
|
+
| volumePercentage | number | The volume of the player, as a percentage |
|
|
424
|
+
|
|
425
|
+
###### RENDITION_UPDATE
|
|
426
|
+
|
|
427
|
+
| argument name | type | description |
|
|
428
|
+
| ------------- | ---- | ----------- |
|
|
429
|
+
| videoReportedBitrate | number | The bitrate of the currently playing video in kbps as reported by the Adaptive Manifest. |
|
|
430
|
+
| audioReportedBitrate | number | The bitrate of the currently playing audio in kbps as reported by the Adaptive Manifest. |
|
|
431
|
+
| encodedVideoWidth | number | The encoded width in pixels of the currently playing video rendition. |
|
|
432
|
+
| encodedVideoHeight | number | The encoded height in pixels of the currently playing video rendition. |
|
|
433
|
+
| videoFramerate | number | The current rate of playback. For a video that is playing twice as fast as the default playback, the playbackRate value should be 2.00 |
|
|
434
|
+
|
|
435
|
+
###### ERROR
|
|
436
|
+
|
|
437
|
+
| argument name | type | description |
|
|
438
|
+
| ------------- | ---- | ----------- |
|
|
439
|
+
| errorCode | number | The identifier of the error preventing the media from rendering |
|
|
440
|
+
| errorMessage | string | Developer friendly description of the reason the error occurred. |
|
|
441
|
+
| sourceError | object | The underlying root Error which prevented the playback. |
|
|
442
|
+
|
|
443
|
+
###### COMPLETE
|
|
444
|
+
|
|
445
|
+
No additional params.
|
|
446
|
+
|
|
447
|
+
###### PLAYLIST_COMPLETE
|
|
448
|
+
|
|
449
|
+
No additional params.
|
|
450
|
+
|
|
451
|
+
###### FULLSCREEN
|
|
452
|
+
|
|
453
|
+
| argument name | type | description |
|
|
454
|
+
| ------------- | ---- | ----------- |
|
|
455
|
+
| fullscreen | boolean | Whether or not the player is currently in fullscreen |
|
|
456
|
+
|
|
457
|
+
###### PLAYER_RESIZE
|
|
458
|
+
|
|
459
|
+
| argument name | type | description |
|
|
460
|
+
| ------------- | ---- | ----------- |
|
|
461
|
+
| height | number | The height of the player in pixels |
|
|
462
|
+
| width | number | The width of the player in pixels |
|
|
463
|
+
|
|
464
|
+
###### VIEWABLE
|
|
465
|
+
|
|
466
|
+
| argument name | type | description |
|
|
467
|
+
| ------------- | ---- | ----------- |
|
|
468
|
+
| viewable | boolean | Is the player currently viewable? |
|
|
469
|
+
| viewabilityPercentage | number | The percentage of the video that is currently viewable on the user's screen. |
|
|
470
|
+
|
|
471
|
+
###### CAST
|
|
472
|
+
|
|
473
|
+
| argument name | type | description |
|
|
474
|
+
| ------------- | ---- | ----------- |
|
|
475
|
+
| casting | boolean | Whether or not the current user is casting to a device |
|
|
476
|
+
|
|
477
|
+
###### AUCTION_AD_LOAD_ATTEMPT
|
|
478
|
+
|
|
479
|
+
| argument name | type | description |
|
|
480
|
+
| ------------- | ---- | ----------- |
|
|
481
|
+
| adTagUrl | string | The URL for the ad tag associated with the given ad event |
|
|
482
|
+
| adUnitCode | string | Unique identifier that was used when creating the ad unit. |
|
|
483
|
+
|
|
484
|
+
###### AUCTION_AD_LOAD_ABORT
|
|
485
|
+
|
|
486
|
+
| argument name | type | description |
|
|
487
|
+
| ------------- | ---- | ----------- |
|
|
488
|
+
| adUnitCode | string | Unique identifier that was used when creating the ad unit. |
|
|
489
|
+
|
|
490
|
+
###### BID_IMPRESSION
|
|
491
|
+
|
|
492
|
+
| argument name | type | description |
|
|
493
|
+
| ------------- | ---- | ----------- |
|
|
494
|
+
| bid | object | Information about the Bid which resulted in the Ad Impression |
|
|
495
|
+
| adEvent | object | Event payload from the [Ad Impression](#ad-impression-params) |
|
|
496
|
+
|
|
497
|
+
###### BID_ERROR
|
|
498
|
+
|
|
499
|
+
| argument name | type | description |
|
|
500
|
+
| ------------- | ---- | ----------- |
|
|
501
|
+
| bid | object | Information about the Bid which resulted in the Ad Error |
|
|
502
|
+
| adEvent | object | Event payload from the [Ad Error](#ad-error-params) |
|
|
503
|
+
|
|
504
|
+
#### Update .submodules.json
|
|
505
|
+
|
|
506
|
+
In prebid.js, add your new submodule to `.submodules.json` under the `videoModule` as such:
|
|
507
|
+
{% highlight text %}
|
|
508
|
+
```
|
|
509
|
+
{
|
|
510
|
+
"parentModules": {
|
|
511
|
+
"videoModule": [
|
|
512
|
+
"exampleVideoProvider"
|
|
513
|
+
]
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
### Shared resources for developers
|
|
519
|
+
|
|
520
|
+
A video library containing reusable code and constants has been added to Prebid.js for your convenience. We encourage you to import from this library.
|
|
521
|
+
Constants such as event names can be found in the `libraries/video/constants/` folder.
|