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

In an unexpected move this afternoon, Microsoft and Sony announced a partnership to explore how to apply future cloud based solutions to their respective gaming and content platforms.

Under the memorandum of understanding signed by the parties, the two companies will explore joint development of future cloud solutions in Microsoft Azure to support their respective game and content-streaming services. In addition, the two companies will explore the use of current Microsoft Azure datacenter-based solutions for Sony’s game and content-streaming services. By working together, the companies aim to deliver more enhanced entertainment experiences for their worldwide customers. These efforts will also include building better development platforms for the content creator community.

Microsoft Azure platform has been accelerating its development as Microsoft pushes towards a cloud based future for Xbox consoles, with streaming options and digital options for gaming. Microsoft attempted to do this with the Xbox One initially but was met with backlash.

Sony acknowledges in the statement that the two companies are competitors in the industry but see the benefit in working together to advance interactive content, semi-conductor chips, and AI in the industry and beyond gaming itself.

Statements from the CEO of Sony and CEO of Microsoft were shared as part of the announcement:

“Sony is a creative entertainment company with a solid foundation of technology. We collaborate closely with a multitude of content creators that capture the imagination of people around the world, and through our cutting-edge technology, we provide the tools to bring their dreams and vision to reality,” said Kenichiro Yoshida, president and CEO of Sony. “PlayStation® itself came about through the integration of creativity and technology. Our mission is to seamlessly evolve this platform as one that continues to deliver the best and most immersive entertainment experiences, together with a cloud environment that ensures the best possible experience, anytime, anywhere. For many years, Microsoft has been a key business partner for us, though of course the two companies have also been competing in some areas. I believe that our joint development of future cloud solutions will contribute greatly to the advancement of interactive content. Additionally, I hope that in the areas of semiconductors and AI, leveraging each company’s cutting-edge technology in a mutually complementary way will lead to the creation of new value for society.”

“Sony has always been a leader in both entertainment and technology, and the collaboration we announced today builds on this history of innovation,” said Satya Nadella, CEO of Microsoft. “Our partnership brings the power of Azure and Azure AI to Sony to deliver new gaming and entertainment experiences for customers.

SOURCE: Microsoft

comments below