FSR170823 | Javascript | Dynamic Music Player

Create Dynamic Music Player

var songs = [
    {
       img: "https://www.rafaelalucas.com/dailyui/9/covers/jain.jpg",
       artistName: "Jain",
       songName: "Makeba",
       song: "https://www.rafaelalucas.com/dailyui/9/songs/song1.mp3",
       color: "#f5c63d"
    },
    {
       img: "https://www.rafaelalucas.com/dailyui/9/covers/ohland.jpg",
       artistName: "Oh Land",
       songName: "Postpone the Bad",
       song: "https://www.rafaelalucas.com/dailyui/9/songs/song2.mp3",
       color: "#afc5c3"
    },
    {
       img: "https://www.rafaelalucas.com/dailyui/9/covers/angele.jpg",
       artistName: "Angèle",
       songName: "La Loi de Murphy",
       song: "https://www.rafaelalucas.com/dailyui/9/songs/song3.mp3",
       color: "#74c2dd"
    },
    {
       img: "https://www.rafaelalucas.com/dailyui/9/covers/broods.jpg",
       artistName: "Broods",
       songName: "Bridges",
       song: "https://www.rafaelalucas.com/dailyui/9/songs/song1.mp3",
       color: "#a3b8b0"
    },
   
 ];
1 Like

https://codepen.io/taran933/pen/WNPQpdj

1 Like

https://codepen.io/shashank_1404/full/zYevwog

1 Like

https://codepen.io/K-Sravanthi/pen/PoVPmb

https://codepen.io/maheshperla/pen/gOqJRdY

Please correct me I’m getting same song for every player because I gave same id for every audio div and calling it,
how to give different id to each audio div ?

using opps concept I can do but without the oops concept I intentionally did this so please correct and clarify my doubt