3 Player.prototype.play = function(song) {
4 this.currentlyPlayingSong = song;
8 Player.prototype.pause = function() {
9 this.isPlaying = false;
12 Player.prototype.resume = function() {
14 throw new Error("song is already playing");
17 this.isPlaying = true;
20 Player.prototype.makeFavorite = function() {
21 this.currentlyPlayingSong.persistFavoriteStatus(true);