Web/API/MediaStream/clone

From Get docs

The clone() method of the MediaStream interface creates a duplicate of the MediaStream. This new MediaStream object has a new unique id and contains clones of every MediaStreamTrack contained by the MediaStream on which clone() was called.

Syntax

var stream = MediaStream.clone();

Parameters

None.

Return value

A new MediaStream instance which has a new unique ID and contains clones of every MediaStreamTrack contained by the MediaStream on which clone() was called.

Specifications

Specification Status Comment
Media Capture and StreamsThe definition of 'MediaStream.clone()' in that specification. Candidate Recommendation Initial definition.

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
clone Chrome

Full support 45

Edge

Full support 12

Firefox

Full support 48

IE

No support No

Opera

No support No

Safari

Full support Yes

WebView Android

Full support 45

Chrome Android

Full support 45

Firefox Android

Full support 48

Opera Android

No support No

Safari iOS

Full support Yes

Samsung Internet Android

Full support 5.0

Legend

Full support  
Full support
No support  
No support