U
U
Urbansamurai2016-07-05 22:53:45
JavaScript
Urbansamurai, 2016-07-05 22:53:45

How to implement seamless audio loop playback in html5?

Good!
I surfed all over the Internet, found several fixes like Gapless5 or SeamlessLoop, which work very clumsily.
Tell me please, who faced such problems, and how to implement a normal cross-platform audio loop player?
ps The sounds themselves are perfectly prepared, there are no holes in them.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Mikhail Osher, 2016-07-06
@Urbansamurai

howlerjs (feel free to take the second version, successfully tested in production).
Next, google how to do a smooth loop - I'm sure you can handle it.

X
xmoonlight, 2016-07-06
@xmoonlight

The loop must be repeated at least 4 times in the recorded file.
When the first 3 are played, we move the position to the beginning of the 2nd loop. (1,2,3,2, etc. in a circle)
The timing marks of the beginning of each loop are best sent along with the loop file.
The task is simple: do not let the player stop through seeking-rewind.
No stop! Only:
1. loading the track,
2. seeking to the end (to prevent delayed buffering),
3. ready to play,
4. seeking to the beginning,
5. pause. (that's it, the track is ready to play)
PS: If anyone else knows - I'll listen with pleasure!
Thank you!

R
Rafael™, 2016-07-06
@maxminimus

web audio API

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question