<audio> rewinds tags

I can successfully embed a sound tag on my sites and play them. Unfortunately, setting currentTime to zero causes an error in every web browser that I am trying to execute.

How to rewind audio clips to the beginning?

+1
source share
1 answer

Your resource must be searchable or an exception will be thrown if you try to set the currentTime attribute. In addition, you only want to set currentTime to the range specified by the seekable attribute. The range starts at startTime and goes into duration.

+1
source

Source: https://habr.com/ru/post/980683/


All Articles