源于最近听到的一个需求,简单琢磨了下,还要待更新完善。
Navigator.getUserMedia
这个方法的介绍参考以下链接
Camera and Video Control with HTML5
详细接口见下:
WebRTC-阮一峰
测试浏览器是否支持,可点击此链接:测试navigator.getUserMedia
功能看着很强大,但是限制如下:
- 首先需要https头
- 其次已经被排除出标准,参照MDN:链接
Deprecated This feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Do not use it in old or new projects. Pages or Web apps using it may break at any time.
给出的推荐是使用:
Navigator.getUserMedia()
支持度很一般,再了解
其他知识仅做了解:
移动端api