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

One of the big controversies with Call of Duty: Modern Warfare is the matchmaking system in the game.

Many fans have been upset over the skill based matchmaking style system that exists in the game, but Infinity Ward has yet to even acknowledge any sort of system in the game.

YouTubers conducted a test recently and found that Modern Warfare has a hidden MMR system in the game that matches players based on their performance from the last 5 games in consideration while matchmaking.

A Respawn developer, the team behind Apex Legends & part of the EA studio family, was asked about Skill Based Matchmaking in Apex Legends. Apex also does have SBMM, alongside Fortnite.

And while controversy also exists in those games, this Respawn dev says that SBMM is set to become the norm for MP games as there is data that suggests it benefits up to 90% of the player base.

He says it does hurt the “10%’ers” but that its beneficial to the majority of the player base.

He also admits that the Apex Legends SBMM might need some additional tuning at some point.

One of the things that many Call of Duty fans forget is that the Reddit and Twitter side of the community is just a small, vocal portion of the entire Call of Duty game.

Infinity Ward and the developer teams have the full data on the games and understand the entire player base – not just the vocal ones on social media all the time.

There’s still no indication if Infinity Ward plans to address SBMM in Modern Warfare.

comments below