| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <!DOCTYPE html>
- <html>
- <head lang="en">
- <meta charset="UTF-8">
- <title>FlashWavRecorder demo</title>
- <script type="text/javascript" src="a.js"></script>
- <script type="text/javascript" src="jquery.min.js"></script>
- <script type="text/javascript">
- function init() {
- Recorder.connect("recorderApp", 0);
- Recorder.recorder.configure(8, 100, 0, 1);
- }
- function upload() {
- var fd = new FormData();
- var blob = Recorder.getBlob('audio2');
- fd.append('file', blob);
- $.ajax({
- url : 'http://127.0.0.1:20020/x_organization_assemble_authentication/jaxrs/test',
- data : fd,
- type : 'POST',
- contentType : false,
- processData : false,
- xhrFields : {
- 'withCredentials' : true
- }
- });
- }
- </script>
- </head>
- <body>
- <object type="application/x-shockwave-flash" id="recorderApp"
- name="recorderApp" data="recorder.swf" width="240px" height="240px">
- <param name="flashvars" value="upload_image=images/upload.png">
- </object>
- <button onclick="init()">init</button>
- <button onclick="Recorder.record('audio2', 'audio2.wav');">record
- </button>
- <button onclick="Recorder.stopRecording('audio2');">stop</button>
- <button onclick="Recorder.playBack('audio2');">Play</button>
- <button onclick="upload();">upload</button>
- </body>
- </html>
|