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

The Call of Duty: Modern Warfare Open Beta is almost here!

Activision and Infinity Ward have released the official trailer for the upcoming Call of Duty: Modern Warfare Open Beta.

The new trailer showcases an overview of the content that will be playable in the Modern Warfare beta, as well as what to expect during the Open Beta weekends, including the Ground War mode featuring large player counts.

Be among the first to experience the intense multiplayer action, ranging from the quick, close quarter 2v2 Gunfight mode, to traditional 6v6 multiplayer gameplay and larger player count firefights

Beta Content:

  • Gunfight 2v2 Mode
  • 6v6 Maps
  • Larger Player Count Modes
  • Gunsmith Weapon Customization System
  • And more

Expect an epic and ever-changing series of Maps, Playlists, and other content drops throughout the Beta Test Weekends, with surprises and a great deal of content to access.


The Call of Duty: Modern Warfare Open Beta begins on Sept. 12 at 10AM PT on PS4 in Early Access for those who pre-order; it goes into an Open Beta on Sept. 14 at 10AM PT. Weekend 1 of the Open Beta on PS4 ends on Sept. 16 morning PT time.

On PlayStation 4, PlayStation Plus will not be required (except for certain regions only). For Xbox One, Xbox Live Gold is required. PC players, an active Battle.net account will be needed in order to play the beta.

Here’s the full Open Beta Schedule:

Weekend 1 – PlayStation 4 Only

  • Pre-Order Early Access: September 12 at 10AM PT – September 13
  • Open Beta: September 14 – September 16

Weekend 2 – Cross Play

PlayStation 4

  • Open Beta: September 19 at 10AM PT – September 23

Xbox One

  • Pre-Order Early Access: September 19 at 10AM PT – September 20
  • Open Beta: September 21 – September 23

PC (Battle.net)

  • Pre-Order Early Access: September 19 at 10AM PT – September 20
  • Open Beta: September 21 – September 23

Stay tuned to CharlieIntel for the latest news as we gear up for the next two weekends of Modern Warfare action!

comments below