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

Treyarch has, finally, announced the planned release date for League Play in Call of Duty: Black Ops 4. 

League Play, the ranked playlist for players who want a more competitive experience, will be available in Call of Duty: Black Ops 4 starting February 21, first on PlayStation 4. 

As we mentioned in our recent League Play blog, the World League Hub and League Play are coming to Black Ops 4 as part of next week’s new Operation on PS4, and League Play kicks off later in the week with our first League Play Event starting on Thursday, Feb. 21.

We can’t wait to see how the competitive meta evolves with the gameplay tuning changes listed above. Remember, the Pro Series Playlist is your chance to test out new loadouts based on the latest tuning changes and CWL rules, to make sure you’re ready to hit the ground running when League Play launches. Let’s do this.

Extended details on the League Play were announced in a blog post back in the end of January by Treyarch. The World League Hub also debuts in Black Ops 4 with League Play, which allows players to check out streams of the CWL events and more info about CWL directly in-game. The League Hub will be its on separate mode, alongside MP, Blackout, and Zombies in Black Ops 4. 

Treyarch first announced League Play was set to launch in December, but then was delayed to January end. Since then, Treyarch stated they were actively making changes to the mode based on what they were hearing from our feedback and pushed it to February. The mode will feature ranked matches all week long.

Here’s the basics on how League Play will work in Black Ops 4:

  • Over the course of your competitive career, you’ll advance a permanent rank that reflects your performance across all events. Performing better in events and participating more often will result in faster rank progression.
  • Final placement in ladders determines how you advance your overall rank, giving ladder events a competitive tournament feel with the most credit given for reaching 1st Place and winning a League Play event.
  • Place 1st in a League Play event, and your rank will be upgraded to permanently reflect your victory. Further upgrades are possible for multiple 1st Place finishes over time, and a streak indicator that is displayed when you place 1st in back-to-back events. 
  • Matchmaking in the World League Hub will always be prioritized by skill, so competitors will always feel competitive at their skill level.

SOURCE: Treyarch 

comments below