Hivenfour / SeamlessLoop

Reproduce seamless/gapless audio loops on HTML5/JavaScript without specific browser Audio APIs
121 stars 16 forks source link

Doesn't work in Safari #8

Open panmona opened 6 years ago

panmona commented 6 years ago

I got this library to work in Chrome but not in Safari. I played around a bit with the play-/stopDelay but the delay was still noticeable in the end.

fluffy-critter commented 6 years ago

In Safari I have the opposite problem, it seems to restart the loop early most of the time.

In my experience Safari is very difficult to work with in terms of the <audio> element and for now I think I'll just continue to use a regular audio with a default of ogg (which works most places nowadays and is gapless), and just not worry about gapless looping on Safari.

panmona commented 6 years ago

Is that so with ogg? Never heard of that.

Btw I solved my problem with this: https://stackoverflow.com/questions/46926033/create-seamless-loop-of-audio-web

fluffy-critter commented 6 years ago

Yeah, ogg supports gapless looping, and works fine in Firefox and Chrome.

I'll look into the Web Audio API, thanks!

panmona commented 6 years ago

Huh okay. I used wav for gapless looping in the Web Audio API. Are ogg files smaller?

fluffy-critter commented 6 years ago

Yes, org files are way, way smaller. They’re about the same compression efficiency as mp3. I don’t know if they work with WebAudio though, but they’re also pretty easy to decode so I bet there’s a pure-JavaScript decoder out there for browsers that don’t support it directly.