How to resolve iOS 11 Safari getUserMedia “Invalid constraint” issue

后端 未结 3 1054
暗喜
暗喜 2020-12-30 04:31

I\'m attempting to run the following code in Safari in iOS 11. It should prompt the user to give access to their devices camera and then display it in my

3条回答
  •  执念已碎
    2020-12-30 04:46

    It appears to have been a bug that was corrected, because I just tried it again and the error message no longer appears.

    Note that while the error message went away, I did have to make one more change for it to work, which was adding video.srcObject = stream; in the then callback.

提交回复
热议问题