How to record and play voice in ios6 using HTML5

99封情书 提交于 2019-12-11 09:05:29

问题


We are developing web application in HTML5 and Javascript.

We need to implement voice recording functionality. We have used Wami Api but it is not supporting on iPad as its using flash for recording.

Can you please give idea which is best option for recording voice in iPad in web application ?

Is there any API or library ?

Please suggest..

Thanks


回答1:


You can use Phonegap and make it an app - that way you'll have access to some native APIs, like:

http://docs.phonegap.com/en/2.5.0/cordova_media_media.md.html#Media

var media = new Media();

media.startRecord();

http://docs.phonegap.com/en/2.5.0/cordova_media_media.md.html#media.startRecord




回答2:


The (draft) standard for this is described in the Media Capture and Streams specification, but it is new, experimental and iOS 6 does not support it.

If you want to record sound, then I think you will have to look at native applications rather than web applications.

You can continue to use HTML 5 / JavaScript for your application by using one of the various wrapper APIs that add interfaces to native features on mobile devices. For example, the Media API from Apache Cordova or Titanium's AudioRecorder.



来源:https://stackoverflow.com/questions/15547251/how-to-record-and-play-voice-in-ios6-using-html5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!