// 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 has announced that Call of Duty: Black Ops 3 is the biggest entertainment launch of 2015, beating out other popular launches, such as opening of Jurassic World earlier this year, which made $511 million in its opening weekend.

In addition, Black Ops 3 has the highest player engagement ever in Call of Duty history – with over 75 million hours played thus far.

Activision says retail sales for opening weekend have increased significantly compared to Advanced Warfare and Ghosts launch weekends. In addition, digital sales of Black Ops 3 were higher compared to Advanced Warfare’s digital sales on launch timeframe.

“Call of Duty’s millions of passionate fans have shown us, yet again, the strength of their commitment to this enduring franchise,” said Bobby Kotick, Activision Blizzard’s Chief Executive Officer. “Call of Duty: Black Ops III is the biggest entertainment launch this year in any medium, and bigger than any theatrical opening weekend ever.”

“The Call of Duty: Black Ops III launch is bigger than any game, any movie, or any entertainment launch this year. But more importantly, our fans are engaging more deeply with the franchise than ever before. In fact, so far, people are playing Black Ops III for more hours per player than any Call of Duty game on record,” said Eric Hirshberg, CEO of Activision Publishing. “Call of Duty is more than a game, it’s a year round passion for a growing base of millions of fans and it’s only gaining momentum.”

“As we‘ve said from the start, PlayStation is the best place to play Call of Duty, and this record-breaking launch shows how true this statement is. Black Ops III is the biggest launch of the year so far, and the PlayStation Nation is ready. We’re proud to call PlayStation the home of Call of Duty and look forward to supporting our community with DLC map pack content first,” said Adam Boyes, VP of Publisher and Developer Relations, Sony Computer Entertainment America.

On PlayStation®4, Black Ops III set a new record as the best-selling digital full game by units sold in its first day of availability in PS4™ history.

Call of Duty: Black Ops 3, with this announcement, was able to maintain its lead over a packed holiday game season. Fallout 4 launched yesterday, but Bethesda has yet to report any numbers on its launch.

comments below