Media Capture Prototype: Improved Support for Real World Web Apps
Today we updated on HTML5 Labs the previously released Media Capture prototype to better align it to the latest W3C editor draft.
The HTML Media Capture working draft continues to evolve alongside related discussions in the Web RTC workgroup, and we have blogged previously about why this feature is important and how our Media Capture prototype implemented it in the past.
Because the API surface for this feature is far from final, we are supporting a simple capture syntax with this update, which is based on the most current proposal. We expect the capture syntax to change as the requirements for media capture are clarified in the task force.
Latest Updates
In this update, we are specifically adding support for a version of the getUserMedia
method (function names are ms-prefixed for prototyping purposes), the MediaStream
interface, and its associated events and callbacks. getUserMedia
allows Web developers to suggest what specific capture devices are desired. This then allows end users to authorize the browser to access the device they selected for the duration of the capture session.
function onLoad() {
navigator.msGetUserMedia(options, cameraStarted);
}
function cameraStarted(mediaStream) {
msMediaStream = mediaStream;
getReady();
document.getElementById("previewWindow").style.display = "block";
document["imgPreview"].src = URL.createObjectURL(mediaStream);
}
The advantage of this is two-fold: it protects user security and privacy and lets them pick the optimal device for the capture task from the many options available to them on a modern PC.
Looking back at our earlier proposals, we believe those scenarios are still important and relevant to this update: last March we released a prototype implementation of the audio portion of a working draft of the W3C Media Capture API on HTML5 Labs. This prototype publicized some proposed API enhancements described in section 6.1 of Microsoft’s HTML Speech XG Speech API Proposal. We then updated the prototype to include the image and video capture features described in the proposal to support scenarios we’ve heard are important for Web developers, and incorporated your feedback on audio.
This past November, we took our experience with the development of this prototype and interest in media capture for the browser to the W3C's technical plenary meeting (TPAC). Travis Leithead shared some of our feedback with the Device APIs (DAP) Working Group and we continued existing discussions within the HTML Speech Incubator Group. One result of our engagement was the formation of a media capture joint task force in order to bring the best of local media capture and real-time communication scenarios together. We are actively participating in the task force and support the getUserMedia approach to capture.
We then released an updated prototype in December that gives Web developers early access to photo, video and audio media capture APIs in the browser. We anticipate evolving the prototype to share implementation feedback and experience with the new media capture task force. The end goal remains to create the best possible standard for the benefit of the whole Web community.
Then, as discussed earlier, today we have updated the previously released Media Capture prototype to better align it to the latest W3C editor draft, which supports a simple capture syntax that is based on the most current proposal.
Microsoft remains actively engaged in the Media Capture task force and continues to advocate for the creation of the highest quality API to support these scenarios.
We Welcome Your Feedback
As always, we look forward to hearing from you, especially your questions and comments on how we can make this feature as good as possible for both the Developer community and end users. Please contact us either in the comment section on this blog or here.
—Adalberto Foresti, Senior Program Manager, Interoperability Strategy Team
—Travis Leithead, Program Manager, Internet Explorer
Comments
Anonymous
March 16, 2012
Blocking or unblocking (synch or asynch), that is the question.Anonymous
March 16, 2012
No feedback, until the version for win 7. You lose the loyalty of the entire community. Is it not important to you? I do not need a second Operating System, we do not need a virtual machine - it's too inconvenient, and it will not be hardware-acceleratedAnonymous
March 16, 2012
"You lose the loyalty of the entire community" No, they don't. "And it will not be hardware-accelerated" Nope. It could.Anonymous
March 17, 2012
@@Max Compare the number of (relevant) posts here on the ie-blog to that of the posts a few years back. I think Max has a point.Anonymous
March 17, 2012
INSTEAD OF SUPORTING UNFINISHED PROTOTYPES LIKE THIS, COULD MS IMPLEMENT FETURES ALREADY IMPLEMENTED IN MAJOR OTHER BROWSERS ? ON EXAMPLE IS MATHML. IT IS SUPPORTED BY ALL OTHER BROWSERS AND IF MS IMPLEMENT MATHML THIS ALOW ACADEMIC CIENTIFIC AND TECNICAL COMMUNITY TO READ THEIR FORMULAS IN IE10 WITHOUT PLUGINS. OTHER EXAMPLE IS WAV SUPPORT ON AUDIO TAG. ALL OTHER BROWSERS SUPORT THIS. MICROSOFT SAYS ABOUT INTEROPERABILITY, BUT NOT IMPLEMENT SEVERAL OTHER BROWSERS FETURES THAT ARE "DE FACTO STANDARD"....Anonymous
March 17, 2012
Waiting for the Windows 7 version of IE10 Beta.... no one wants Windows 8: www.youtube.com/watch and many others www.youtube.com/watch and www.youtube.com/watch No one can figure out the desktop version at all... where's the darn Start button? where's all my programs? Where's My Computer/Files? I'm not going to upgrade to an OS that is still in Beta that is designed for a device that no one owns yet. Desktops are 99% of Microsoft's market... why are you forcing another broken Vista on the world? I can't believe that Windows 7 is going to become the new XP.Anonymous
March 17, 2012
The MHT engine of Internet Explorer is so slow... It takes MINUTES (literally) to open big .MHT files While in other browsers, it takes few to 10 seconds.Anonymous
March 18, 2012
IE team, thank you X 1000. No turning back from the open web. A few years from now the computing world will look different then today. With standards like these we'll finally see the network computer, advocated by sun in circa 1996. Standards i'd like to see:
- Make JS better compilation target (e.g. add a goto statement)
- Evolve JS fast: harmony and beyond (i'd like types,, typed arrays not enough)
- Is canvas good enough for text apps (like text editing and word processing), if not add canvas API for that, or different direction. I am not mentioning WebGL as i think it wont make it because of political reasons (you know, the API competing with OpenGL ;-))
Anonymous
March 18, 2012
I agree with Max would like to stress that Chrome and FF are both running on Windows XP & Vista. I find it amusing that Microsoft does not allow there own latest browsers run on their own legacy O/S while their competitors do. On that same note, I'm wondering whether when IE 11 comes out, are you going to prevent it from running on Win7 just to force us to upgrade our O/S? Do you think that users will upgrade their O/S just to get a better IE browser when they have such strong and good alternatives?Anonymous
March 18, 2012
It its just HTML/Webdev stuff - why do I have to download an "sample"? Put the code on GitHub and please publish a YouTube Video just to show some cool stuff. 3 Steps in the right direction would be:
- Download latest IE Dev bits
- Play with the samples online
- look at the source and (because there is no IE for Mac) publish some kind of video.
Anonymous
March 19, 2012
@Max and others- I should call out that the prototype does work on IE9 + Windows 7. Arguably the blog post should have made that clearer (note to self: remember it for the next prototype). Regarding IE10 on Windows 7: we hear you. Microsoft has already confirmed that IE10 will run on Windows 7; future posts on this very blog will come back to the subject with more details. @Robert Muehsig- Thanks for your suggestions. We are considering adding videos as well as alternative ways to publish the source code for some of our upcoming prototypes.Anonymous
March 19, 2012
+1 for MathML @Robert.. did you said Mac? it belongs to museum already or the "igrave" of its father indeed.Anonymous
March 23, 2012
+1 For a working Layout Engine in HTML.