如何在网页录制音频(IOS,安卓,PC / Mac) - 屏幕不闪 [英] How to record audio on webpage (iOS, Android, PC/Mac) - no flash

查看:485
本文介绍了如何在网页录制音频(IOS,安卓,PC / Mac) - 屏幕不闪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个要求,允许用户使用他们的麦克风录制的音频文件,但它不使用闪光灯的工作,因为它需要工作在iOS(移动Safari浏览器),Android浏览器或Chrome,以及现代化的浏览器上的PC / Mac的。

I have a requirement to allow a user to record an audio file using their microphone, but it has to work without flash as it needs to work on iOS (mobile safari), Android browser or Chrome, and a modern browser on a PC/Mac.

有一个清洁,简单的HTML5方法录制音频和张贴到服务器?我一直没能找到任何东西。

Is there a clean, simple HTML5 method for recording audio and posting to a server? I haven't been able to find anything.

推荐答案

您可以使用HTML5 WebAudio API

You can use the HTML5 WebAudio API.

这是介绍了音频和视频采集捕捉音频和放大器;在HTML5

An introduction to audio and video capturing Capture audio & video in HTML5

一个好的库录制音频样本 Recorder.js

A good library to record audio with samples Recorder.js

使用Recorder.js <一个完整和工作样本href="http://$c$cartists.com/post/36746402258/how-to-record-audio-in-chrome-with-native-html5-apis">How在Chrome浏览器与录音本地HTML5 API的

A complete and working sample using Recorder.js How to record audio in Chrome with native HTML5 APIs

其他WebAudio API演示 HTML5网络音频API演示和库

Other WebAudio API demos HTML5 Web Audio API Demos and Libraries

支持的浏览器我可以使用Web音频API?

对于将数据发送到其他服务器,使用Recorder.js就可以得到音频缓冲,那么你可以使用XMLHtt prequest直接或EN codeD作为后的arraybuffer或BLOB到目标服务器BASE64。

Regarding to send the data to other server, using Recorder.js you can get the audio buffer, then you could use XMLHttpRequest to POST the arraybuffer or blob to the destination server directly or encoded as base64.

MDN:<一href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHtt$p$pquest/Sending_and_Receiving_Binary_Data">Sending和接收二进制数据

HTML5ROCKS:新把戏插件XMLHtt prequest2,发送数据

Html5Rocks: New trick ins XMLHttpRequest2, sending data

这篇关于如何在网页录制音频(IOS,安卓,PC / Mac) - 屏幕不闪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆