1***@qq.com
1***@qq.com
  • 发布:2016-12-27 18:36
  • 更新:2016-12-27 18:36
  • 阅读:1253

调用摄像头分辨率选项根本不好用啊

分类:HTML5+
var cmr = plus.camera.getCamera();  
                                var res = cmr.supportedVideoResolutions[0];  
                                var fmt = cmr.supportedVideoFormats[0];  
                                alert(res);  
                                console.log("Resolution: "+res+", Format: "+fmt);  
                                cmr.startVideoCapture( function( p ){  
                                        alert( "Capture video success: " + p);    

                                        plus.io.resolveLocalFileSystemURL(p, function(entry) {  
                                            videoPath = entry.fullPath;  
                                            var vedioPrompt = document.getElementById('vedioPrompt');  
                                            vedioPrompt.innerHTML = "<p style='padding-left: 15px;'>取得一个视频文件,如果想替换现选择视频,请点击选择视频按钮进行重选!</p>"  
                                        }, function(e) {  
                                            //outLine("读取录像文件错误:" + e.message);  
                                            alert("失败");  
                                        });  

                                    },  
                                    function( error ) {  
                                        alert( "Capture video failed: " + error.message );  
                                    },  
                                    {resolution:res,format:fmt}  
                                );
2016-12-27 18:36 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复