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

Activision and Infinity Ward have officially released the first details for the Special Ops mode in Call of Duty: Modern Warfare.

Special Ops mode in Call of Duty: Modern Warfare is the third mode in the game with co-op features and joins the Campaign and MP to be part of the overall game for the October 25 launch. Special Ops first debuted in Modern Warfare 2 back in 2009 and makes it return this year in Call of Duty: Modern Warfare.

Background:

A greater evil has taken over the Eastern Hemisphere, and it is up to the global alliance Armistice, a joint force of Allegiance and Coalition operators led by Kate Laswell (CIA) and Sergeant Kamarov (FSB), to stop and sever a global terror organization’s access to weapons, funds, intelligence, and hardware.

Mode Details:

Special Ops mode in Call of Duty: Modern Warfare is an extension of the game’s campaign mode. As noted when the game was originally announced, the narrative aspect of the campaign carries over across the game.

This mode is available on all platforms and is reimagined as “collection of expansive, interconnected Operations against a new and encroaching threat, players will assemble into strike-teams of four to execute multi-phased objectives, which together will advance the overarching story of Modern Warfare.”

In this mode, enemies will be reactive to the decisions of your squad, which means that the outcome of the battles can be different based on how your squad plays the mode.

Call of Duty: Modern Warfare will launch with four multi-stage Operations in the game on PlayStation 4, Xbox One, and PC. Activision says that more Operations will be released ‘throughout the post launch seasons.’

The game mode features both Operations and Missions. Operations are the larger, multi-stage feature for Special Ops in Modern Warfare and Missions are built within the Operations.

  • Operations: As you infil into one of the many war-torn zones within Special Ops, you and your team have full latitude on how to accomplish your Operations. This Special Ops game mode is a 4 player matchmade activity centered around interconnected experiences that take the form of objectives, each culminating in the removal or destruction of a key logistical aspect of the Al-Qatala army.
  • Missions: Complementing the multi-stage Operations, and also available across all platforms, are additional Missions, which can be played solo or with up to four players. Whereas Operations give you the widest breadth of strategic and tactical choice, Missions are a more curated experience where your proficiency with specific weapons, killstreaks, and other tools will be tested. These Missions are extremely replayable, and you’re able to achieve a 1, 2, or 3-star ranking based on your performance. Naturally, there will be an “Infinity Ward time” that you can attempt to beat!

The company also confirmed that ‘all post launch Operations‘ for Special Ops will be ‘coming to all platforms‘ at the same time.

Operations in Special Ops in Call of Duty: Modern Warfare will have your stats, including Operators, Loadouts, and Progress will carry over from the MP mode. You can pick which Operator and Loadout to use in this and build out your strategy with your squad. Special Ops mode will support up to 4 players.

Trailer:

The overall Special Ops experience with the new Operations is available on PlayStation 4, Xbox One, and PC in Call of Duty: Modern Warfare at launch on October 25.

comments below