张三丰
张三丰
  • 发布:2015-07-20 16:00
  • 更新:2015-07-20 17:46
  • 阅读:1786

iPhone6 调用摄像头录像 分辨率超级低

分类:HTML5+
function getVideo() {  
    //outSet( "开始录像:" );  
    var cmr = plus.camera.getCamera();  
    cmr.startVideoCapture( function ( path ) {  
        //outLine( "成功:" path );  
        plus.io.resolveLocalFileSystemURL( path, function( entry) {  
            appendVideo( entry );  
        }, function( e ) {  
            //outLine( "读取录像文件错误:" e.message );  
        } );  
    }, function( e ){  
        //outLine( "失败:" e.message );  
    }, {filename:"_doc/video/",index:1} );  
}

使用demo录像成功,但是调用摄像头的分辨率好低啊,为什么你们都说分辨率高。。。。。我用的iPhone6 版本8.1.3

SOS!!!

2015-07-20 16:00 负责人:无 分享
已邀请:
DCloud_IOS_XTY

DCloud_IOS_XTY

你可以自己指定分辨率
请参考camera API文档

  • 张三丰 (作者)

    谢谢回答!!!终于搞定了!

    var cmr = plus.camera.getCamera();

    var all= cmr.supportedImageResolutions;(这里得到的是undefined)

    var aa=cmr.supportedVideoResolutions;(这里得到的是0480,1280720,960540)

    然后

    var cmr = plus.camera.getCamera();

    var res = "960
    540";

    cmr.startVideoCapture( function ( path ) {

    outLine( "成功:"+path );

    plus.io.resolveLocalFileSystemURL( path, function( entry) {

    appendVideo( entry );

    }, function( e ) {

    outLine( "读取录像文件错误:"+e.message );

    } );

    }, function( e ){

    outLine( "失败:"+e.message );

    }, {filename:"_doc/video/",index:1,resolution:res} );

    }

    转需!帮忙看下为啥图片不能设置呀~是不支持是么。。

    2015-07-21 15:22

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