Remove manageCover from the managePlayer code

Good one. It looks like we are ready for step 2. As a reminder, here are the steps that were initially conceived.

Step 1: Change needed private functions to be public
Step 2: MoveCopy unsuitable functions to onYouTubeIframeAPIReady
Step 3: Rename managePlayer.add to use the addPlayer function in onYouTubeIframeAPIReady
Step 4: Move parts of the functions back in to manageCover and managePlayer
Step 5: Rename addPlayer in onYouTubeIframeAPIReady back to managePlayer.add
Step 6: Change public functions that no longer need to be public back to private
Step 7: Remove as much of the onYouTubeIframeAPIReady functions as we can

Step 2: Copy unsuitable functions to onYouTubeIframeAPIReady

This is where the createCoverClickHandler and addPlayer functions are copied out of managePlayer and pasted into the start of the onYouTubeIframeAPIReady function.

Those functions will later on be removed from the managePlayer code, but that will be after we’ve completed step 3. For now, it is just copying out the createCoverClickHandler and addPlayer functions into the start of the onYouTubeIframeAPIReady function.

1 Like