WolframHempel / photobooth-js

A widget that allows users to take their avatar pictures on your site
Other
576 stars 114 forks source link

how to set the video source id? #15

Closed wufeng87 closed 8 years ago

wufeng87 commented 8 years ago

I want to choose a video source from two sources. Best regards.

wufeng87 commented 8 years ago
    var fRequestWebcamAccess = function()
    {
        eNoWebcamWarning.style.display = "none";
        fGetUserMedia.call( navigator
            , 
            // {"video" : true }
        {
            'video': {
                'mandatory':{
                    'sourceId': '5602677e39a743754b88f54aa8f7ecbb0ab590c04c302106a1a09acdbbc159f3'
                }
            }
        }
        , fOnStream, fOnStreamError );
    };

It seems work finely.