【问题标题】:Cordova camera plugin error with destinationType option带有destinationType选项的Cordova相机插件错误
【发布时间】:2015-07-29 01:01:47
【问题描述】:

cordova 的相机插件有问题。

当我在getPicture() 的选项中写入destinationType: Camera.DestinationType.DATA_URL 或“FILE_URI”时,出现此错误:

[phonegap] [console.error] TypeError:无法读取属性“DATA_URL” d.e.takePicture 上未定义的 [phonegap] (file:///data/data/com.adobe.phonegap.app/files/files/phonegapdevapp/www/js/app.min.js:13:13609) [phonegap] 在 fn (eval at (file:///data/data/com.adobe.phonegap.app/files/files/phonegapdevapp/www/js/app.min.js:11:32101), :2:224) [phonegap] 在我 (file:///data/data/com.adobe.phonegap.app/files/files/phonegapdevapp/www/js/app.min.js:12:18522) [phonegap] 在 d.$eval (file:///data/data/com.adobe.phonegap.app/files/files/phonegapdevapp/www/js/app.min.js:10:20470) [phonegap] 在 d.$apply (file:///data/data/com.adobe.phonegap.app/files/files/phonegapdevapp/www/js/app.min.js:10:20696) [phonegap] 在 HTMLButtonElement。 (file:///data/data/com.adobe.phonegap.app/files/files/phonegapdevapp/www/js/app.min.js:12:18574) [phonegap] 在 HTMLButtonElement.Gt.n (file:///data/data/com.adobe.phonegap.app/files/files/phonegapdevapp/www/js/app.min.js:8:30670)

如果我不写这个选项,相机会正确启动,但我无法获得 img 的 url。

谢谢

【问题讨论】:

  • 你在使用phonegap构建吗?无论如何,试试你的运气:) ...destinationType:navigator.camera.DestinationType.DATA_URL
  • destinationType: navigator.camera.DestinationType.DATA_URL 工作!谢谢

标签: cordova phonegap-plugins cordova-plugins


【解决方案1】:

使用destinationType:navigator.camera.DestinationType.DATA_URL

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-12-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-11-26
    • 2018-02-09
    相关资源
    最近更新 更多