在线视频录制的实现(附源码)
在开发有些互联网领域的产品时,在线视频录制的功能必不可少,下面我们就在red5record开源产品的基础上,修改它来实现吧,在这之前,你可以通过这个地址:http://t.faqee.com/m2/red5rec/index.html?to=123,来首先体验一下,其中123参数可以是任意的,因为这个是代表在线录制视频的文件名!
?
我的开发环境是Flex 4+Eclipse 3.6,下面是完整的源码组成:
?
界面:
?修改你自己的配置在Recorder.as文件中:
package classes{[Bindable] public class Recorder{public var maxLength:int=120;public var fileName:String="video";public var width:int=320;public var height:int=240;public var server:String="rtmp://www.test.com/test";public var fps:int=15;public var microRate:int=22;public var showVolume:Boolean=true;public var recordingText:String="录制中...";public var timeLeftText:String="剩余时间:";public var timeLeft:int;public var mode:String="record";public var hasRecorded:Boolean=false;public var backToRecorder:Boolean=true;public var backText:String="返回";public var cameraDetected:Boolean=false;public function Recorder(){timeLeft = maxLength;mode="record";/*this.maxLength = maxLength;this.fileName = fileName;this.width = width;this.height = height;this.server = server;*/}}}?整个源码的包请在附件中下载!
?