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

Sensor Tower, a mobile data analytical firm, has released their latest report looking at the stats of Call of Duty: Mobile, which launched on October 1, 2019.

Sensor Tower has revealed that Call of Duty: Mobile has reached over 148 million downloads across both Apple App Store and Google Play Store in its firth month, making it the most successful mobile title to release recently, beating out the mobile versions of Fortnite and PUBG’s first month numbers.

Call of Duty: Mobile delivered an incredibly strong first month performance, amassing an estimated 148 million downloads, according to Sensor Tower Store Intelligence estimates. This makes the Tencent-developed shooter based on Activision’s blockbuster property the second most successful mobile game launch of all time in terms of first-month downloads, stripping the also recently released Mario Kart Tour of its short-lived time in the No. 2 position.

Sensor Tower also has revealed that the Call of Duty: Mobile has generated $53.1 million in revenue in its first month, nearly doubling the Fortnite’s mobile revenue’s first month. The US is the highest spending revenue for Call of Duty: Mobile.

In terms of revenue, Call of Duty: Mobile grossed $53.9 million, reaching a single-day high of $3.1 million spent by players on October 5. The United States was again the leader in this metric, with $22.8 million, or 16 percent of the total, spent within the first month; Japan came in second with $7 million, or 4 percent.

Call of Duty: Mobile is free to play on iOS and Android and available worldwide.

SOURCE: Sensor Tower

comments below