Empty microphone data using Crosswalk in Ionic 2 app

In my Ionic 2 application, I use the WebAudio API to record sound (based on https://github.com/mattdiamond/Recorderjs ). This works with Chrome and after entering the correct permissions in AndroidManifest.xml :

 <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> 

and request access to the microphone through the cordova.plugins.diagnostic plugin, on Android version 6.0.1 (Samsung Galaxy S6).

However, it does not work on Android 4.2.2 (Samsung Galaxy S4), because it does not seem to support getUserMedia , so I decided to install the plugin for the crosswalk:

ionic plugin add cordova-plugin-crosswalk-webview

After that, I see that getUserMedia can be used (via Modernizr check). However, now the sound recorder returns only silence (in both versions of Android). I checked that the permissions are still set correctly. Any idea what could be wrong?

+8
android crosswalk getusermedia crosswalk-runtime
source share
1 answer

In the end, this was due to the (stable) version of the crosswalk that I used; I fixed it using beta:

ionic plugin add cordova-plugin-crosswalk-webview --variable XWALK_VERSION="org.xwalk:xwalk_core_library_beta:21.51.546.7"

Also see: https://crosswalk-project.org/jira/browse/XWALK-7030

+2
source share

All Articles