- This file declares a class,
Player, instantiates it, and assigns it to a globalplayervariable. - The
Playerclass contains four methods:constructor()playPause()skipTo()setVolume()
- The
constructor()method sets initial values for thecurrentlyPlaying,playState,volume, andsoundObjectproperties.currentlyPlayingis set to the first item inalbum.songs.- The initial
playStateis"stopped".
- The
volumeis set to the number80.