I would like to capture sound from a browser and send it to a server.
I decided to use red5
for the reasons listed on this interesting page that claims to do exactly what I need.
It requires the following:
- A running red5 server
- A flash object that can capture the microphone input
- A JavaScript controller
I tried to implement this example localy (I pretty much simply copied all the files). At page load from my server console I can see that the supplied flash object audioRecorder1.swf
creates a connection.
[INFO] [NioProcessor-1] org.red5.server.net.rtmp.codec.RTMPProtocolDecoder - Action connect [INFO] [NioProcessor-1] org.red5.server.net.rtmp.RTMPHandler - Connecting to: [WebScope@4799a84f Depth = 1, Path = '/default', Name = 'oflaDemo']
But when I hit any button (record/play/stop) of the controller, I'm having this javascript error from which I can't figure out the origin
thisMovie("denRecorder").jsRecord is not a function
denRecorder
is the id of the flash object in the page (created with the swfobject.js
library)
<object width="1" height="1" type="application/x-shockwave-flash" id="denRecorder" name="denRecorder" data="/static/flash/audioRecorder.swf">
<param name="menu" value="false">
<param name="flashvars" value="myServer=rtmp://localhost/oflaDemo&mySound=snd_881881开发者_JAVA百科60112&myDuration=0">
</object>
I have created a package that can be tested localy.
Do you have any idea of what is my problem ?
edit
OS: Ubuntu, Browser: Chromium & Firefox
I started a project (OSS) with someone which will help us for this question
精彩评论