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

Guide to all 15 Multiplayer Dark Ops challenges and Calling Card images in Call of Duty: Black Ops 4

Ever since their addition in Call of Duty: Modern Warfare 2, Calling Cards have been the best way to show off your skills online. With the added layer of Dark Ops challenges in Black Ops 3, Calling Cards have become flashier, cooler, and harder to get.

To help you on your quest to be the best, we have assembled a list of all 15 Black Ops 4 Multiplayer Dark Ops challenges that will reward you with the games most prestigious Calling Cards.

OBTAINED – Earn the Dark Matter camo. To do this, you have to earn all camos on all guns, requiring you to have both the Gold and Diamond camos first.

RELENTLESS KILLER – Earn 10 Relentless medals. This medal requires you to go on a 20 killstreak excluding scorestreak kills.

BRUTAL KILLER – 25 killstreak excluding scorestreak kills.

NUCLEAR KILLER – 30 killstreak excluding scorestreak kills.

FRENZY KILLER – 5 rapid kills excluding scorestreak kills.

MEGA KILLER – 6 rapid kills excluding scorestreak kills.

ULTRA KILLER – 7 rapid kills excluding scorestreak kills.

CHAIN KILLER – 7+ rapid kills excluding scorestreak kills.

NUKED OUT – 30 killstreak in Free For All

GEMMED OUT – Activate the highest tier of Dark Matter Camo (Nuclear Medal – 30 killstreak) with every Primary Weapon.

FROM THE DEPTHS – 25 kills against enemies that are on land when you are shooting at them from underwater with a primary or secondary weapon.

SHRUG IT OFF – Survive a direct hit from an enemy RC-XD and kill the enemy who was driving it in the same life.

COPYCAT – Get 10 shutdown medals against enemies using Annihilator with an Annihilator or the Mozu.

FIRE WITH FIRE – Kill an enemy that is using the purifier with a Molotov.

GET IT OUTTA HERE – Get a shutdown medal by killing an enemy that has activated Grav Slam while they are still in the air after using the Grapple Gun.


Thanks to Reddit user “553ML” for these pictures.

Have you got all these yet? Which ones are you still working on? Let us know in the comments down below!

comments below