MediaStreamTrack.clone()

MediaStreamTrack 인터페이스의 clone() 메서드는 MediaStreamTrack 객체의 사본을 반환합니다. 사본은 새로운 id를 제외하면 모든 값이 원본과 동일합니다.

구문

const newTrack = track.clone()

반환 값

clone()을 호출한 MediaStreamTrack에서 id를 제외하면 똑같은 새로운 MediaStreamTrack.

명세

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

브라우저 호환성

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
cloneChrome Full support 45Edge Full support 12Firefox Full support 48IE No support NoOpera Full support 32Safari Full support YesWebView Android Full support 45Chrome Android Full support 45Firefox Android Full support YesOpera Android Full support 32Safari iOS Full support YesSamsung Internet Android Full support 5.0

Legend

Full support  
Full support
No support  
No support