37 lines
949 B
HTML
37 lines
949 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<title>Audio Recording using FlashAudioRecorder</title>
|
|
<script src="https://www.webrtc-experiment.com/MediaStreamRecorder/AudioStreamRecorder/FlashAudioRecorder.js">
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
<h1>
|
|
Audio Recording using <a href="https://github.com/streamproc/MediaStreamRecorder" target="_blank">FlashAudioRecorder</a>
|
|
</h1>
|
|
<script>
|
|
var flashRecorder = new FlashAudioRecorder();
|
|
flashRecorder.dataType = null;
|
|
|
|
flashRecorder.onstart = function(e) {
|
|
console.log('start');
|
|
}
|
|
flashRecorder.onstop = function(e) {
|
|
console.log('stop');
|
|
}
|
|
flashRecorder.ondataavailable = function(e) {
|
|
console.log('blob captured');
|
|
}
|
|
flashRecorder.onready = function(e) {
|
|
console.log('ready');
|
|
}
|
|
flashRecorder.start();
|
|
setTimeout(function() {
|
|
flashRecorder.stop();
|
|
}, 10000);
|
|
</script>
|
|
</body>
|
|
|
|
</html> |