Media sourceLimited availability
The MediaSource API is a custom data source for media elements commonly used for adaptive streaming. Also known as Media Source Extensions (MSE).
Not yet supported in all major browsers — check the table and provide a fallback.
Browser support
DesktopChrome
1–30Not supported
31+Supportedsince Nov 12, 2013
Current: 155Edge
12+Supportedsince Jul 29, 2015
Current: 154Firefox
1–41Not supported
42+Supportedsince Nov 3, 2015
Current: 157Safari
1–7Not supported
8+Supportedsince Oct 16, 2014
Current: 27MobileChrome Android
18–30Not supported
31+Supportedsince Nov 14, 2013
Current: 155Firefox Android
4–40Not supported
41+Supportedsince Sep 22, 2015
Current: 157Safari iOS
✕Not supportedup to 27
Current: 27How to use
Not supported in Safari iOS. Use feature detection below and provide a fallback (or a polyfill) for those browsers.
Example
Full syntax and examples are on MDN: sourceBuffer.
Feature detection
JS · check before using
if ("MediaSource" in globalThis) {
// MediaSource is available
} else {
// load a polyfill or use a fallback
}Sub-features
Support for each part of the feature (70). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| AudioTrack.sourceBuffer | ✕ | ✕ | ✕ | 8 | ✕ | ✕ | ✕ |
| BufferedChangeEvent | ✕ | ✕ | ✕ | 17 | ✕ | ✕ | 17.1 |
| BufferedChangeEvent.BufferedChangeEvent | ✕ | ✕ | ✕ | 17 | ✕ | ✕ | 17.1 |
| BufferedChangeEvent.addedRanges | ✕ | ✕ | ✕ | 17 | ✕ | ✕ | 17.1 |
| BufferedChangeEvent.removedRanges | ✕ | ✕ | ✕ | 17 | ✕ | ✕ | 17.1 |
| HTMLMediaElement.srcObject | ✕ | ✕ | ✕ | 11 | ✕ | ✕ | 11 |
| MediaSource | 31 | 12 | 42 | 8 | 31 | 41 | ✕ |
| MediaSource.MediaSource | 31 | 12 | 42 | 8 | 33 | 41 | ✕ |
| MediaSource.activeSourceBuffers | 31 | 12 | 42 | 8 | 31 | 41 | ✕ |
| MediaSource.addSourceBuffer | 31 | 12 | 42 | 8 | 31 | 41 | ✕ |
| MediaSource.canConstructInDedicatedWorker_static | 108 | 108 | ✕ | 18 | 108 | ✕ | ✕ |
| MediaSource.clearLiveSeekableRange | 62 | 17 | 50 | 10.1 | 62 | 50 | ✕ |
| MediaSource.duration | 31 | 12 | 42 | 8 | 31 | 41 | ✕ |
| MediaSource.endOfStream | 31 | 12 | 42 | 8 | 31 | 41 | ✕ |
| MediaSource.handle | 108 | 108 | ✕ | 18 | 108 | ✕ | ✕ |
| MediaSource.isTypeSupported_static | 31 | 12 | 42 | 8 | 31 | 41 | ✕ |
| MediaSource.readyState | 31 | 12 | 42 | 8 | 33 | 41 | ✕ |
| MediaSource.removeSourceBuffer | 31 | 12 | 42 | 8 | 31 | 41 | ✕ |
| MediaSource.setLiveSeekableRange | 62 | 17 | 50 | 10.1 | 62 | 50 | ✕ |
| MediaSource.sourceBuffers | 31 | 12 | 42 | 8 | 31 | 41 | ✕ |
Show 50 more
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| MediaSource.sourceclose_event | 53 | 17 | 87 | 10.1 | 53 | 87 | ✕ |
| MediaSource.sourceended_event | 53 | 17 | 42 | 10.1 | 53 | 41 | ✕ |
| MediaSource.sourceopen_event | 53 | 17 | 42 | 10.1 | 53 | 41 | ✕ |
| MediaSource.worker_support | 108 | 108 | ✕ | ✕ | 108 | ✕ | ✕ |
| MediaSourceHandle | 108 | 108 | ✕ | 18 | 108 | ✕ | 18 |
| SourceBuffer | 31 | 12 | 42 | 8 | 31 | 42 | ✕ |
| SourceBuffer.abort | 31 | 12 | 42 | 8 | 31 | 42 | ✕ |
| SourceBuffer.abort.worker_support | 108 | 108 | ✕ | ✕ | 108 | ✕ | ✕ |
| SourceBuffer.abort_event | 53 | 17 | 42 | 10.1 | 53 | 42 | ✕ |
| SourceBuffer.abort_event.worker_support | 108 | 108 | ✕ | ✕ | 108 | ✕ | ✕ |
| SourceBuffer.appendBuffer | 31 | 12 | 42 | 8 | 33 | 42 | ✕ |
| SourceBuffer.appendBuffer.worker_support | 108 | 108 | ✕ | ✕ | 108 | ✕ | ✕ |
| SourceBuffer.appendWindowEnd | 31 | 12 | 42 | 8 | 33 | 42 | ✕ |
| SourceBuffer.appendWindowEnd.worker_support | 108 | 108 | ✕ | ✕ | 108 | ✕ | ✕ |
| SourceBuffer.appendWindowStart | 31 | 12 | 42 | 8 | 33 | 42 | ✕ |
| SourceBuffer.appendWindowStart.worker_support | 108 | 108 | ✕ | ✕ | 108 | ✕ | ✕ |
| SourceBuffer.audioTracks | ✕ | ✕ | ✕ | 8 | ✕ | ✕ | ✕ |
| SourceBuffer.audioTracks.worker_support | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| SourceBuffer.buffered | 31 | 12 | 42 | 8 | 33 | 42 | ✕ |
| SourceBuffer.buffered.worker_support | 108 | 108 | ✕ | ✕ | 108 | ✕ | ✕ |
| SourceBuffer.changeType | 70 | 79 | 63 | 12.1 | 70 | 63 | ✕ |
| SourceBuffer.changeType.worker_support | 108 | 108 | ✕ | ✕ | 108 | ✕ | ✕ |
| SourceBuffer.error_event | 53 | 17 | 42 | 10.1 | 53 | 42 | ✕ |
| SourceBuffer.error_event.worker_support | 108 | 108 | ✕ | ✕ | 108 | ✕ | ✕ |
| SourceBuffer.mode | 31 | 12 | 42 | 8 | 33 | 42 | ✕ |
| SourceBuffer.mode.worker_support | 108 | 108 | ✕ | ✕ | 108 | ✕ | ✕ |
| SourceBuffer.remove | 31 | 12 | 42 | 8 | 33 | 42 | ✕ |
| SourceBuffer.remove.worker_support | 108 | 108 | ✕ | ✕ | 108 | ✕ | ✕ |
| SourceBuffer.textTracks | ✕ | ✕ | ✕ | 8 | ✕ | ✕ | ✕ |
| SourceBuffer.timestampOffset | 31 | 12 | 42 | 8 | 33 | 42 | ✕ |
| SourceBuffer.timestampOffset.worker_support | 108 | 108 | ✕ | ✕ | 108 | ✕ | ✕ |
| SourceBuffer.update_event | 53 | 17 | 42 | 10.1 | 53 | 42 | ✕ |
| SourceBuffer.update_event.worker_support | 108 | 108 | ✕ | ✕ | 108 | ✕ | ✕ |
| SourceBuffer.updateend_event | 53 | 17 | 42 | 10.1 | 53 | 42 | ✕ |
| SourceBuffer.updateend_event.worker_support | 108 | 108 | ✕ | ✕ | 108 | ✕ | ✕ |
| SourceBuffer.updatestart_event | 53 | 17 | 42 | 10.1 | 53 | 42 | ✕ |
| SourceBuffer.updatestart_event.worker_support | 108 | 108 | ✕ | ✕ | 108 | ✕ | ✕ |
| SourceBuffer.updating | 31 | 12 | 42 | 8 | 33 | 42 | ✕ |
| SourceBuffer.updating.worker_support | 108 | 108 | ✕ | ✕ | 108 | ✕ | ✕ |
| SourceBuffer.videoTracks | ✕ | ✕ | ✕ | 8 | ✕ | ✕ | ✕ |
| SourceBuffer.videoTracks.worker_support | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| SourceBufferList | 31 | 12 | 42 | 8 | 31 | 41 | ✕ |
| SourceBufferList.addsourcebuffer_event | 53 | 17 | 42 | 10.1 | 53 | 41 | ✕ |
| SourceBufferList.addsourcebuffer_event.worker_support | 108 | 108 | ✕ | ✕ | 108 | ✕ | ✕ |
| SourceBufferList.length | 31 | 12 | 42 | 8 | 33 | 41 | ✕ |
| SourceBufferList.length.worker_support | 108 | 108 | ✕ | ✕ | 108 | ✕ | ✕ |
| SourceBufferList.removesourcebuffer_event | 53 | 17 | 42 | 10.1 | 53 | 41 | ✕ |
| SourceBufferList.removesourcebuffer_event.worker_support | 108 | 108 | ✕ | ✕ | 108 | ✕ | ✕ |
| TextTrack.sourceBuffer | ✕ | ✕ | ✕ | 8 | ✕ | ✕ | ✕ |
| VideoTrack.sourceBuffer | ✕ | ✕ | ✕ | 7 | ✕ | ✕ | ✕ |