bvibber / ogv.js

JavaScript media player using Ogg/Vorbis/Theora/Opus/WebM libs compiled with Emscripten
https://brooke.vibber.net/misc/ogv.js/demo/
Other
1.2k stars 101 forks source link

Already-decoded audio doesn't clear when seeking #458

Open bvibber opened 7 years ago

bvibber commented 7 years ago

Already-decoded audio doesn't seem to clear out when seeking:

Expected results:

Actual results:

rtman commented 3 years ago

@brion I'm seeing this behaviour, on safari and chrome, not firefox. It's slightly different for both, but both have issues when pausing and playing again

rtman commented 3 years ago

@brion here is a repo that reproduces it, https://github.com/rtman/ogv-test. I tried to make a codesandbox but couldn't get ogv to work in that env.

In the repo I'm testing html5 audio vs ogv, in a couple scenarios. SingleInstance where I reuse the player for multiple files and MultiInstance where i set a player for each file.

Are there any options that need set to avoid this behaviour? Or perhaps any workaround?

rtman commented 3 years ago

@brion I just realized this issue is present in your demo on safari.

https://brionv.com/misc/ogv.js/demo/#file=Wolfgang_Amadeus_Mozart_-_Symphony_40_g-moll_-_1._Molto_allegro.ogg&player=wasm-mt&size=original&source=commons-audio

I imagine that you aren't keen on fixing this since this issue was opened in 2017, but if you are that would be amazing. This lib does work well, but these glitches are keeping it from being a real solution imo.

kasperkamperman commented 3 years ago

I came across this as well. Pressing pause and play again, will repeat the previous audio for 1 second.

bvibber commented 3 years ago

No guarantees but I'll keep it in mind for my next maintenance pass -- i think I can make a lot of cleanup in the audio code now that I no longer need a Flash backup path which imposed certain awkwardness. :)

kasperkamperman commented 3 years ago

Thanks! I did a demo that uses OGV.js as fallback when audio/webm; codecs="opus" is not supported. It works perfect, but the repetition makes the UX a bit flawed. https://kasperkamperman.com/dev/ogvfallback/