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

Activision and Infinity Ward have officially announced that the 2019 Call of Duty game coming from the studio is called Call of Duty: Modern Warfare. There’s no number attached. 

The company released the first trailer for Call of Duty: Modern Warfare today, providing fans with a first look at the new title coming from Infinity Ward.

Prepare to go dark, Modern Warfare is back! The most celebrated series in Call of Duty will make its highly-anticipated return when Call of Duty®: Modern Warfare® launches October 25th in a powerful experience reimagined from the ground-up. The all-new title, published by Activision and developed by Infinity Ward, engulfs players in a modern-day conflict, where split-second decisions could affect the global balance of power. The new Modern Warfare features a unified narrative experience and progression across a heart racing, epic single-player story, an action-packed multiplayer playground, and new cooperative gameplay.

“This is an all-new Modern Warfare reimagined in every way,” said Dave Stohl, co-Studio Head, Infinity Ward. “We are creating an emotionally charged experience that’s inspired by the headlines in the world today, where the rules are grey and battle lines are blurred. Players will join a varied cast of international special forces and freedom fighters in gripping and heart-pounding missions through iconic European cities and volatile expanses of the Middle East. It’s intense, it’s exciting, and we can’t wait for our fans to play this October.”

The trailer showcases the return of Captain Price, alongside some new characters for the title in the game, as the title is a re-imagining of the Modern Warfare series. 

This is not a sequel or a prequel. It’s a brand new story.

The game features a new campaign, multiplayer mode, and a co-op mode, but today’s reveal focuses on the campaign only.

Call of Duty: Modern Warfare is one of the realest Call of Duty games to ever release, with a focus on current headlines and applying those to the Call of Duty universe. 

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

Watch the reveal trailer:

For more of our coverage on Call of Duty: Modern Warfare, check out our page for all the news we’ve posted here.

comments below