Open AlphaBeta906 opened 1 year ago
I think I found the potential reason why it didn't work. I am using Safari, however I also use Edge. After some research I found that Safari can't decode .ogg files.
you can use this https://github.com/chris-rudmin/opus-recorder/blob/master/example/decoder.html this works for safai decode .ogg files
I tried to use opus-recorder's decoder.html file but unfortunately it doesn't work. I am considering to use FFmpeg.
@AlphaBeta906 so i found the reason for safari not working. yes ios cann't decode ogg audio files. to solve this you whould have to convert the ogg files to mp3 files. yes i know mp3 is kinda trash but its the only way its gonna work. i am going to make a pull request for it.
True... I have tried to convert all the ogg files to mp3s, however I would like if it would compile to mp3s on build time, or even better use FFmpeg to do it on the web without building to mp3s. I am getting really close to the end result.
well i hope you find your answer
Okay I think I might've gotten really really close to getting it working. FFmpeg uses SharedArrayBuffers, which I gotten an error saying that it doesn't exist. Although caniuse.com and the Mozilla docs say otherwise. When I use it in console it also doesn't work.
Ok I think FFMpeg decoded the ogg, but the problem is that the game broke.
Your demo of Arbox doesn't work, and it spits out
ReferenceError: Can't find variable: require
. This is due to the lack of the cordova module.Might request to use Browserify.Edit: I used Vite and miraculously it works. Will create a pull request.