Skip to content Skip to sidebar Skip to footer

Html5 Camera Api - Not Working In Chrome?

I followed this article: http://www.syntaxxx.com/accessing-user-device-photos-with-the-html5-camera-api/ Using my desktop, it works in Firefox. In Chrome it doesn't work though. It

Solution 1:

In this case the article is releasing the Blob Object (using revokeObjectURL) before the request has been made, so when the image requests the blob it is no longer there. Chrome is Specification compliant, the sample should check that the image has loaded before revoking the Blob URL.

See https://jsbin.com/viyepa/1/edit for an example that works, I have commented out revokeObjectURL and it now works. If you add it back in, it will fail.

Post a Comment for "Html5 Camera Api - Not Working In Chrome?"