我使用 Ionic 框架构建 Web 和移动(混合)应用程序。我用cordova-plugin-crop和 cordova-camera-plugin 。它们在移动应用程序中运行良好。是否可以在移动设备上的网络应用程序(在浏览器中)中使用它们?
现在我正在 JS 代码中检查平台:
if (this.platform.is('core')) {
// use web libraries for uploading and crop images
} else {
// use @ionic-native cordova plugins
}
最佳答案
cordova-plugin-crop 仅适用于 iOS 和 Android:Ionic Crop plugin .
Cordova-plugin-crop 支持的平台:
- iOS
- Android
Cordova-camera-plugin 也可以在浏览器中使用:Cordova Plugin Camera .
Cordova-camera-plugin 支持的平台:
- Android
- 黑莓
- 浏览器
- 火狐浏览器
- FireOS
- iOS
- Windows
- WP8
- Ubuntu
First off, be sure to note that the 'Quirks' information for the Camera plugin clearly points out that only Base64 image URIs are returned by the plugin. Normally Cordova devs recommend against that, but if you want to test on the Browser platform you'll need to use it.
关于cordova - 如何在浏览器中使用Cordova插件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47787604/