// 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 changes with Call of Duty: Modern Warfare having Crossplay support is that players are required to have an Activision and Call of Duty account in order to play the game.

If you played the Modern Warfare beta, you should have already had a Activision account registered and created in order to play the game then. That same account will let you play Call of Duty: Modern Warfare at launch if you’re buying the game this week.

Here’s how to create an Activision account on Call of Duty website:

Visit the Call of Duty website and then hit Login | Sign Up on the website in the top nav bar. From there, enter the required information and link your PlayStation, Xbox, and PC accounts in order to support crossplay and cross progression.

Activision Support provides for info on how to sign up and log in to the Activision Account directly from Call of Duty: Modern Warfare game when it launches. Creating and registering online will save time to ensure you are set to play when the game is available.

Activision Support also provides details on how to change your Activision Display ID in game to match what you want it to match. The Activision Display ID can be different than your platform ID.

From Activision Support:

Signing Up

The Account Creation screen requires you to enter a Display Name, a valid email address, and a password. You will also need to set your region and decide whether to receive marketing emails before confirming your account.

After accepting the Call of Duty Account Terms of Service and Privacy Policy, your account registration will complete and your Account Summary will display.

Note that the Account Summary includes your Activision ID, which is the name that you will appear as in game.

Logging In

If you already have an Activision/Call of Duty account, simply enter your email address and password. After logging in, your Account Summary will display.

Note that the Account Summary includes your Activision ID, which is the name that you will appear as in game.

Activision ID

After signing up or logging in, you’ll see that your Activision ID includes a hash mark followed by a series of numbers (ex: DisplayName#1234567). This number is unique to your Activision/Call of Duty account and allows players with the same Gamertag, PSN ID, or BattleTag to keep their names while differentiating them in game. The number also makes account creation easier, eliminating the need to see if a name is available.

Changing your Display Name

The in-game Change Display Name feature is not enabled in the Beta. However, you can change your Display Name online.

  1. Log in to your Activision/Call of Duty account.
  2. Select BASIC INFO.
  3. Select EDIT next to your ACTIVISION ID and enter your desired Display Name.

SOURCE: Activision

comments below