cordova - Meteor navigator.camera.getPicture 未找到
问题描述
我正在尝试使用,cordova-plugin-camera@4.0.3
但我不断得到:
"Cannot read property 'getPicture' of undefined".
我的 main.js 中已经有了 Meteor.startup 函数。我不明白为什么它不起作用。
uploadPicture() {
navigator.camera.getPicture(this.success, this.failure,_.extend(options, {
destinationType: Camera.DestinationType.DATA_URL
}));
}
单击拍照按钮时,我正在尝试运行此功能。但那是我得到错误的时候。我目前正在我的电脑上进行测试,而不是在设备上。
我还注意到我的导航器没有找到 .camera。
如果有人可以帮助我,将不胜感激。
解决方案
推荐阅读
- chart.js - 在chart.js中将y轴旋转到顶部,将x轴旋转到左边
- shell - 堆栈安装 curl 失败
- hibernate - 如何使用许多 @ManyToOne 优化 Hibernate 对象图的插入?
- angular - Rxjs map() 函数的参数为空
- php - nginx 404 中的 levrage 缓存未找到错误
- c# - 如何使用 WriteableBitmap 绘制一个矩形?
- javascript - 如何过滤掉字符串以仅包含香草Javascript中的字母?
- sql - SQL Server ISNULL 多列
- android - 如何修复解决方案应用程序:mergeDebugResources?
- java - 我的代码包含运行时忘记声明的错误?