NotReadableError: Failed to allocate videosource

前端 未结 7 1575
逝去的感伤
逝去的感伤 2020-12-30 22:57

I get this error in Firefox 51 when I try to execute the following code and when I select my laptop\'s camera:

navigator.getMedia = (navigator.getUserMedia |         


        
7条回答
  •  猫巷女王i
    2020-12-30 23:38

    If you are here after or in December 2019 i would like to tell you few things

    1. This feature navigator.getUserMedia() is deprecated.
    2. Successor of this feature in the browsers will be window.navigator.mediaDevices.getUserMedia.
    3. The new feature may not support in many browsers, since its still in the experiment mode few days ago chrome released its chrome 79 and its still not supporting in chrome 79 for me, and other than chrome and IE its working in all the browsers for me
    4. Here is a quick code

    
    
    
        
        
        
        Jello
        
    
    
        
        
        
    
    

    Edit => if you are using in windows 10 make sure give chrome access your microphone and camera, otherwise it won't work

提交回复
热议问题