Update '12/player2.js'

master
murtaugh 4 years ago
parent 69e7e0d2dd
commit c64792309c

@ -1,4 +1,4 @@
function player(element){
function player(element,iframe){
var track = element.querySelector("track");
track.addEventListener('cuechange', function () {
let cues = track.track.activeCues; // array of current cues
@ -12,6 +12,11 @@ function player(element){
var playing = document.getElementById(d.title);
playing.classList.add("now_playing");
console.log("playing",playing);
if (iframe&&d.artist) {
iframe.src = d.artist;
}
});
}
Loading…
Cancel
Save