4 comments on “getUserMedia – What happens when there’s missing media sources?

  1. I want to access webcam in my application. My java application is deployed on both local and remote server. The problem is, i can access webcam on mozilla firefox browser well, but on chrome browser its gives ‘[object navigatorusermediaerror]’.

    Code (js):
    if(navigator.getUserMedia) {
    navigator.getUserMedia(videoObj, standardVideo, errorBack);
    } else if(navigator.webkitGetUserMedia) {
    navigator.webkitGetUserMedia(videoObj, webkitVideo, errorBack);
    else if(navigator.mozGetUserMedia) {
    navigator.mozGetUserMedia(videoObj, mozillaVideo, errorBack);
    else if(navigator.msGetUserMedia){
    navigator.msGetUserMedia(videoObj, mozillaVideo, errorBack);

    standardVideo = function(stream) {
    video.src = stream;
    video.play(); }

    webkitVideo = function(stream){
    video.src = window.webkitURL.createObjectURL(stream);
    video.play(); }

    mozillaVideo = function(stream){
    video.src = window.URL.createObjectURL(stream);
    video.play(); }

  2. I had got these camera list by to use navigator.mediaDevices.enumerateDevices(), but it always to show TrackStartError of NavigatorUserMediaError,so what the problem it is.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.