text: let previous = document.querySelector('#pre');
  let play = document.querySelector('#play');
  let next = document.querySelector('#next');
  let title = document.querySelector('#title');
  let recent_volume= document.querySelector('#volume');
  let volume_show = document.querySelector('#volume_show');
  let slider = document.querySelector('#duration_slider');
  let show_duration = document.querySelector('#show_duration');
  let track_image = document.querySelector('#track_image');
  let auto_play = document.querySelector('#auto');
  let present = document.querySelector('#present');
  let total = document.querySelector('#total');
  let artist = document.querySelector('#artist');
  
  
  
  let timer;
  let autoplay = 0;
  
  let index_no = 0;
  let Playing_song = false;
  
  //create a audio Element
  let track = document.createElement('audio');
  
  
  //All songs list
  let All_song = [
     {
       name: "Kyal",
       path: "https://mmmmovie1.files.wordpress.com/2021/06/e18080e180bce1809ae180ba-sheetmusicandchords.mp4",
       img: "https://bbotvaw1.files.wordpress.com/2021/06/kyal.jpg",
       singer: "Artists - Glock, Julia Noe, Tharr Phyoe, Mai Mine, Jacob, Daniel Saw. Van, Zoey, Jenny, Thet Min Oo, Awmyat Thiri, Yung Htet, Flakka, Naung Naung "
     },
        {
       name: "A Lo Ma Shi",
       path: "https://mmmmovie1.files.wordpress.com/2021/06/e180a1e1809ce180ade180afe18099e1809be180bee180ad_alomashi.mp4",
       img: "https://mmmmovie1.files.wordpress.com/2021/06/alomashi.jpg",
       singer: "Artists - Unknow "
     },
     {
       name: "Twe Thit Sar",
       path: "https://mmmmovie1.files.wordpress.com/2021/06/twethitsar.flv_.mp4",
       img: "https://mmmmovie1.files.wordpress.com/2021/06/twethitsar.jpg",
       singer: "htoo eain thin"
     },
     {
       name: "fourth song",
       path: "4.mp3",
       img: "img4.jpg",
       singer: "4"
     },
     {
       name: "fifth song",
       path: "5.mp3",
       img: "img5.jpg",
       singer: "5"
     }
  ];
  
  
  // All functions
  
  
  // function load the track
  function load_track(index_no){
  	clearInterval(timer);
  	reset_slider();
  
  	track.src = All_song[index_no].path;
  	title.innerHTML = All_song[index_no].name;	
  	track_image.src = All_song[index_no].img;
      artist.innerHTML = All_song[index_no].singer;
      track.load();
  
  	timer = setInterval(range_slider ,1000);
  	total.innerHTML = All_song.length;
  	present.innerHTML = index_no + 1;
  }
  
  load_track(index_no);
  
  
  //mute sound function
  function mute_sound(){
  	track.volume = 0;
  	volume.value = 0;
  	volume_show.innerHTML = 0;
  }
  
  
  // checking.. the song is playing or not
   function justplay(){
   	if(Playing_song==false){
   		playsong();
  
   	}else{
   		pausesong();
   	}
   }
  
  
  // reset song slider
   function reset_slider(){
   	slider.value = 0;
   }
  
  // play song
  function playsong(){
    track.play();
    Playing_song = true;
    play.innerHTML = '<img alt="" border="0" width="50" src="https://bbotvaw1.files.wordpress.com/2021/06/stop.png"/>';
  }
  
  //pause song
  function pausesong(){
  	track.pause();
  	Playing_song = false;
  	play.innerHTML = '<img alt="" border="0" width="50" src="https://bbotvaw1.files.wordpress.com/2021/06/play.png"/>';
  }
  
  
  // next song
  function next_song(){
  	if(index_no < All_song.length - 1){
  		index_no += 1;
  		load_track(index_no);
  		playsong();
  	}else{
  		index_no = 0;
  		load_track(index_no);
  		playsong();
  
  	}
  }
  
  
  // previous song
  function previous_song(){
  	if(index_no > 0){
  		index_no -= 1;
  		load_track(index_no);
  		playsong();
  
  	}else{
  		index_no = All_song.length;
  		load_track(index_no);
  		playsong();
  	}
  }
  
  
  // change volume
  function volume_change(){
  	volume_show.innerHTML = recent_volume.value;
  	track.volume = recent_volume.value / 100;
  }
  
  // change slider position 
  function change_duration(){
  	slider_position = track.duration * (slider.value / 100);
  	track.currentTime = slider_position;
  }
  
  // autoplay function
  function autoplay_switch(){
  	if (autoplay==1){
         autoplay = 0;
         auto_play.style.background = "rgba(255,255,255,0.2)";
  	}else{
         autoplay = 1;
         auto_play.style.background = "#148F77";
  	}
  }
  
  
  function range_slider(){
  	let position = 0;
          
          // update slider position
  		if(!isNaN(track.duration)){
  		   position = track.currentTime * (100 / track.duration);
  		   slider.value =  position;
  	      }
  
         
         // function will run when the song is over
         if(track.ended){
         	 play.innerHTML = '<i class="fa fa-play" aria-hidden="true"></i>';
             if(autoplay==1){
  		       index_no += 1;
  		       load_track(index_no);
  		       playsong();
             }
  	    }
       }