NotReadableError: Failed to allocate videosource

前端 未结 7 1556
逝去的感伤
逝去的感伤 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条回答
  •  死守一世寂寞
    2020-12-30 23:30

    Can someone elaborate what this means? Is my webcam broken? I used it from the script just yesterday without problems. It's not allocated to other application.

    I've encountered exactly the same issue!

    Shame on me! Because, in the meantime I'd added a beforeunload event, including the event.preventDefault as reported in the example.

    After removing this event.preventDefault, everything worked fine - as expected.

提交回复
热议问题