blob: 71e679494869d46ba44b3c546d2414d69f5d1ee1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
---
title: MediaStreamTrack.clone()
slug: Web/API/MediaStreamTrack/clone
tags:
- API
- Media Capture and Streams API
- Media Streams API
- MediaStreamTrack
- Method
- Reference
translation_of: Web/API/MediaStreamTrack/clone
---
<div>{{APIRef("Media Capture and Streams")}}</div>
<p>{{domxref("MediaStreamTrack")}} 인터페이스의 <strong><code>clone()</code></strong> 메서드는 <code>MediaStreamTrack</code> 객체의 사본을 반환합니다. 사본은 새로운 {{domxref("MediaStreamTrack.id", "id")}}를 제외하면 모든 값이 원본과 동일합니다.</p>
<h2 id="구문">구문</h2>
<pre class="syntaxbox">const <em>newTrack</em> = <em>track</em>.clone()</pre>
<h3 id="반환_값">반환 값</h3>
<p><code>clone()</code>을 호출한 {{domxref("MediaStreamTrack")}}에서 {{domxref("MediaStreamTrack.id", "id")}}를 제외하면 똑같은 새로운 <code>MediaStreamTrack</code>.</p>
<h2 id="명세">명세</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
<tr>
<td>{{SpecName('Media Capture', '#dom-mediastreamtrack-clone', 'clone()')}}</td>
<td>{{Spec2('Media Capture')}}</td>
<td>Initial definition.</td>
</tr>
</tbody>
</table>
<h2 id="브라우저_호환성">브라우저 호환성</h2>
<p>{{Compat("api.MediaStreamTrack.clone")}}</p>
|