cordova-plugin-media-capture
cordova-plugin-media-capture copied to clipboard
cordova-plugin-media-capture is not working on the browser platform
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.
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