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

A new patch update for Call of Duty: Modern Warfare Remastered is now live on PlayStation 4, Xbox One, and PC.

PATCH NOTES: 

Global:

UI

  • Fixed an issue with “Loss Stat Prevented” messaging after joining in progress and winning a match
  • [PS4/XBOX ONE] Fixed several issues with overlapping HUD elements when playing split screen
  • Fixed issue with medal text extending beyond its area
  • Re-Enable join game from recent players list
  • [XBOX ONE] Fixed messaging when attempting to join a game session with a user that had been previously blocked
  • After Action Report score display updates
  • [PC] Fixed issues with Party options
  • [PC] Clan support added for Steam
  • [PC] Fixed issues with overlap based on aspect ratio
  • [PC] Added Environmental Kills and Melee Kills to Combat Record

Audio

  • Removed footstep audio while aiming down sights
  • Dead Silence Perk scale adjusted to match legacy

Miscellaneous

  • Added shorter pre-match timers in Private Match
  • Increased smoke grenade speed and volume
  • Switching to a pistol no longer deactivates the firing range lane
  • [XBOX ONE] Fix for frequent crash when selecting a friend from the in-game Friends menu
  • [XBOX ONE] Fix for issue where it was possible to join on a multiplayer part with Party Privacy set to “Closed”
  • [XBOX ONE] Fix for issue where split screen player could not join a party after increasing Party Player Limit
  • [PC] PC virtual lobby VFX optimizations
  • [PC] Adjusted helicopter killstreak hitbox to be more consistent with original Modern Warfare
  • [PC] Disabled communication with blocked users
  • [PC] Fixed bad save version issue in Campaign
  • [PC] Dedicated Server fixes

Maps:

Ambush

  • Fixed tunnel grates exploit

Downpour

  • Fixed stuck spot that prevented players from leaving prone position

SOURCE: Activision Support: PS4 // Xbox One // PC

comments below