()
| 37 | } |
| 38 | |
| 39 | function displayInfo(){ |
| 40 | songTitleElement.innerText = song.title; |
| 41 | songArtistElement.innerText = song.artist; |
| 42 | let link = changeBitrate(); |
| 43 | if(playerElement.getAttribute('src') != link){ |
| 44 | playerElement.pause(); |
| 45 | playerElement.setAttribute('src', link); |
| 46 | playerElement.load(); |
| 47 | playerElement.play(); |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | function changeBitrate(){ |
| 52 | switch(selectBitrateElement.value){ |
no test coverage detected