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

Infinity Ward has released the latest patch update for Call of Duty: Modern Warfare across platforms overnight on November 12.

The new patch update is version 1.08 and is 3.4GB in size on PS4 and Xbox One and around 8GB on PC.

This new update brings additional tuning to weapons, more bug fixes, and some spawn system updates that the studio has been mentioning across social channels the last few days. There’s no new content in this update.

11/12/19 – Update Details and Patch Notes

GENERAL FIXES:

  • More backend fixes to prevent crashes and improve stability across all modes and all platforms

Riot Shield:

  • Fix for a bug where a player using the Riot Shield would not take explosive damage during certain situations
  • Fixed an issue where the Riot Shield would stow on the players back when using Stim. (Tactical)

Footsteps

  • Adjusted to always play walk footstep sounds when in ADS and crouch independent of speed
  • Increased the speed in which you can remain using the walk footstep sounds by slightly pressing on the movement stick

Challenges

  • General fix for the UI and Challenge state getting out of sync. We’ll continue to monitor and make additional fixes as needed in future updates
  • Fix for a challenge related error that could occur; DEV ERROR 5476
  • Fix for Mission Challenge description, “Get Kills with a Burst Weapons” being too vague.

Piccadilly:

  • Spawn tuning while playing TDM and Domination
  • Domination flag adjustments; B Flag is now near the busses instead of the center fountain

Weapons:

  • ARs: Minor hip spread adjustment
  • 725: Reduce range
  • M4: increase hip spread, decrease damage to the head
  • FAL: Reduced recoil, increased ADS speed
  • EB-14: Increase ADS speed
  • Miscellaneous ammo reserve adjustments upon spawning to be in-line with other weapons of their class

Special Operations:

  • Fix for a bug where a player using the Overkill perk with an SMG as their secondary would sometimes spawn without a primary weapon when joining a match in progress

SOURCE: Reddit

comments below