【发布时间】:2013-09-11 13:00:09
【问题描述】:
我正在尝试使用要求我拥有 AudioContext 的 RecorderJS 库 (https://github.com/mattdiamond/Recorderjs)。但是,当在脚本的最开始声明 AudioContext 时,页面加载时控制台中出现错误,显示“ReferenceError:AudioContext 未定义”。像其他人一样遇到过这样的 AudioContext 问题吗?我已经发布了我的 JS 的 sn-p 和包含所有内容的 HTML。提前致谢!
JS:
var audioContext = new AudioContext();
var audioInput = null, inputPoint = null, audioRecorder = null;
$(document).ready(function(){
// recording stuff
});
HTML:
<!DOCTYPE html>
<html>
<head>
<title>Recording</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel='stylesheet' type='text/css' href='stylesheet.css'/>
<script src="http://cwilso.github.io/AudioContext-MonkeyPatch/AudioContextMonkeyPatch.js"></script>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script src="recorder.js"></script>
<script src="script.js"></script>
</head>
<body>
<button class="record" type='button'>Record</button>
</body>
</html>
【问题讨论】:
标签: javascript html audio audio-recording webkitaudiocontext