I have a query regarding the play function. How do I trigger the Player.play()
method recursively?
Using this.player.play()
does not seem to be effective.
function Player(playlist){
open:function(){
//performing some actions here
}
play:function(){
if(picture){
//document.getElementById("img").src =playlist[n]
}
}
}
var player = new Player([link1, link2, link3]);
document.getElementById("play-btn").addEventListener("click", player.play())