// initialize jwplayer var playerInstance = jwplayer('player');// player dom elements var playerContainerEl = document.querySelector('.player-container');// returns video player position from top of document function getElementOffsetTop(el) { var boundingClientRect = el.getBoundingClientRect(); var bodyEl = document.body; var docEl = document.documentElement; var scrollTop = window.pageYOffset || docEl.scrollTop || bodyEl.scrollTop; var clientTop = docEl.clientTop || bodyEl.clientTop || 0; return Math.round(boundingClientRect.top + scrollTop - clientTop); }// returns the current y scroll position function getScrollTop() { var docEl = document.documentElement; return (window.pageYOffset || docEl.scrollTop) - (docEl.clientTop || 0); }// configure jwplayer instance playerInstance.setup({ autostart: true, playlist: 'https://cdn.jwplayer.com/v2/playlists/mYdavspX', primary: 'html5', setFullscreen: true, width: '100%' });// when jwplayer instance is ready playerInstance.on('ready', function() { var config = playerInstance.getConfig(); var utils = playerInstance.utils; // get height of player element var playerHeight = config.containerHeight; // flag determining whether close has been clicked var closed = true; // CHANGED // flag determing whether player is playing var playing = false; // ADDED // eventhandler for when close button is being pressed document.getElementsByClassName('icon-close')[0].addEventListener('click', () => { closed = true; onScrollViewHandler(); }); playerInstance.on('play', function() { closed = false; playing = true; // ADDED }).on('pause', function () { playing = false; // ADDED }).on('adPlay', function() { closed = false; // ADDED playing = true; // ADDED }).on('adPause', function() { playing = false; // ADDED });// get player element position from top of document var playerOffsetTop = getElementOffsetTop(playerContainerEl);// set player container to match height of actual video element playerContainerEl.style.height = playerHeight + 'px';// below we handle window scroll event without killing performance function onScrollViewHandler() { var minimized = getScrollTop() >= playerOffsetTop;if (closed && minimized) { minimized = false; jwplayer().pause(); playing = false; // ADDED } else if (!minimized && !playing) { closed = true; // ADDED } utils.toggleClass(playerContainerEl, 'player-minimize', minimized); // update the player's size so the controls are adjusted playerInstance.resize(); }// namespace for whether or not we are waiting for setTimeout() to finish var isScrollTimeout = false;// window onscroll event handler window.onscroll = function() { // skip if we're waiting on a scroll update timeout to finish if (isScrollTimeout) return; // flag that a new timeout will begin isScrollTimeout = true; // otherwise, call scroll event view handler onScrollViewHandler(); // set new timeout setTimeout(function() { // reset timeout flag to false (no longer waiting) isScrollTimeout = false; }, 80); };});

With Call of Duty: Modern Warfare launch fast approaching, there’s a number of bonus content you can get with purchasing the game at different retailers or by purchasing licensed Call of Duty products.

In this post, we’re summarizing all of the pre-order bonuses, in-game bonus items, and licensed bonus items you can get for Call of Duty: Modern Warfare (credit to u/EasyEli).

DIGITAL COPY BONUSES:

  • Digital Purchases on PS4 Store, Xbox One Store, or Battle.net: Purchase Call of Duty: Modern Warfare on digital and receive the in-game XRK Weapons Pack for day 1 launch use. The XRK M4 assault rifle and XRK .357 handgun are built to be fast, accurate and hard hitting, giving you versatile options adaptable to any play style. Learn more about the XRK offer here.
  • Digital Pre-Orders on PlayStation 4 Store, Xbox Store, or Battle.net + Retailer pre-orders at majority of stores worldwide: Get a Prestige Token to use in Call of Duty: Black Ops 4.

PHYSICAL COPY BONUSES:

  • GameStop US: Pre-order Modern Warfare (any edition) at GameStop US to get a bonus Call of Duty Endowment Calling Card in Call of Duty: Modern Warfare. GameStop will also donate a portion of the sales of Modern Warfare to the Endowment. Only at GameStop, get an exclusive GameStop C.O.D.E. Calling card with purchase of the game. For every copy sold, GameStop will donate to the Call of Duty Endowment, which helps find high quality jobs for unemployed veteran.
  • GAME UKGet 3 hours of 2XP in Modern Warfare and a Captain Price figurine with pre-order.
  • Amazon UK: Purchase Call of Duty: Modern Warfare on Amazon UK or JB HI-FI to get the Recon Drone Bonus Digital Content Pack, which includes a weapon charm, a calling card, and emblem. Amazon UK also has an edition of Call of Duty: Modern Warfare with Doritos that include Double XP.
  • Call of Duty: Modern Warfare “Precision” Edition: Exclusively available at GameStop in US, EB Games in Australia and Canada. More regions will have this edition exclusive to select retailers.

LICENSED PRODUCTS BONUS ITEMS:

  • SCUF Gaming: Purchase the SCUF Vantage 2 Modern Warfare Controller for PS4 and PC and get a bonus sniper scope weapon charm in Call of Duty: Modern Warfare. Learn more here.
  • KontrolFreek: Purchase the Modern Warfare Performance Thumbsticks and get a bonus animated in-game calling card in Call of Duty: Modern Warfare. Learn more here.
KontrolFreek Calling Card
  • ‘Making of Call of Duty’ Book on Amazon: Purchase the Making of Call of Duty art book on Amazon US and get a bonus in-game Operator Skin in Call of Duty: Modern Warfare.
  • NVIDIA: Buy a NVIDIA Geforce RTX bundle and get a PC copy of Call of Duty: Modern Warfare for free. Learn more here.
  • Mountain Dew and Doritos: Get Bonus 2XP with purchases of specially marked packages of Mountain Dew and Doritos. Learn more here.
  • MTN DEW Game Fuel: Purchase Game Fuel drink to get an exclusive in-game operator skin in Call of Duty: Modern Warfare, alongside bonus 2XP. Learn more here.
Game Fuel In-Game Operator
  • McFarlane Toys: Purchase a 2019 Call of Duty figure from McFarlane Toys (Richtofen, Frank Woods, or Captain Price) and get a bonus Toy Soldier in-game weapon charm in Call of Duty: Modern Warfare. Learn more here.
McFarlane Toys Bonus Content
  • Totino’s: Purchase specially marked packages of Call of Duty: Modern Warfare of Totino’s to get exclusive in-game items, including a bonus calling card, custom in-game Watch, and a Weapon Charm. Learn more here.

SOURCED: Reddit (Thanks @PrestigeisKey and @Outdew!)

comments below