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

Sony PlayStation has announced that they will not be attending E3 2020.

This marks Sony’s second year of skipping E3, after deciding to not be at the event in 2019 as well.

This year marks a big year for gaming with the launch of PlayStation 5 from Sony and the Xbox Series X from Microsoft. It’s interesting that the company has decided to skip E3 with the launch of their new console this year, but it may show that E3 is starting to wind down in favor of hosting events on their own for their fans.

Sony announced the news in a press statement to outlets this afternoon.

After thorough evaluation SIE has decided not to participate in E3 2020,” said a Sony Interactive Entertainment spokesperson. “We have great respect for the ESA as an organization, but we do not feel the vision of E3 2020 is the right venue for what we are focused on this year.

“We will build upon our global events strategy in 2020 by participating in hundreds of consumer events across the globe. Our focus is on making sure fans feel part of the PlayStation family and have access to play their favorite content. We have a fantastic line up of titles coming to PlayStation 4, and with the upcoming launch of PlayStation 5, we are truly looking forward to a year of celebration with our fans.”

The PlayStation 5 is set to launch in Holiday 2020. Activision Publishing is still partnered with Sony for marketing for Call of Duty, and that marketing deal may continue for PS5, but that is yet to be seen.

comments below