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

Sledgehammer Games and Activision have today announced new micro items are now available for Call of Duty: Advanced Warfare players on both Xbox One and Xbox 360. The new items available include World Flag Exo Packs, Standard Personalization Packs, Premium Personalization Packs, and Premium Exo Custom Packs.

These new items are available now fur purchase on Xbox One and Xbox 360 (visit the in-game store or the console store to purchase):

World Flag Exo Packs ($1.99 each):

  • Australia Exoskeleton Pack – Show your patriotism with the Australia exoskeleton skin and matching helmet. Your country needs you!
  • France Exoskeleton Pack – Show your patriotism with the France exoskeleton skin and matching helmet. Your country needs you!
  • Italy Exoskeleton Pack – Show your patriotism with the Italy exoskeleton skin and matching helmet. Your country needs you!
  • Japan Exoskeleton Pack – Show your patriotism with the Japan exoskeleton skin and matching helmet. Your country needs you!
  • Germany Exoskeleton Pack – Show your patriotism with the Germany exoskeleton skin and matching helmet. Your country needs you!
  • Spain Exoskeleton Pack – Show your patriotism with the Spain exoskeleton skin and matching helmet. Your country needs you!
  • Netherlands Exo Pack – Show your patriotism with the Netherlands exoskeleton skin and matching helmet. Your country needs you!
  • United Kingdom Exoskeleton Pack – Show your patriotism with the United Kingdom exoskeleton skin and matching helmet. Your country needs you!
  • United States Exoskeleton Pack – Show your patriotism with the American exoskeleton skin and matching helmet. Your country needs you!
  • Canada Exoskeleton Pack – Show your patriotism with the Canada exoskeleton skin and matching helmet. Your country needs you!

 

Standard Personalization Packs ($1.99 each):

  • Creature Personalization Pack – Unleash your predatory rage with the Creature Personalization Pack. Hunt down the competition with a menacing reptilian skin camo, three monster reticles, a calling card, and an emblem layer.
  • Lighting Personalization Pack – Wield the power of the gods with the Lightning Personalization Pack. Charge into battle with a Zeus-approved camo, three god-like reticles, a calling card, and an emblem layer to strike down your opponents.
  • Magma Personalization Pack – Erupt in any match with the liquid-hot Magma Personalization Pack, powered by a lava-inspired weapon camo, three fiery reticles, a calling card, and an emblem layer.
  • Nanotech Personalization Pack – Smaller is better with the Nanotech Personalization Pack. Power up with a sub-atomic suit camo, three high-tech reticles, a calling card, and an emblem layer.

 

Premium Exo Custom Packs ($2.99 each):

  • Barong Exoskeleton Pack – Unleash the lion within using the Barong exoskeleton Pack. Protect your throne as the king of any match in your demon-banishing exoskeleton and guardian helmet.
  • Panda Exoskeleton Pack – It’s a jungle out there. Go wild with the Panda exoskeleton Pack, complete with animalistic exoskeleton and bear-themed helmet.
  • Steampunk Exoskeleton Pack – Blast through any match with the Steampunk exoskeleton Pack. Includes a pseudo-Victorian exoskeleton and a future-retro helmet.
  • Hot Rod Exoskeleton Pack – Turbocharge your exoskeleton with the Hot Rod exoskeleton Pack. Raise hell in your tricked-out exoskeleton and your outlaw helmet.

 

Premium Personalization Packs ($3.99 each):

  • Creature Premium Personalization Pack – Unleash your predatory rage with the Creature Premium Personalization Pack. Hunt down the competition with a menacing reptilian skin camo, three monster reticles, a calling card, and an emblem layer. Plus a ferocious exoskeleton and matching helmet Do not purchase if you own the Creature Personalization Pack
  • Lighting Premium Personalization Pack – Wield the power of the gods with the Lightning Premium Personalization Pack. Charge into battle with a Zeus-approved camo, three god-like reticles, a calling card, and an emblem layer. Plus a thunderous exoskeleton and matching helmet Do not purchase if you own the Lightning Personalization Pack
  • Nanotech Premium Personalization Pack – Smaller is better with the Nanotech Premium Personalization Pack. Power up with a sub-atomic suit camo, three high-tech reticles, a calling card, and an emblem layer. Plus a nanoparticle exoskeleton and matching helmet Do not purchase if you own the Nanotech Personalization Pack.
  • Magma Premium Personalization Pack – Erupt in any match with the liquid-hot Magma Premium Personalization Pack, powered by a lava-inspired weapon camo, three fiery reticles, a calling card, and an emblem layer. Plus a volcanic exoskeleton and matching helmet Do not purchase if you own the Magma Personalization Pack.

All of the items listed above are now available on Xbox One and Xbox 360; the items are coming soon to PlayStation and PC. Stay tuned.

comments below