final touchup

This commit is contained in:
Anthony 2021-11-04 20:33:50 +01:00
parent 1f981bff92
commit d920375d64
No known key found for this signature in database
GPG key ID: C386D3C93D50E356
2 changed files with 26 additions and 28 deletions

View file

@ -12,27 +12,30 @@ function hitsFiftyPercent() {
} }
} }
const adTags = {
ford: '612fb75a42715a07645a614c',
live: '60b354389c7adb506d0bd9a4',
};
// Modified to work with IMA // Modified to work with IMA
// const vastMacroUrl = const vastMacroUrl =
// `https://vast.aniview.com/api/adserver61/vast/` + `https://vast.aniview.com/api/adserver61/vast/` +
// `?AV_PUBLISHERID=60afcbc58cfdb065440d2426` + `?AV_PUBLISHERID=60afcbc58cfdb065440d2426` +
// `&AV_CHANNELID=60b354389c7adb506d0bd9a4` + `&AV_CHANNELID=${adTags.ford}` +
// `&AV_URL=[URL]` + `&AV_URL=[URL]` +
// `&cb=[CACHEBUSTING]` + `&cb=[CACHEBUSTING]` +
// `&AV_WIDTH=[WIDTH]` + `&AV_WIDTH=[WIDTH]` +
// `&AV_HEIGHT=[HEIGHT]` + `&AV_HEIGHT=[HEIGHT]` +
// // `&AV_SCHAIN=[SCHAIN_MACRO]` + // `&AV_SCHAIN=[SCHAIN_MACRO]` +
// // `&AV_CCPA=[CCPA_MACRO]` + // `&AV_CCPA=[CCPA_MACRO]` +
// // `&AV_GDPR=[GDPR_MACRO]` + // `&AV_GDPR=[GDPR_MACRO]` +
// // `&AV_CONSENT=[CONSENT_MACRO]` + // `&AV_CONSENT=[CONSENT_MACRO]` +
// `&skip=true` + `&skip=true` +
// `&skiptimer=5` + `&skiptimer=5` +
// `&logo=true` + `&logo=true` +
// `&usevslot=true` + `&usevslot=true` +
// `&vastretry=2` + `&vastretry=2` +
// `&hidecontrols=false`; `&hidecontrols=false`;
// only run on chrome (brave included) and don't run on mobile for time being // only run on chrome (brave included) and don't run on mobile for time being
const browserIsChrome = videojs.browser.IS_CHROME; const browserIsChrome = videojs.browser.IS_CHROME;
@ -59,11 +62,6 @@ function runAds(internalFeatureEnabled, allowPreRoll, player) {
const height = videoElement.offsetHeight; const height = videoElement.offsetHeight;
const width = videoElement.offsetWidth; const width = videoElement.offsetWidth;
const adTags = {
ford: '612fb75a42715a07645a614c',
live: '60b354389c7adb506d0bd9a4',
};
const vpaidMacroUrl = const vpaidMacroUrl =
'https://gov.aniview.com/api/adserver/vast3/' + 'https://gov.aniview.com/api/adserver/vast3/' +
'?AV_PUBLISHERID=60afcbc58cfdb065440d2426' + '?AV_PUBLISHERID=60afcbc58cfdb065440d2426' +
@ -91,7 +89,7 @@ function runAds(internalFeatureEnabled, allowPreRoll, player) {
if (shouldShowAnAd && browserIsChrome && !IS_MOBILE) { if (shouldShowAnAd && browserIsChrome && !IS_MOBILE) {
// fire up ima integration via module // fire up ima integration via module
player.ima({ player.ima({
adTagUrl: vpaidMacroUrl, adTagUrl: vastMacroUrl,
vpaidMode: 2, // 2 maps to insecure vpaidMode: 2, // 2 maps to insecure
}); });
} }

View file

@ -6,8 +6,8 @@ import * as ICONS from 'constants/icons';
import * as KEYCODES from 'constants/keycodes'; import * as KEYCODES from 'constants/keycodes';
import classnames from 'classnames'; import classnames from 'classnames';
import videojs from 'video.js'; import videojs from 'video.js';
import 'videojs-contrib-ads'; import 'videojs-contrib-ads'; // must be loaded in this order
import 'videojs-ima'; import 'videojs-ima'; // loads directly after contrib-ads
import 'video.js/dist/alt/video-js-cdn.min.css'; import 'video.js/dist/alt/video-js-cdn.min.css';
import eventTracking from 'videojs-event-tracking'; import eventTracking from 'videojs-event-tracking';
import * as OVERLAY from './overlays'; import * as OVERLAY from './overlays';