// 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 (version 1.08) for Call of Duty: Infinite Warfare is now live on PlayStation 4 and Xbox One. The patch is around a 2GB update. Size may wary by platform.

PATCH NOTES:

Mission Team Ranks:

  • Each Mission Team now goes up to Rank 100! Once you hit that level 50 rank, you’ll go on to chase after a Commander rank until you reach Mission Team Commander Rank 100!
  • New ranks better rewards, so Commander Ranks will reward you MKII versions of Mission Team-only Prototype weapons once achieved. You can also craft more! Commander Ranks reward salvage every level you rank up as long as that level isn’t giving you a MKII Prototype reward.

Features Update:

  • Leaderboards – Before 1/31
  • Combat Record – Late February
  • Emblem Editor – Late February

Featured Content and What’s New:

General Fixes:

  • Added ability for both splitscreen players to change their own Missions in the lobby before a match starts
  • Safeguard against jitter mod exploits
  • Defender: Fix for exploit that could occur if a player using Rewind spawns on a newly spawned Defender drone, allowing the player to carry their gun as they carry the drone
  • Adjusted Taunt menu to wrap to the bottom of the list
  • During the final killcam, the team emblem shown was the emblem of the user who died rather than the player who got the kill. This has been fixed.
  • Hardcore Search and Destroy: Fix for “Friendly Fire is not Tolerated” displaying after every round for the remainder of the game
  • Added ability to equip Calling Card and emblem after acquiring them from a Supply Drop
  • Camo challenges involving Direct Impact kills with the Howitzer were not tracking. This has been fixed.
  • Various updates to weapon camos
  • Fix for players SPM not being calculated correctly in some instances
  • Camo adjustment for the MK2 R3k not covering the right side of the weapon
  • Allow players to skip Mission Team videos even if it’s their first time seeing them
  • Fix for the KBS Harbinger reload animation playing twice while holding down both triggers
  • Fixed an issue where the Jammer Grenade was not damaging scorestreaks correctly
  • Fixed an error a player would receive when attempting to edit a class with the OSA
  • Fix for an issue where players with akimbo weapons were immune to the Steel Dragon

CWL/CODCASTER:

  • Fix for team colors not appearing the proper shade
  • Added CWL specific game mode icons
  • Fix for Cold Blooded not affecting Thermal Scope for Casters (Xbox)
  • Adjusted the position of the gamemode icon so the Uplink image does not stretch
  • Removing the required number of players for CWL matches
  • Allow for multiple casters in the same lobby

SOURCE: Infinity Ward

comments below