CodenameOne icon indicating copy to clipboard operation
CodenameOne copied to clipboard

Fix audio playback within Simulator.

Open LevittS opened this issue 3 years ago • 2 comments

Spent some time working out why it wouldn't work- this seems to for me.

LevittS avatar Feb 04 '22 23:02 LevittS

Thanks for the pull request. Can you provide a test case that this fixes for you. I seem to recall that using https:// (rather than a custom scheme) solved a lot of issues with webpage loading in CEF. My original implementation used the custom scheme (like you change it to here) but I had to change it because of problems (I don't remember specifics). If you can provide a test case, it will help me work with your pull request to fix it for all cases.

shannah avatar Feb 07 '22 13:02 shannah

I couldn't get any audio to work without changing something - just single createMedia calls followed by play regardless of the source of the InputStream weren't working for me - I was seeing network errors in the CEF browser console (a bit like cn1app wasn't a valid hostname). I'm away from my machine at the moment, and could provide some actual code later, but it was basically the same as the example code I could find.

LevittS avatar Feb 07 '22 13:02 LevittS