// 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 Sony have officially announced the limited edition Call of Duty: Black Ops 3 PlayStation 4 console bundle, which features a 1TB hard drive, a custom controller, Black Ops 3 game standard edition, NUK3TOWN bonus map, and more for $429.

This PS4 features the Call of Duty: Black Ops III ember orange logo on a Jet Black chassis, complete with colored power and eject buttons, as well as three emblems on the front each representing a game mode — the SOG Skull signifies campaign, the Winslow Accord faction logo is pulled straight from the game’s fiction, representing one of the factions you play in multiplayer, and “the mark” denotes zombies.

The DualShock 4 included has a grey and orange color scheme, along with the III logo on the right grip. We’ll also sell the DualShock 4 as a standalone item separately from the bundle.

This new bundle starts the new era of Call of Duty, with its new home on the PlayStation platforms. Activision’s GM of Call of Duty Rob Kostich said:

“Last month’s beta on PS4 was a phenomenal success. We want to thank the amazing PlayStation Nation for its feedback, for its participation, and for making Black Ops III the largest beta in PS4 history! Black Ops III is without a doubt the most ambitious game that Call of Duty has ever created — Treyarch is pushing the boundaries across each and every mode of play on PS4.

“From day one, it has been designed to push the franchise to new heights on next generation hardware. We cannot wait for you to experience Black Ops III for yourselves on November 6th, and we hope you like the Black Ops III Limited Edition PS4 as much as we do!”

In addition, Sony has confirmed they will be selling the controller separately for those interested in buying. It costs $64.99 (prices may vary) and is available now for preorder. The controller is set to be available on November 6th separately as well.

Preorders for the Call of Duty: Black Ops 3 Limited Edition PS4 bundle begin today worldwide. Check with local retailers for regional pricing and more information. The bundle will be available alongside Black Ops 3’s launch on November 6th.

Sony has also announced that, in Europe, in addition to the special console bundle, there will also be a regular edition 1TB PS4 with Black Ops 3 game included.

SOURCE: PlayStation and PlayStation EU

comments below