SpeedList in custom audio player

Hi
Just first speed is working
and the other tracks works with first icon’s speed list!
You know how to fix it to work each speedList for each track!?

html

<select id="speedlist">
      <option value="1"></option>
      <option value="0.5">0.5</option>
      <option value="1.5">1.5</option>
      <option value="2">2</option>
    </select>  

css

.audio-player #speedlist {
  position: relative;
  display: flex;
  left: 1.5rem;
  top: 0.1rem;
  outline: none !important;
  border: none !important;
  background-image: url("icon/speed.png");
  background-size: 100%;
  background-repeat: no-repeat;
  width: 3px;
  -webkit-appearance: none;
  appearance: auto;
}

JS

  const speedlist = document.getElementById("speedlist");
  speedlist.addEventListener("change",changeSpeed);

  function changeSpeed(event){
  audio.playbackRate = event.target.value;
   
 }

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.