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

Senator Josh Hawley (R-MO) has announced that he is introducing a bill to the Senate floor that will ban loot boxes and pay to win microtransaction in video games that are “played by minors.” This bill targets games that are played by those under 18.

The bill is called “The Protecting Children from Abusive Games Act.”

“When a game is designed for kids, game developers shouldn’t be allowed to monetize addiction,” Hawley said. “And when kids play games designed for adults, they should be walled off from compulsive microtransactions. Game developers who knowingly exploit children should face legal consequences.”

The main goals of this bill are as follows, per Senator Hawley’s release:

  • Games targeted at those under the age of 18.
    • This would be determined by subject matter, visual content, and other indicators similar to those used to determine applicability of the Children’s Online Privacy Protection Act (COPPA)
  • Games with wider audiences whose developers knowingly allow minor players to engage in microtransactions

Call of Duty is rated Mature game meant for players 17 years or older in US, but this bill is broad to target against games that have “pay to win” style microtransactions. Activision’s Call of Duty could be affected, but there’s no indication for that as of now.

This ban would affect other games across the industry like Blizzard’s Overwatch, EA titles like FIFA, Apex, and even some ways Fortnite’s Save the World mode.

In a press release, Senator Hawley gave an example of Candy Crush’s microtransactions, a game owned by Activision Blizzard.

Social media and video games prey on user addiction, siphoning our kids’ attention from the real world and extracting profits from fostering compulsive habits,” Hawley said. “No matter this business model’s advantages to the tech industry, one thing is clear: there is no excuse for exploiting children through such practices.”

Loot boxes and microtransactions has been a big issue in the video game industry the last several years as more developers have implemented such systems in their games. The major shift in public opinion on loot boxes started after EA’s Star Wars Battlefront II controversy with the title having immense pay to win features across the board.

The Entertainment Software Association sent us the following statement in regards to the US Senator’s new bill:

“Numerous countries, including Ireland, Germany, Sweden, Denmark, Australia, New Zealand, and the United Kingdom, determined that loot boxes do not constitute gambling. We look forward to sharing with the senator the tools and information the industry already provides that keeps the control of in-game spending in parents’ hands. Parents already have the ability to limit or prohibit in-game purchases with easy to use parental controls.” – Stanley Pierre-Louis, Acting President and CEO, Entertainment Software Association

The ESA has been siding with publishers on this since the start of the controversy stating that parents should have additional information to make the decisions for what games their kids play versus changing the industry itself to have the US government intervene. Many people are hesitant to allow the government to regulate it, as it could lead to drastic changes for the industry.

The FTC even opened an investigation into loot boxes and plans to host a hearing in August with community members, developers, and more to discuss the loot box issues and ways to move forward.

Activision has not issued a statement regarding this bill at this time.

SOURCE: Verge / Senator Hawley

comments below