// 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’s Noah Heller talked with EuroGamer recently and he gave a few updates.

In regards to Elite 2.0 he described it that itneeds to be in” the next Call of Duty. He went on,“We’ll be back at some point to talk about that game, and when we do, we’ll reveal a lot more. Long term, we’re making Elite and the game synonymous. If you want to play solo or single-player, you might never notice Elite. But the moment you dip your toe into multiplayer, you’re part of Elite. It’s just up to you whether you take full advantage of the features or not. When we start looking towards the next game, our focus is on in-game integration. The features that have captured player imagination are things like push to game, seeing your clan elements in the game itself. And so our absolute focus for this year is on deeper and deeper integration.”

He gave a little reason on the confusion of “2.0” by saying, “2.0 is an internal codename, so we probably shouldn’t be using that externally, because it can be a little confusing. We should have called it Elite Zimbabwe.”

He also gave an update on the Clans, stating that there are currently 670,000 clans active on ELITE. He also stated that two new shows are coming to ELITE TV. One being the just announced “n00b tube” and the other being an animated show called Cocked Hammers.

In regards to PC support Noah stated, “Unfortunately I don’t have an update for you at this time. We’re still working on it. We can’t date it yet. It’s a challenging piece of development. It’s really all I can say. I get several emails a day. It’s a vocal, passionate audience. What we need to ensure is that when we ship something for them, it’s quality. We cannot make them wait this long and then deliver something that isn’t quality.”

At GDC, Beachhead Studio confirmed that Elite Mobile App update version 1.2 has Tablet Optimized versions but no confirmed release date for that update. He also gave a update on the Tablet COD Elite App stating, “We’re working hard right now on the tablet application. I can’t date it for you guys yet, but I’ll tell you it’s not a port. It’s built specifically for that platform, and built with this two screen idea in mind, the idea people are going to be playing the game and might have this on their lap, to check with their friends to see what their progress is like in real-time.”

SOURCE:  Eurogamer

comments below