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

Viewed 25

I have installed below plugin 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.

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?

1 Answers

It's not going to work. Cordova plugins do not work for the web.

Related