Commit 0a8eff49 authored by JingChao's avatar JingChao

Updates angular/hlsUtil.md

Auto commit by GitBook Editor
parent 75e68dd8
...@@ -192,7 +192,31 @@ vm.showSheet = function () { ...@@ -192,7 +192,31 @@ vm.showSheet = function () {
- `width`: 图片宽度 默认1024 - `width`: 图片宽度 默认1024
- `height`: 图片高度 默认768, - `height`: 图片高度 默认768,
- `maxCount`:选择图片的最大数量默认为10 - `maxCount`:选择图片的最大数量默认为10
- 参数2`(回调函数 function)` 回调函数返回图片的地址 - 参数2`(成功回调函数 function)` 回调函数返回图片的地址
- 参数3`(失败回调函数 function)` 返回具体错误
-调用实例如下
```javascript
vm.takePicture = function () {
var obj = {
quality: 50,
width: 1024,
height: 768,
maxCount: 1
};
//
hlsUtil.takePicture(obj, function (imgUrl) {
for (var i = 0; i < imgUrl.length; i++) {
hlsUtil.getImageToBase64(imgUrl[i], function (base64data) {
alert(base64data);
});
}
}, function (error) {
alert(error);
})
}
```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment