Chrome Extension - getUserMedia throws “NotAllowedError: Failed due to shutdown”

前端 未结 2 1454
清歌不尽
清歌不尽 2020-12-29 11:02

I have a suite which records the user\'s webcam and mic. It works great on a webpage, but in a Chrome Extension the line:

navigator.mediaDevices.getUserMedia         


        
2条回答
  •  无人及你
    2020-12-29 11:21

    Utkanos answer is great but don't forget to add

    frame.setAttribute("allow", "microphone; camera");
    

提交回复
热议问题