Afficher les sous-titres avec HTML audio

<audio controls class="audio-player">
  <source src="media.mp3" >
  <track label="English" kind="subtitles" srclang="en" src="sample.vtt" default>
</audio>
<div id="subtitle-display"></div>

<script>
  $('.audio-player')[0].textTracks[0].oncuechange = function() {
    var currentCue = this.activeCues[0].text;
    $('#subtitle-display').html(currentCue);
  }
</script>
Zagham Abbas