// 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 Sledgehammer Games have officially announced the fourth and final DLC Pack for Call of Duty: WWII, Shadow War. Shadow War DLC Pack 4 will be available on August 28 on PlayStation 4, with release on other platforms to follow.

Shadow War DLC Pack 4 features three MP maps, a new War Operation, and the final chapter of the WWII Nazi Zombies saga, Frozen Dawn.

Multiplayer Maps: 

  • Airship: Set in a secret enemy base high in the Alps, Airship takes the battle to new heights. Fight for control of the docked zeppelin, or take your chances running along a treacherous cliff, where one slip up can lead to an unfortunate trip down the mountain that will end in a respawn.
  • Excavation: In an Algerian mine, the enemy stockpiled priceless art and gold from their European conquests. The battle will ensue around these pillaged goods, the dunes of a tank graveyard, and rock outcroppings scattered around the map.
  • Chancellery: The enemy forces have taken hold of a French Chancellery, but they won’t expect a chaotic firefight in the middle of the night. Wrest control of the stronghold’s main courtyard, while covering your team from the flanking pathways to the map’s main area for this epic night-time brawl behind enemy lines.

War Operation: 

  • Operation Arcane: On top of these Multiplayer experiences, there is also Operation Arcane, a new War Mode Mission that will take players deep within a secret enemy research facility in the Austrian mountains. Allied Forces players will be tasked with infiltrating this lab, stealing enemy secrets and schematics and finally destroying whatever classified technology remains in a hanger full of UFOs. Of course, being that it is a research facility, there are a few clandestine weapons, such as the Tesla Gun, and mysterious super soldier serums that players can use to help turn the tide of battle.

Zombies: 

  • Frozen Dawn: Shadow War also includes Frozen Dawn, the final chapter to the epic Call of Duty: WWII Nazi Zombies story. In this experience, we rejoin Marie, Drostan, Olivia and Jefferson as they try to stop an incredible evil once and for all. Acquiring the Sword of Barbarossa has not put an end to the undead threat. A darker and more powerful threat lurks in the depths of Thule. In the unfathomable depths of a lost city, our heroes are humanity’s last hope of ending the cult of Thule. Luckily, they will have a few secret weapons to help put the ancient rulers of the world to rest.

Trailer


Call of Duty: WWII Shadow War DLC Pack 4 is available August 28 on PlayStation 4 with release on Xbox One and PC to follow. The DLC Pack can be purchased separately for $14.99 or as part of the Season Pass for Call of Duty: WWII.

comments below