I recently studied web recording. Program Implementation:
Open the recording program on the webpage and upload it to the server automatically after recording. This method is used to implement language announcements, document comments, and other functions.
--- The customer raised this creative demand and had to research it.
There are two technical points to solve:
I. Client recording program development, encoding technology can use ActiveX, DOTNET window control, flash and so on.
Recording methods:
1) there is an ActiveX control in VB, and mmccontrol can easily implement recording.
If VB is not installed, You can Google it and download the OCX control: mci32.ocx. After downloading and registering it: regsvr32/s "mci32.ocx. The control class is named axmmcontrol, which can be found in VB. VB.net, C.
BasicCodeAs follows:
Start recording:
Mmcontrol. Policy = false
Mmcontrol. Wait = true
Mmcontrol. retriable = false
Mmcontrol. devicetype = "waveaudio"
Mmcontrol. filename = "C: \ temp \ test.wav" // test.wav must exist first
Mmcontrol. Command = "open"
Mmcontrol. Command = "record"
Save the file:
Mmcontrol. Command = "stop"
Mmcontrol. Command = "save"
Mmcontrol. Command = "close"
2) After DirectX is installed, you can use directsound API for development.
Http://www.cnblogs.com/qiufa/archive/2006/12/08/585986.html
This method is the simplest and most intuitive API, but considering the need to install more than 50 m DirectX, temporarily give up.
3) directly call the underlying API:
Http://www.cnblogs.com/KeithDan/archive/2006/12/19/596833.aspx
Http://www.codeproject.com/KB/audio-video/cswavrec.aspx? DF = 100 & forumid = 16677 & Exp = 0 & select = 1107344
Http://www.cnblogs.com/sadier/articles/106157.html
II. Upload the recorded file to the server
Implementation Method:
Method 1: directly embed the upload code in the developed control, but the authentication problem must be solved. You can call the Web Service for upload and use the Integrated window identity authentication to directly use the current window Login User identity.
Web service.
Method 2: The recording control only saves the sound file to the local hard disk, and uses JavaScript to combine FSO and XMLHTTP to upload the file. The identity directly uses the logon user identity in IE.
In addition, flash can be used for implementation, which requires support from the media server on the server side. It seems that Flash Media Server is quite expensive.
Refer:
Http://www.nshen.net/blog/article.asp? Id = 509
This articleArticleThe recording code of Flash + Media Server is described in detail. The code is relatively simple.
Study continues...
Have you made any suggestions on similar functions?
Other materials:
The audio and video projects on codeproject:
Http://www.codeproject.com/KB/audio-video/
Open-source web video implementation, using Flash Media Server and. Net:
Http://www.codeproject.com/KB/audio-video/igotmessage.aspx
Vb recorder:
Http://www.cztjb.com.cn/xuesyd/dnxw/recorder.htm
MCI information:
Http://www.devx.com/vb2themax/Tip/18383