I’ve got a problem with Audio Element inside WebView, when running it in Corona App - even though I set current time on it, it always plays audio from the beginning.
I know it sounds sketchy, but here’s the whole story.
I’ve got a module which uses WebView, opens a page where when I press a button, an audio element is created, the audio file is loaded and afterward a current time is set on the audio element [it never plays from the beginning] and plays the audio.
It’s something very simple, nothing fancy. I always use a test app for development and debugging of the module, because it’s much quicker to get there than to go through the whole process that I have inside corona app. Anyway, the module is an AAR file which i can plug anywhere.
When ran from the test app, it works just fine - audio plays from the time that I want it to play.
When I load the same module in my Corona app, after setting the time and starting the playback - it plays from the beginning of the file.
I really went through a lot of testing and checks to make sure it’s the same AAR package, that build settings of the test app and Corona App are same, I ran it on the same tablet, I have debugged the javascript code, it’s all good.
I have had the same behaviour as described, when I ran my app on Android 4.4.1, with WebView 30, which didn’t have support for WebAudio. I test it using Android 6.0.1 and 5.0.1. And as I’ve mentioned, the same package works fine when ran from the test app [where I don’t set anything special, it really is a dummy app, like you would create in Android Studio].
So since I ran out of ideas and I am quite desperate… Maybe there is something special Corona does which will screw up my audio element?