Removing multiple resets from createResetHandler

I changed uiCoverPlayerFacade to coverUIPlayerFacade instead.

Cover is first, the stuff that happens inside is the manageUI

That’s why I changed the order.

I asked a question here asking about the usage of the camelCase method where abreviations are used because I wasn’t sure.

Order of Functions:

const manageCover = (function makeManageCover() {
const manageUI = (function makeManageUI() {
const videoPlayer = (function makeVideoPlayer() {
const players = (function coverUiPlayerFacade() 
function onYouTubeIframeAPIReady() {

Inside the init function I placed manageCover at the top.

    function init() {
    
            manageCover.init({
            container: ".container",
            playButton: ".thePlay"
        });
    
        manageUI.addExitHandlers(managePlayer.removePlayerHandler);

        manageUI.init({});
    }

Either of these can be used:

const players = (function coverUIPlayerFacade() {
const players = (function uiCoverPlayerFacade() {

Which was explained here to me.

Step 6 https://jsfiddle.net/6pwqLtzj/

Full Code:

 const players = (function coverUIPlayerFacade() {

   function addPlayer(coverSelector, playerOptions) {
     const parent = document.querySelector(coverSelector).parentElement;
     const callback = managePlayer.adder(parent, playerOptions);
     manageCover.addCoverHandler(coverSelector, callback);
   }

   function init() {

     manageCover.init({
       container: ".container",
       playButton: ".thePlay"
     });

     manageUI.addExitHandlers(managePlayer.removePlayerHandler);

     manageUI.init({});
   }

   return {
     add: addPlayer,
     init
   };
 }());

 players.init();

 function onYouTubeIframeAPIReady() {

   players.add(".playa", {});
   players.add(".playb", {});
   players.add(".playc", {});
   players.add(".playd", {});
   players.add(".playe", {
     playerVars: {
       playlist: "0dgNc5S8cLI,mnfmQe8Mv1g,-Xgi_way56U,CHahce95B1g"
     }
   });
   players.add(".playf", {});
   players.add(".playg", {});
   players.add(".playh", {});
   players.add(".playi", {});
 }