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

Update

The Activision Support Team has responded to a post on Reddit detailing the reasoning behind the API changes. This is a temporary measure set in place while an improved API flow is rolled out.

Card

Recent changes to the Call of Duty API have essentially rendered third party statistic tracking sites such as The Tracker Network useless due to the lack of access to player data. Activision’s official Call of Duty Companion App is also affected by these changes and is currently unusable until an update is released.

As of March 1, 2019 – the Call of Duty API requires authentication and enforces a strict rate limit for all requests. Prior to these changes, the API was accessible without authentication and did not have any impractical rate limits.

While the API is not documented for public use, it is exposed via the My Call of Duty website and Call of Duty Companion App. Because of this, the new requirements for its use are unknown to the public.

Developers are now greeted with a “Not permitted” error message upon requesting data from API endpoints which once stood.

The Tracker Network took to Twitter to announce that their site functionality will be entirely diminished until a fix is found.

Through a collaborative effort, The Tracker Network has since implemented a temporary solution. Unfortunately, we cannot disclose the method for all developers to use due to fear of more restrictions being put in place.

The Tracker Network provided CharlieINTEL the following statement…

For years the COD community has continually expressed an interest in having open access to data. We believe giving players the power to improve their game through data benefits the community, and I think the amount of support pouring in is proof that the community agrees. This isn’t new thinking, and we have seen several developers in the past make this a reality. We hope Activision/Treyarch will reach out and support the community, because without their support, we and sites like ours will be forced to shut down.

While the issue may appear to end there, many fans are upset with these events as they feel that player data availability has significantly lessened in recent Call of Duty titles.

At the time of writing, Call of Duty: Black Ops 4 does not feature in-game Leaderboards or Combat Records despite being set to go live “next week”, in October of 2018.

LEADERBOARD PETITION • Treyarch and ATVI, If you want everything in your community to be ponies and rainbows then you’ve lost what brought us all to your game. (Stat Tracker shutdown rant) from r/Blackops4

While certain restrictions are necessary to prevent API abuse, it’s unfortunate to see such a powerful service be placed on lock-down.

The Call of Duty API also allows developers to utilize features such as the Black Ops Authenticity Stamp system in Black Ops 4 Zombies. Treyarch’s Jason Blundell acknowledged this feature’s benefits for third party services at the Black Ops 4 reveal.

Activision has yet to provide an official statement or acknowledgement of this issue.

comments below
Staff Writer at @CharlieINTEL and @FortniteINTEL. Full-Stack Developer.