【函数】 | 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;......",可能的参数包括:
|
【示例】 |
rexseeVideoCapture.setArguments('defaultProfile=highQuality;');
High Quality
rexseeDialog.toast('设置完毕!'); rexseeVideoCapture.setArguments('defaultProfile=lowQuality;');
Low Quality
rexseeDialog.toast('设置完毕!'); rexseeVideoCapture.setArguments('format=3GP;videoEncoder=H264;');
3GP
rexseeDialog.toast('设置完毕!'); |
【函数】 | JsonObject getArguments() |
【说明】 | 读取当前的参数表。 |
【返回】 | JSON对象字符串,使用eval('('+json+')')转换为JavaScript对象。 |
【参数】 | 无 |
【示例】 |
alert(rexseeVideoCapture.getArguments());
运行示例
|