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

Trailer Screenshots:
[nggallery id=251]

Official Images:
[nggallery id=260]

 

May 22nd DLC Content Collection 2 includes: 4 “Small” Face-Off maps, 3 Regular Maps, 2 Spec-Ops Missions
($15 For ALL Xbox Live Members / Included with ELiTE)
 

4 New “Face-Off” Maps ( Playlist 1vs1 or 2vs2)

Aground is set on a shipwreck off the coast of Scotland.

Erosion sees you running around Roman ruins in Italy while Mount Vesuvius erupts in the background.

Getaway plays out in a beachside mansion in Brazil.

Lookout is set in a forward observation post in Afghanistan.

 

1 NEW Multiplayer map:
Oasis: it’s set on a beach resort in the United Arab Emirates. “It’s actually in or near one of the levels from single player – the one that takes place in UAE. You can see part of that level in the background in this level. It’s all new geo but it’s in the same area.”

2 NEW Spec-Ops Missions:

Ironclad: set immediately after the Hamburg mission from the single player campaign, with you and a comrade attempting to make it back to the landing beach after the initial assault. “It has that asynchronous combat that we’ve been focusing on, where one player does one thing and another does something completely different. One player is on the ground and has to clear obstacles and engage in basic infantry combat. Then you have another guy driving a tank and you both have to support each other and get back to the beaches.”

Killswitch: plays out in an all-new area set in a Russian dockyard. “One person is on the ground sneaking through and the other is in a sniper perch, sniping for the other player. You have to get through the level and detonate an EMP at the end.”

2 Previous Maps: Sanctuary and Foundation

 

***On May 15th “Face-Off” Maps: Aground and Erosion
will be FREE on Xbox Live for All.***
 

New game mode “FACE-OFF”: It’s a one-on-one or two-on-two deathmatch mode featuring four brand new maps custom built for more intimate combat.

 

Visit our DLC page more info!

PC and PlayStation 3 roll-out to follow.

SOURCE: Eurogamer

comments below