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

It’s almost time for the worldwide premiere of Call of Duty: Modern Warfare Multiplayer Universe.

Activision and Infinity Ward will showcase the very first look at the entire Multiplayer Universe that’s part of Call of Duty: Modern Warfare on August 1 at 10AM PT / 1PM ET / 6PM UK.

The stream will feature a look at gameplay of MP, details on what Infinity Ward has been working on for the overall modes, and more as the studio starts to pull back the curtain on more of Call of Duty: Modern Warfare.

Schedule:

10AM PDT: MP Trailer Debut and Pre-Show

Beginning at 10AM, we will start proceedings by bringing the action with the debut of the Modern Warfare Multiplayer Gameplay Trailer! Then watch the pre-show where Infinity Ward’s developers explain their design goals and vision for Multiplayer, how they’re bringing the most weapon choices in Call of Duty history to the party, along with an overview of the maps, game modes, and a number of other surprises… with the Multiplayer Gameplay Reveal just moments away!

10:30AM PDT: Gameplay Livestream

The Multiplayer Universe is revealed as multiple gameplay Livestreams go live! Expect some of your favorite, top-tier Twitch streamers and content creators from around the world to simultaneously stream Multiplayer games live to their own Twitch channels, all from inside the Call of Duty: Modern Warfare Multiplayer Arena!

Be here to witness as livestreamers challenge (as well as team up with) each other across multiple game modes! This spectacle will include epic firefights using a wide variety of Operators, Loadouts, Killstreaks, and Field Upgrades across a number of brand-new maps, some with day and night-time variants. Expect bragging rights, hurt feelings, explosive and adrenaline-soaked match-ups, and insanely competitive combat!

2PM PDT: Post-Show

When the dust has settled, the epic Livestreamer confrontations have been resolved, and the spectacle of brand-new Multiplayer is still fresh in your mind, stick around for the Post-Show, when we’ll reveal more details on some pre-launch plans, check out another surprise or two from Infinity Ward’s developers, and gain more knowledge about how we’re planning on making Call of Duty: Modern Warfare the ultimate online playground.

You can watch the reveal stream on Twitch, which is embedded below.

Call of Duty: Modern Warfare is available October 25.

We’re attending the Gameplay Premiere in LA this week, so be sure to check back to CharlieIntel August 1 for a whole lot of information.

comments below