使用input:file, 指定capture属性调用默许相机,摄像,录音功能
图片
<input type="file" accept="image/*" capture="camera">
视频
<input type="file" accept="video/*" capture="camcorder">
录音
<input type="file" accept="audio/*" capture="microphone">
注:苹果手机录音不支持,还是打开视频音频。
参考
http://www.myexception.cn/web/1947138.html