diff --git a/ui/component/viewers/videoViewer/internal/ads.js b/ui/component/viewers/videoViewer/internal/ads.js index 9f1dd6e59..5956a4b1c 100644 --- a/ui/component/viewers/videoViewer/internal/ads.js +++ b/ui/component/viewers/videoViewer/internal/ads.js @@ -12,27 +12,30 @@ function hitsFiftyPercent() { } } +const adTags = { + ford: '612fb75a42715a07645a614c', + live: '60b354389c7adb506d0bd9a4', +}; + // Modified to work with IMA -// const vastMacroUrl = -// `https://vast.aniview.com/api/adserver61/vast/` + -// `?AV_PUBLISHERID=60afcbc58cfdb065440d2426` + -// `&AV_CHANNELID=60b354389c7adb506d0bd9a4` + -// `&AV_URL=[URL]` + -// `&cb=[CACHEBUSTING]` + -// `&AV_WIDTH=[WIDTH]` + -// `&AV_HEIGHT=[HEIGHT]` + -// // `&AV_SCHAIN=[SCHAIN_MACRO]` + -// // `&AV_CCPA=[CCPA_MACRO]` + -// // `&AV_GDPR=[GDPR_MACRO]` + -// // `&AV_CONSENT=[CONSENT_MACRO]` + -// `&skip=true` + -// `&skiptimer=5` + -// `&logo=true` + -// `&usevslot=true` + -// `&vastretry=2` + -// `&hidecontrols=false`; - - +const vastMacroUrl = + `https://vast.aniview.com/api/adserver61/vast/` + + `?AV_PUBLISHERID=60afcbc58cfdb065440d2426` + + `&AV_CHANNELID=${adTags.ford}` + + `&AV_URL=[URL]` + + `&cb=[CACHEBUSTING]` + + `&AV_WIDTH=[WIDTH]` + + `&AV_HEIGHT=[HEIGHT]` + + // `&AV_SCHAIN=[SCHAIN_MACRO]` + + // `&AV_CCPA=[CCPA_MACRO]` + + // `&AV_GDPR=[GDPR_MACRO]` + + // `&AV_CONSENT=[CONSENT_MACRO]` + + `&skip=true` + + `&skiptimer=5` + + `&logo=true` + + `&usevslot=true` + + `&vastretry=2` + + `&hidecontrols=false`; // only run on chrome (brave included) and don't run on mobile for time being const browserIsChrome = videojs.browser.IS_CHROME; @@ -59,11 +62,6 @@ function runAds(internalFeatureEnabled, allowPreRoll, player) { const height = videoElement.offsetHeight; const width = videoElement.offsetWidth; - const adTags = { - ford: '612fb75a42715a07645a614c', - live: '60b354389c7adb506d0bd9a4', - }; - const vpaidMacroUrl = 'https://gov.aniview.com/api/adserver/vast3/' + '?AV_PUBLISHERID=60afcbc58cfdb065440d2426' + @@ -91,7 +89,7 @@ function runAds(internalFeatureEnabled, allowPreRoll, player) { if (shouldShowAnAd && browserIsChrome && !IS_MOBILE) { // fire up ima integration via module player.ima({ - adTagUrl: vpaidMacroUrl, + adTagUrl: vastMacroUrl, vpaidMode: 2, // 2 maps to insecure }); } diff --git a/ui/component/viewers/videoViewer/internal/videojs.jsx b/ui/component/viewers/videoViewer/internal/videojs.jsx index b6e4027af..9ff2e2013 100644 --- a/ui/component/viewers/videoViewer/internal/videojs.jsx +++ b/ui/component/viewers/videoViewer/internal/videojs.jsx @@ -6,8 +6,8 @@ import * as ICONS from 'constants/icons'; import * as KEYCODES from 'constants/keycodes'; import classnames from 'classnames'; import videojs from 'video.js'; -import 'videojs-contrib-ads'; -import 'videojs-ima'; +import 'videojs-contrib-ads'; // must be loaded in this order +import 'videojs-ima'; // loads directly after contrib-ads import 'video.js/dist/alt/video-js-cdn.min.css'; import eventTracking from 'videojs-event-tracking'; import * as OVERLAY from './overlays';