我目前正在开发一个Ionic 2应用程序项目,该项目允许用户录制自己的声音,停止录制并播放该声音.根据离子原生,我可以看到它们提供了2个插件,即MediaPlugin和MediaCapture.我已经尝试过使用MediaPlugin但是我在启动记录时遇到了问题,停止并播放它.有没有人使用过这个插件?我已经浏览了离子文档和其他一些博客,但我仍然无法做到.我对此非常陌生,非常感谢你的努力.我很感激你的想法.
问候,
这是我在开始录制时从模拟器获得的日志:
I/MPEG4Writer( 401): limits: 2147483647/0 bytes/us, bit rate: 12200 bps and the estimated moov size 3072 bytes
D/Genyd ( 56): Received Set Clipboard
D/Genymotion( 56): Received Set Clipboard
D/dalvikvm( 379): GC_CONCURRENT freed 717K, 13% free 6011K/6864K, paused 0ms+1ms, total 10ms
E/genymotion_audio( 401): get_next_buffer() pcm_read error -1
W/PluginManager( 1116): THREAD WARNING: exec() call to Media.startRecordingAudio blocked the main thread for 10037ms. Plugin should use CordovaInterface.getThreadPool().
E/genymotion_audio( 401): get_next_buffer() pcm_read error -16
E/genymotion_audio( 401): get_next_buffer() pcm_read error -16
E/genymotion_audio( …Run Code Online (Sandbox Code Playgroud)