addyosmani / getUserMedia.js

Shim for getUserMedia(). Uses native implementation for modern browsers and a Flash fallback for everyone else.
MIT License
903 stars 158 forks source link

In Chrome it errors: Uncaught (in promise) DOMException: Failed to load because no supported source was found. #64

Open soft-dave opened 7 years ago

soft-dave commented 7 years ago

Not working in Chrome it gives below error while using this plugin,

" Uncaught (in promise) DOMException: Failed to load because no supported source was found. "

It's nice you give some solution for same to resolve this.

ldmcdaniel commented 7 years ago

I am having the same problem. If you have any insight, I would greatly appreciate it. I have scoured the web and found the closest replica of my problem to be : http://stackoverflow.com/questions/39646199/how-to-access-video-play-api-on-modern-chrome

ldmcdaniel commented 7 years ago

The success(stream) method in the demo using the latest Chrome causes a problem where stream is an object, so the solution is to set video.srcObject = stream.

ldmcdaniel commented 7 years ago

Like this:


            if (video.mozSrcObject !== undefined) { // FF18a
              video.mozSrcObject = stream;
            } else if (video.srcObject !== undefined) {
              video.srcObject = stream;
            } else { // FF16a, 17a
              video.src = stream;
            }
brickgale commented 7 years ago

+1

rajkananirk commented 2 years ago

https://laratuto.com/error-notsupportederror-failed-to-load-because-no-supported-source-was-found-flutter/