dimanche 23 mai 2021

Audio tag in html showing disabled

I'm trying to make a Music Player with Html, Css and JavaScript. I'm using the <audio> tag in html but it's not working. It's kind of showing disabled. Like this . Here is my Html code :

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="index.css"></link>
    <script src="https://kit.fontawesome.com/dba8b040be.js" crossorigin="anonymous"></script>
  <title>Musica</title>
</head>
<body>
  <section id="title-cont">
    <div id="song-name-cont">
      <p id="song-name-txt">My Oh My</p> 
    </div>
    <div id="artist-name-cont">
      <p id="artist-name-txt">Camila Cabello</p> 
    </div>
  </section>
 <section id="main-cont">
   <div id="album-cover-cont">
     <div id="album-cover"></div>
   </div> 
   <div id="music-controls-cont">
     <div id="rangebar-cont">
    <audio controls autoplay>
        <source src="piano.mp3" type="audio/mp3">
    </audio>
       <input type="range" min="0" max="183" value="0" class="slider" id="myRange">  
     </div>
     <div id="controls-cont">
       <i class="fa fa-pause" id="icon-pause" onclick="musicPause()"></i>  
       <i class="fa fa-play" id="icon-play" onclick="musicPlay()">
       </i>  
     </div>
   </div>
 </section>
 <script src="index.js"></script>
</body>
</html>

I don't seem to understand what the problem is đŸ€”




Aucun commentaire:

Enregistrer un commentaire