This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the spec changes.

The MediaSource interface represents the source of media data for an HTMLMediaElement object. A MediaSource object can be attached to a HTMLMediaElement to be played in the user agent.


Inherits properties from its parent interface, EventTarget.

MediaSource.sourceBuffers Read only
Is a SourceBufferList containing...
MediaSource.activeSourceBuffers Read only
Is a SourceBufferList containing...
MediaSource.readyState Read only
Is an enumerated values ...
Is an unrestricted double ...


MediaSource() Read only
Constructs and returns a MediaSource object with no associated source buffers.

Static methods

Returns a Boolean value indicating if the given MIME type is supported by the specific implementation


Inherits properties from its parent interface, EventTarget.

Creates, associates with this MediaSource object, and returns a SourceBuffer of the given MIME type.
Removes the given SourceBuffer from the list of buffers associated with this MediaSource object.
Signals the end of the stream, eventually with an error.


Specification Status Comment
Media Source Extensions
The definition of 'MediaSource' in that specification.
Working Draft Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 23 25.0 (25.0) [1] 11 [2] 15 8
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support Not supported 30 25.0 (25.0) [1] Windows 8.1 Not supported Not supported

[1] Available after switching the about:config preference media.mediasource.enabled to true.

[2] Internet Explorer supports MediaSource only on Windows 8

See also

Document Tags and Contributors

Contributors to this page: fscholz, realityking, mpizza, gmarty, teoli
Last updated by: fscholz,