#个人学习笔记及资料整理 持续更新...
- vagrant使用及centos下的LAMP环境搭建
- Sublime Text3 实用配置
my documents
#个人学习笔记及资料整理 持续更新...
MediaDevices 接口提供访问连接媒体输入的设备,如照相机和麦克风,以及屏幕共享等。它可以使你取得任何硬件资源的媒体数据。
devicechange 系统中支持的设备变动时触发
MediaDevices.enumerateDevices()
获取有关系统中可用的媒体输入和输出设备的一系列信息。
navigator.mediaDevices.enumerateDevices().then((...arg)=> console.log(arg))
MediaDevices.getUserMedia()
在用户通过提示允许的情况下,打开系统上的相机或屏幕共享和/或麦克风,并提供 MediaStream 包含视频轨道和/或音频轨道的输入。
navigator.mediaDevices.getUserMedia(constraints)
.then(function(stream) {
/* 使用这个stream stream */
})
.catch(function(err) {
/* 处理error */
});
{ audio: true, video: true }
{
audio: false,
video: { width: 1280, height: 720 }
}
//前置摄像头(默认)
{ video: { facingMode: "user" } }
//后置摄像头
{ video: { facingMode: { exact: "environment" } } }
返回一个 Promise , 这个Promise成功后的回调函数带一个 MediaStream 对象作为其参数。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.