Skip to content

Commit

Permalink
adds missing ortb params
Browse files Browse the repository at this point in the history
  • Loading branch information
karimMourra committed Feb 4, 2022
1 parent e86f327 commit f614026
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
22 changes: 17 additions & 5 deletions modules/jwplayerVideoProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,16 @@ export function JWPlayerProvider(config, jwplayer_, adState_, timeState_, callba
placement: utils.getPlacement(adConfig),
// linearity is omitted because both forms are supported.
// sequence - TODO not yet supported
battr: adConfig.battr,
maxextended: -1,
// battr - not yet supported
maxextended: -1, // extension is allowed, and there is no time limit imposed.
boxingallowed: 1,
playbackmethod: [ utils.getPlaybackMethod(config) ],
playbackend: 1,
playbackend: 1, // TODO: need to account for floating player
// companionad - TODO add in future version
// companiontype - TODO add in future version
// minbitrate - TODO add in future version
// maxbitrate - TODO add in future version
// delivery - omitted because all are supported.
api: [
API_FRAMEWORKS.VPAID_2_0
],
Expand All @@ -109,7 +113,7 @@ export function JWPlayerProvider(config, jwplayer_, adState_, timeState_, callba

Object.assign(video, utils.getSkipParams(adConfig));

if (player.getFullscreen()) { // TODO does player call needs optimization ?
if (player.getFullscreen()) { // TODO does player call need optimization ?
// only specify ad position when in Fullscreen since computational cost is low
// ad position options are listed in oRTB 2.5 section 5.4
// https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf
Expand All @@ -129,8 +133,10 @@ export function JWPlayerProvider(config, jwplayer_, adState_, timeState_, callba
cat: item.iabCategories,
keywords: item.tags,
len: duration,
livestream: Math.min(playbackMode, 1)
livestream: Math.min(playbackMode, 1),
embeddable: 1
};
//language string Content language using ISO-639-1-alpha-2.

return {
video,
Expand Down Expand Up @@ -778,6 +784,12 @@ export const utils = {
const isMuted = mute || autoplayAdsMuted; // todo autoplayAdsMuted only applies to preRoll
return isMuted ? PLAYBACK_METHODS.AUTOPLAY_MUTED : PLAYBACK_METHODS.AUTOPLAY;
}
/*
TODO
could support the following with float player:
5 Initiates on Entering Viewport with Sound On
6 Initiates on Entering Viewport with Sound Off by Default
*/
return PLAYBACK_METHODS.CLICK_TO_PLAY;
},

Expand Down
4 changes: 2 additions & 2 deletions modules/videoModule/constants/ortb.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
* @property {number|undefined} sourcerelationship - 0 means indirect, 1 means direct.
* @property {number} len - Duration of content in seconds.
* @property {string|undefined} language - Content language using ISO-639-1-alpha-2.
* @property {number|undefined} embeddable - Indicator of whether or not the content is embeddable (e.g., an embeddable video player). 0 means no, 1 means yes. Defaults to 1.
* @property {number|undefined} embeddable - Indicator of whether or not the content is embeddable (e.g., an embeddable video player). 0 means no, 1 means yes.
* @property {[Object]|undefined} data - Additional content data. Each Data object represents a different data source. See Section 3.2.21 of the oRTB v2.5 spec.
* @property {Object|undefined} ext - Placeholder for exchange-specific extensions to OpenRTB.
*/
Expand Down Expand Up @@ -143,4 +143,4 @@ export const API_FRAMEWORKS = {
export const CONTEXT = {
VIDEO: 1,
AUDIO: 3
}
};

0 comments on commit f614026

Please sign in to comment.