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

As stated by Treyarch in their Reddit update earlier this week, Contracts are returning in Call of Duty: Black Ops 4, and today in a blog post the studio has showcased how Contracts will work in game in Call of Duty: Black Ops 4.

Contracts will be available on Tuesday, June 25 on all platforms in a new patch update for the game, that will also bring Hacienda Twilight to Black Ops 4.

Treyarch stated that they are working to add more ways to unlock contact in-game and Contracts are a step towards achieving that.

Here’s the full details on Contracts, directly Treyarch:

Contracts Arrive in Black Ops 4 on June 25th

Starting next week on all platforms, we’re launching Contracts in Call of Duty®: Black Ops 4 to give players new ways to earn in-game rewards through rotating daily challenges. We’ve heard the community’s requests for more rewards through gameplay in all modes, and we’re expanding Contracts to provide new benefits for playing Multiplayer, Blackout, Zombies, and World League.

Here’s everything you need to know about the new Contracts system coming to Black Ops 4:

  • Earn More Rewards in All Modes: Contracts will be available in Multiplayer, Blackout, Zombies, and World League, each with their own unique challenges to complete. Players will be able to jump from mode to mode to complete Contracts in any order they like.
  • Daily and Active Contracts:  Players will have a global Daily Contract and six additional Contracts to choose from in each of the four modes, for up to 28 Contracts available to complete at any given time. Up to three Contracts can be active at once, including two player-selected Contracts and one Daily Contract for each game mode.
  • Contract Availability:
    • Daily Contracts will refresh every 24 hours. Players must complete their Daily Contract in each mode before the refresh, when a new Daily Contract will take its place.
    • Activated Contracts will refresh at a regular interval, and any of these Contracts can be swapped out for another while retaining progress made until the Contract pool refreshes. Currently activated Contracts will never expire, and progress made toward inactive Contracts will be lost when the pool refreshes.
  • Standard vs. Hard Contracts: Players will be able to activate two types of Contracts aside from the Daily Contract in each game mode. Standard Contracts will provide a moderate challenge that can be completed fairly quickly, while Hard Contracts will put your skills to the test with more rewards to earn for completion. Here’s an example of a Hard Contract in Blackout:
  • Contract Earnings: Rewards from completing a Contract can include:
    • Reserve Cases (one or more, based on the challenge required)
    • Bonus XP in Multiplayer, Zombies, and World League
    • Bonus Nebulium Plasma in Zombies
    • Bonus Merits in Blackout
  • Reserve Earn Rate and Daily Tier Skips: On top of the new Contracts system, players will continue to earn Reserve Cases at a constant rate through gameplay. Players will also continue to earn Daily Tier Skips, which will still be awarded for the first win in Multiplayer or League Play, first Merit earned in Blackout, or for reaching round 15 in Classic Zombies.
  • Zombies Rewards: Daily Contracts will replace Daily Callings in Zombies, giving players new ways to earn Reserves, Zombies XP, and Nebulium Plasma in addition to the mode’s extra Daily Tier Skip. The second Daily Tier Skip in Zombies will now be awarded when the Zombies Daily Contract is completed.

With up to 28 Contracts to complete at any given time and new opportunities to unlock Reserves through gameplay in all modes, players will have more ways to earn in-game rewards than ever just by playing the game – the more you play, the more you earn.

Unlock More New Weapons

In addition to Contracts, we’re making changes to how new Weapon Bribes will work in the future. In an upcoming update, we’ll introduce the new Ultra Weapon Bribe that will first reward a Black Market weapon that you don’t own. Once you own any variant (base version, MKII, etc.) of all Black Market weapons in the game, Ultra Weapon Bribes will then reward a MKII Weapon, Mastercraft, or other variant that you haven’t unlocked yet.

Standard Weapon Bribes will continue to work as they currently do, and all types of Weapon Bribes will remain duplicate-protected until the player already owns every Black Market weapon, MKII Weapon, and Mastercraft in the game.

We’re planning to introduce a new special event later in Operation Spectre Rising which will include an earnable Ultra Weapon Bribe through Contraband, and players can expect to earn additional Ultra Weapon Bribes in the future to add more Black Market weapons to their collection.

SOURCE: Treyarch

comments below