vendredi 30 mars 2018

Javascript - Scroll container with transcript while the aduio player

I have an audio player that plays an mp3 file and a container underneath that displays a transcript of the text. The audio file is split into 2 channels so there's one speaker on the left of the transcript and one on the right.

As the audio is playing, I'd like to be able to gradually scroll the container in sync with the audio so that the portion that is playing on the audio file is at the top of the transcript container at the time. I'd also like to be able to pause the scrolling as I pause the audio player, or jump to the portion of the transcript as I use the scrubber of the audio player.

In other words, I want the transcript container to stay in sync with the audio without having to manually scroll the container. I'm not sure the best way to go about doing this, but I know I'd like to avoid jQuery if possible.

Thanks, Brennan




Aucun commentaire:

Enregistrer un commentaire