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

As part of the new Battle Pass system that is being developed for Call of Duty: Modern Warfare, Activision is bringing a familiar Battle Pass system to Call of Duty – the first time for a console Call of Duty game.

The new system will allow players to either use the free or premium Battle Pass track per each season to get new cosmetic content.

The company confirmed that there will also be ways for players to earn Call of Duty Points in the Battle Pass just by playing the game.

The Battle Pass system will be added to Modern Warfare later this year.

  •  The new Battle Pass system will allow players to see the content that they are earning or buying. Battle Passes will launch timed to new, post-launch live seasons, so you can unlock cool new Modern Warfare-themed content that matches each season.
  • With the new Battle Pass system, players will be able to earn COD Points by playing the game. 
  • There will be both a Free Stream and a Premium Stream of content in the Battle Pass System in Modern Warfare. New base weapons will be earned through gameplay, simply by playing Modern Warfare. Functional attachments for base weapons can be unlocked through gameplay as well just like in the game’s Beta.
  • The Battle Pass and the In-Game Store will feature a variety of cosmetic content that does not impact game balance.

The Battle Pass System for Modern Warfare will not launch when the game releases on October 25th. Here’s why: First and foremost, we are all focused on making the Day One experience awesome. Second, it’s important to us that everyone who is playing Modern Warfare has the chance to work their way through the new game and unlock all the rewards that are waiting for you. We expect to launch this system for Modern Warfare later this year.

SOURCE: Activision

comments below