Open giorgiobeggiora opened 5 years ago
Try to have a setTimeOut before you call the window.resolveLocalFileSystemURL.
Because there is a short delay on creating the physical file so when you trying to locate the file, it is not yet created.
of course that's a possible solution, but I think it's a plugin's job wait for the file creation, and then fire the callback: it should not be a developer's implementation. At least, please write about the delay in the documentation!
Yes, I agree @giorgiobeggoria, it is something that would be handled by the plugin. Please send a PR with your fix and I'll merge it.
the problem is that I don't know Java nor any other native language... well, it's time to learn them :)
The file is not available in the stop() callback, so you need to check if the file exists using a loop that interrupts when the file become available.
Note that if you're using always the same file name you need to always delete the file before to run start() again, otherwise you will use the previous audio file.