WebDev: Using the Media Capture API in the Browser
Today I’d like to experiment with the Media Capture and Streams API, developed jointly at the W3C by the Web Real-Time Communications Working Group and the Device APIs Working Group. Some developers may know it simply as getUserMedia, which is the main interface that allows webpages to access media capture devices such as webcams and microphones. You can find the source code for this project on my GitHub. Additionally, here’s a working demo for you to experiment with. In the latest Windows 10 preview release, Microsoft added support for media capture APIs in the Microsoft Edge browser for the first time. Much of this code was taken from the Photo Capture sample that the Edge dev team produced at their test drive site. For those of you who want to dive a bit deeper, Eric Bidelman has a great article at HTML5 rocks which goes into the storied history of this API. Getting up to Speed The getUserMedia() method is a good starting point to understand the Media Capture APIs. The getUserMedia() call takes MediaStreamConstraints as an input argument, which defines the preferences and/or requirements for capture devices and captured media streams, such as camera facingMode, microphone volume, and video resolution. Through MediaStreamConstraints, you can also pick […]
- Manifold.JS: How to Build a Hosted Web App on Android, iOS, and…
- What You Need to Know About the Latest HTML5 Video
- JavaScript: Using Closure Space to Create Real Private Members
- WebDev: Creating a Mobile App with Famo.us and ManifoldJS
- Understanding ECMAScript 6: Template Strings (#2)
- WebDev: How to Use NGROK to Test a Local Site for Microsoft Edge and…