在 ionic 如何使用cordova 插件来访问相册 ,访问相机,拍照和录制视频
1.访问相册
(1).安装官方插件:http://ngcordova.com/docs/plugins/imagePicker/
[code lang="psd"] $ cordova plugin add https://github.com/wymsee/cordova-imagePicker.git [/code]
(2).查看安装插件:
[code lang="psd"] $ cordova plugin list [/code]
(3).调用插件中的方法:getPictures(options)
(4).参数说明:
Options | Type | Detail |
maximumImagesCount | Integer | 从相册选取照片的数量 |
width | Integer | 图片的宽 |
height | Integer | 图片的高 |
quality | Integer | 图片的质量0 - 100 |
(5).具体代码:
[code lang="js"] module.controller('ThisCtrl', function($scope, $cordovaImagePicker) { var opti