cordova-plugin-media-capture icon indicating copy to clipboard operation
cordova-plugin-media-capture copied to clipboard

cordova-plugin-media-capture is not working on the browser platform

Open sanjayhanumegowda opened this issue 3 years ago • 1 comments

Hi, cordova-plugin-media-capture plugin is not working on the browser platform(chrome) and getting CaptureError {code: 20} when I try to capture video.

sanjayhanumegowda avatar Oct 06 '20 13:10 sanjayhanumegowda

I have the same problem. In particular, the following line

navigator.device.capture.captureImage(captureSuccess, captureError, {limit:2});

gives the following exception on both Firefox and Chrome:

Uncaught TypeError: URL.createObjectURL: Argument 1 is not valid for any of the 1-argument overloads.
    startPreview http://localhost:8000/plugins/cordova-plugin-media-capture/src/browser/CaptureProxy.js:120
CaptureProxy.js:120:32
    startPreview http://localhost:8000/plugins/cordova-plugin-media-capture/src/browser/CaptureProxy.js:120

It is probably related to this outdated function call: https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL#using_object_urls_for_media_streams

aragagnin avatar Mar 27 '21 13:03 aragagnin