用java api使用wami录音机需要wich文件。我有它与Flash版本包含 index.html作为跟随用java java wami recoreder
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<!-- swfobject is a commonly used library to embed Flash content -->
<script type="text/javascript"
src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<!-- Setup the recorder interface -->
<script type="text/javascript" src="recorder.js"></script>
<script>
function setup() {
Wami.setup("wami");
}
function record() {
status("Recording...");
Wami.startRecording('http://localhost/audiorecording/test.php?name=demo.mp3');
}
function play() {
Wami.startPlaying("http://localhost/audiorecording/demo.mp3");
alert("It's start playing");
}
function stop() {
status("");
Wami.stopRecording();
alert("stop");
Wami.stopPlaying();
}
function status(msg) {
document.getElementById('status').innerHTML = msg;
}
</script>
</head>
<body onload="setup()">
<input type="button" value="Record" onclick="record()"></input>
<input type="button" value="Stop" onclick="stop()"></input>
<input type="button" value="Play" onclick="play()"></input>
<div id="status"></div>
<div id="wami"></div>
</body>
</html>
和一个PHP文件作为
<?php
parse_str($_SERVER['QUERY_STRING'], $params);
$name = isset($params['name']) ? $params['name'] : 'output.wav';
$content = file_get_contents('php://input');
$fh = fopen($name, 'w') or die("can't open file");
fwrite($fh, $content);
fclose($fh);
?>
swfobject.js可在网上 ,另一个recoder.js和GUI。 JS可在网上
https://wami-recorder.googlecode.com/hg/example/client/index.html
上面的东西是通过使用闪存做,但它不干活g在所有电脑上点击按钮我有错误,因为各自的功能不可用,并且 未定义Wami Wami.setup(“wami”); plz帮我走出去,或者我看到了wami的官方网站,他们在那里指定2008年的Java发布版本,但是我无法找到如何使用它,如果你有任何关于它的想法,那么PLZ回复.... ...
为什么标记jQuery? – 2012-05-04 05:15:56
recorder.js仅包含jquery –
http://code.google.com/p/wami-recorder/source/browse/example/client/recorder.js?r=d7925a46e24dd594ab07cb7c3f7364b2d8fd9acd - 没有看到任何对jQuery的引用 –