// 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 announced – during the BO3Fridays live stream – a badge of honor reward for players that have played Call of Duty: Black Ops 2, Call of Duty: Ghosts, or Call of Duty: Advanced Warfare to get a reward in-game in Call of Duty: Black Ops 3 at launch.

  • If you reach Level 10+ in any of those games, you will get a Calling Card in Black Ops 3.
  • If you reach level 31+ in any of those games, you will get the Calling Card, as well as a set of reticles for use in Call of Duty: Black Ops 3.
  • If you prestige once in any of those games, you will get the Calling Card, reticles, as well as an exclusive weapon camo for use in Call of Duty: Black Ops 3.
  • Players need to make sure their account [PlayStation Network, Xbox Live, or Steam] is linked to their CallofDuty.com account. These rewards are available only on PlayStation 4, Xbox One, and PC.

    If you played Call of Duty: Black Ops 2, Call of Duty: Ghosts, or Call of Duty: Advanced Warfare on a different platform than what you plan on playing Call of Duty: Black Ops 3 on, you will still get these rewards, as along as all of your console/PC accounts are linked to the same Call of Duty Account. In addition, it doesn’t matter which game you reach those levels in – as long as you did so in one of them, you’ll get rewarded. You have until November 5th at 9PM PDT to reach those levels and to make sure your Call of Duty account is linked with either your PSN, Xbox Live, or Steam account.

    Q: What if I played Call of Duty: Black Ops II, Call of Duty: Ghosts, or Call of Duty: Advanced Warfare on one platform, but will play Call of Duty: Black Ops III on a different platform?

    A: The loyalty in-game items will be available to you as long as all Sony, Microsoft, or Steam accounts are linked to the same Call of Duty account.

    Q: What if I reached level 15 in Call of Duty: Black Ops II, level 25 in Call of Duty: Ghosts, and prestiged in Call of Duty: Advanced Warfare?

    A: We will choose the game where you have progressed the furthest and base your loyalty rewards off of that game. In this specific case, you would receive the calling card, set of reticles, and weapon camo because you have prestiged in Call of Duty: Advanced Warfare. Your Sony, Microsoft and Steam accounts must be linked to the same Call of Duty account to receive the in-game loyalty items in Call of Duty: Black Ops III.

    Disclaimer:

    Players must reach target levels in Call of Duty: Black Ops 2, Call of Duty: Ghosts, or Call of Duty: Advanced Warfare by 9:00PM PDT on 11/5/15 on PlayStation 4, PlayStation 3, Xbox One, Xbox 360, or PC. Players must link all their console or Steam accounts to one Call of Duty account by 9:00PM PDT on 11/5/15. Loyalty rewards are only available in Call of Duty: Black Ops 3 on PlayStation 4, Xbox One, and PC. Loyalty rewards are not available on PlayStation 3 or Xbox 360. Players must have a copy of Call of Duty: Black Ops 3 to receive the Loyalty rewards. Program may vary by region. Loyalty program subject to change.

    Read the full FAQ about this program HERE.

    comments below