首页 > 解决方案 > 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。

如果有人可以帮助我,将不胜感激。

标签: cordovameteorcordova-plugins

解决方案


推荐阅读