- This file declares a class,
Player
, instantiates it, and assigns it to a globalplayer
variable. - The
Player
class contains four methods:constructor()
playPause()
skipTo()
setVolume()
- The
constructor()
method sets initial values for thecurrentlyPlaying
,playState
,volume
, andsoundObject
properties.currentlyPlaying
is set to the first item inalbum.songs
.- The initial
playState
is"stopped"
.
- The
volume
is set to the number80
.