rexseeVideoCapture
返回手册目录
【函数】boolean start(String path, String style)
【说明】立即开始录制视频。
【返回】成功返回true,失败返回false。
【参数】path:录制文件的存储路径,以"file://"开头。
style:预览框的样式。
【示例】 事件代码
rexseeVideoCapture.start(rexseeStorage.getRoot()+'videoTest.3gp','window-dim-amount:0;window-moveable:true;window-modeless:true;window-cancelable:false;width:300;height:200;border-width:0px;');
开始录制
rexseeVideoCapture.stop();
if ( confirm('录制完毕。\n是否现在播放?') ) {
rexseeVideoPlayer.start(rexseeStorage.getRoot()+'videoTest.3gp','window-dim-amount:0;window-moveable:true;window-modeless:true;window-cancelable:false;width:300;height:200;border-width:0px;',false);
}
停止录制

【函数】boolean start(String path)
【说明】开始录制。
【返回】成功返回true,失败返回false。
【参数】path:录制文件的存储路径,以"file://"开头。
【示例】 事件代码 开始预览 停止预览
rexseeVideoCapture.start(rexseeStorage.getRoot()+'videoTest.3gp');
开始录制
rexseeVideoCapture.stop();
if ( confirm('录制完毕。\n是否现在播放?') ) {
rexseeCameraPreview.stop();
rexseeVideoPlayer.start(rexseeStorage.getRoot()+'videoTest.3gp','window-dim-amount:0;window-moveable:true;window-modeless:true;window-cancelable:false;width:300;height:200;border-width:0px;',false);
}
停止录制

【函数】boolean stop()
【说明】停止录制。
【返回】成功返回true,失败返回false。
【参数】
【示例】参见start(path,style)和start(path)。

【函数】void setArguments(String argu)
【说明】设置参数表。
【返回】
【参数】 argu:参数表,型如"key=value;key=value;......",可能的参数包括:
  • defaultProfile:是否使用默认配置,highQuality表示使用高质量默认配置,lowQuality表示使用低质量默认配置,否则表示不使用默认配置。注意,一旦使用默认配置,其它参数都将无效。
  • format:输出文件格式。
    • THREE_GPP,默认值
    • MPEG_4
  • maxDuration:最长录制时间,毫秒。
  • maxFileSize:输出文件最大尺寸,字节数。
  • audioSource:音频来源:
    • MIC,默认值
    • CAMCORDER
    • VOICE_CALL
    • VOICE_DOWNLINK
    • VOICE_UPLINK
    • VOICE_RECOGNITION
    • DEFAULT
  • audioEncoder:音频编码方式,目前只支持"AMR_NB"。
  • audioBitRate:音频比特率, bps,请阅读http://www.3gpp.org/ftp/Specs/html-info/26-series.htm了解比特率。
  • audioChannels:1表示单声道,2表示立体声。
  • audioSamplingRate:音频采样率,HZ,请阅读http://www.3gpp.org/ftp/Specs/html-info/26-series.htm了解采样率。
  • videoSource:视频来源,目前只支持"CAMERA"。
  • videoEncoder:视频编码器:
    • H263
    • H264
    • MPEG_4_SP
    • DEFAULT
  • videoBitRate:视频比特率, bps,请阅读http://www.3gpp.org/ftp/Specs/html-info/26-series.htm了解比特率。
  • videoFrameRate:帧速,每秒帧的个数。
  • videoFrameWidth:帧的宽度。
  • videoFrameHeight:帧的高度。
【示例】
rexseeVideoCapture.setArguments('defaultProfile=highQuality;');
rexseeDialog.toast('设置完毕!');
High Quality
rexseeVideoCapture.setArguments('defaultProfile=lowQuality;');
rexseeDialog.toast('设置完毕!');
Low Quality
rexseeVideoCapture.setArguments('format=3GP;videoEncoder=H264;');
rexseeDialog.toast('设置完毕!');
3GP

【函数】JsonObject getArguments()
【说明】读取当前的参数表。
【返回】JSON对象字符串,使用eval('('+json+')')转换为JavaScript对象。
【参数】
【示例】
alert(rexseeVideoCapture.getArguments());
运行示例
返回手册目录