iframe頁面無法調用攝像頭修改
最近使用iframe嵌入聊天頁面,發現根本無法調用攝像頭呀,記錄一下
原來需要增加 allow
屬性
屬性值為: microphone;camera;midi;encrypted-media;
完整示例:
<iframe src="" frameborder="0" width="800" height="600" allow="microphone;camera;midi;encrypted-media;"></iframe>
補充:
chrome調用攝像頭是需要https
支持的
轉載:https://blog.csdn.net/zhaosai315/article/details/103824461