mozilla
Your Search Results

    MediaRecorder API

    This article is in need of a technical review.

    « MediaRecorder_API

    The MediaRecorder API (MediaStream Recording) aims to provide a really simple mechanism by which developers can record media streams from the user's input devices and instantly use them in web apps, rather than having to perform manual encoding operations on raw PCM data, etc., which would be required when using Navigator.getUserMedia() alone.

    Key concepts and usage

    MediaRecorder works alongside Navigator.getUserMedia() to capture media data. In a simple application, the MediaRecorder.start() method is called to start the recording. The dataavailable event is then fired when data is available to grab — when the MediaStream ends,  or when MediaRecorder.stop() or MediaRecorder.requestData() are called. The current recorded data is made available, in the platform's default encoding, as a Blob under dataavailable's data attribute.

    More complex applications can query the available set of encodings on the platform and select which one to use, and choose to receive small buffers of data at regular intervals rather than the whole lot at once (a time slice argument can been specified when MediaRecorder.start() is called).

    Note: You can read up on the basics of how to use the MediaRecorder API in Using the MediaRecorder API.

    MediaRecorder Interfaces

    MediaRecorder
    Contains all the functionality required for the MediaRecorder API to capture media. Created by the invokation of the MediaRecorder() constructor.
    BlobEvent
    Provides access to a Blob object containing the media captured by the MediaRecorder.

    Specifications

    Specification Status Comment
    MediaStream Recording Editor's Draft  

    Browser compatibility

    Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
    Basic support

    Not supported

    25.0 (25.0) [1] Not supported Not supported Not supported
    Feature Android Firefox Mobile (Gecko) Firefox OS IE Phone Opera Mobile Safari Mobile
    Basic support Not supported 25.0 (25.0) [1] 1.3 Not supported Not supported Not supported

    [1] The current Gecko implementation currently only supports audio recording.

    See also

    Document Tags and Contributors

    Contributors to this page: Sheppy, tuxboy, teoli, chrisdavidmills
    Last updated by: teoli,