简体   繁体   English

图像未从 Ionic Cordova(浏览器平台)中的 iPhone 浏览器捕获

[英]Image not capturing from iPhone's browser in Ionic Cordova (Browser Platform)

I have installed below plugin https://github.com/Telerik-Verified-Plugins/ImagePicker我已经安装了下面的插件https://github.com/Telerik-Verified-Plugins/ImagePicker

This plugin is working fine for android and ios app and also working for android browser but it's not working for any mobile browser of iPhone (IOS) only.这个插件适用于 android 和 ios 应用程序,也适用于 android 浏览器,但它不适用于 iPhone (IOS) 的任何移动浏览器。

It opens camera on click of 'Take Photo' button but after click on 'Capture' button image not showing and error gives on console.它在单击“拍照”按钮时打开相机,但在单击“捕获”按钮后图像未显示并且控制台上出现错误。

Unhandled Promise rejection: – "Missing Command Error" – "; Zone:" – "<root>" – "; Task:" – null – "; Value:" – "Missing Command Error" –
public ngOnInit(): void {
    this.cameraOptions = {
      quality: 50,
      sourceType: this.camera.PictureSourceType.PHOTOLIBRARY,
      destinationType: this.camera.DestinationType.DATA_URL,
      encodingType: this.camera.EncodingType.JPEG,
      mediaType: this.camera.MediaType.PICTURE
    };
  }

  public selectFromGallery(): void {
    this.imagePicker.hasReadPermission().then(() => {
      this.imagePicker.getPictures({ ...this.cameraOptions, outputType: OutputType.DATA_URL, disable_popover: true }).then((results) => {
        if (results !== 'OK') {
          for (const result of results) {
            this.images.push(`data:image/jpeg;base64,${result}`);
          }
        }
      });
    });
  }

check this screenshot检查此屏幕截图

So can you please help me with this issue?那么你能帮我解决这个问题吗?

It's not going to work.这是行不通的。 Cordova plugins do not work for the web. Cordova 插件不适用于 web。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM