// 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); }; });

Scuf Gaming has announced a partnership with Activision to release a new limited edition SCUF Vantage 2 Call of Duty®: Modern Warfare® controller.

The new controller features an exclusive Modern Warfare design for the new SCUF Vantage 2 product. The SCUF Vantage 2 is an officially licensed PlayStation 4 controller and also works on PC.

The SCUF Vantage 2 Call of Duty: Modern Warfare Edition is available for PlayStation 4 and PC and can be pre-ordered now starting at $219.95. The design of the MW Controller sees an exclusive topographic map faceplate, the MW logo on the Touch Pad, and other MW inspired details across the product. 

“Nine years ago, we invented the SCUF to enable gamers to improve their gameplay on fast-paced shooter games like Call of Duty, so this is a community we are both passionate and very engaged with,” said Ironmonger. “We’ve equipped countless players with the high-performance controllers they need to win. Whether playing at home, in a professional tournament, or elsewhere, SCUF has become the de-facto controller in the competitive community. This limited-edition controller marks another exciting chapter for both Scuf Gaming and the Call of Duty franchise.”

Here’s a look at the new controller.

SCUF also announced that people who buy this new controller will receive a bonus in-game digital item, a sniper scope weapon charm, in Call of Duty: Modern Warfare to use in-game. The SCUF Vantage 2 Modern Warfare controller starts shipping on October 14, 2019 and is available for pre-order now. 

Activision continues to expand its licensing portfolio for Call of Duty with partnerships with Mountain Dew and Doritos and Totino’s to have 2XP codes and in-game bonus items with purchases of the different products for this year’s release. 

Learn more about the new SCUF Vantage 2 Call of Duty®: Modern Warfare® Edition and pre-order it now here

Call of Duty: Modern Warfare is available October 25 on PlayStation 4, Xbox One, and PC.

comments below