aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/rtcpeerconnection/index.html
blob: 295552696c56f2c738f184eb6d8fc51e5e6e7c4c (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
---
title: RTCPeerConnection
slug: Web/API/RTCPeerConnection
translation_of: Web/API/RTCPeerConnection
---
<p>{{APIRef('WebRTC')}}{{draft}}</p>

<p><span class="seoSummary"><strong><code>RTCPeerConnection</code> </strong>인터페이스는 로컬 컴퓨터와 원격 피어 간의 WebRTC 연결을 담당하며 원격 피어에 연결하기 위한 메서드들을 제공하고, 연결을 유지하고 연결 상태를 모니터링하며 더 이상 연결이 필요하지 않을 경우 연결을 종료합니다.</span></p>

<p>{{InheritanceDiagram}}</p>

<p>{{InterfaceOverview("WebRTC")}}</p>

<h3 id="사용되지_않는_메서드">사용되지 않는 메서드</h3>

<p>다음 메서드는 오래 전부터 사용되지 않았으며 모든 주요 브라우저에서 구현되지 않았습니다.</p>

<dl>
 <dt>{{domxref("RTCPeerConnection.createDTMFSender()")}} {{obsolete_inline}}</dt>
 <dd>특정 {{domxref("MediaStreamTrack")}}와 관련된 신규 {{domxref("RTCDTMFSender")}}를 생성합니다. {{domxref("RTCDTMFSender")}}는 연결을 통해 {{Glossary("DTMF")}} 전화 신호를 보낼 수 있습니다. </dd>
</dl>

<h2 id="이벤트">이벤트</h2>

<p>{{domxref("EventTarget.addEventListener", "addEventListener()")}}를 이용하여 아래 이벤트를 리스닝하거나 이 인터페이스의 <code>on<em>eventname</em></code> 프로퍼티에 이벤트 리스너를 할당할 수 있습니다.</p>

<dl>
 <dt>{{domxref("RTCPeerConnection.connectionstatechange_event", "connectionstatechange")}}</dt>
 <dd><code>RTCPeerConnection</code>의 연결상태가 바뀌면, <code>RTCPeerConnection</code> 객체에 전달합니다. 이는 또한,  {{domxref("RTCPeerConnection.onconnectionstatechange", "onconnectionstatechange")}} 이벤트 핸들러 속성을 통해 사용이 가능합니다. </dd>
 <dt>{{domxref("RTCPeerConnection.datachannel_event", "datachannel")}}</dt>
 <dd>원격 피어가 {{domxref("RTCDataChannel")}}을 연결에 추가하게되면 <code>RTCPeerConnection</code> 객체에 전달합니다. 이는 또한, {{domxref("RTCPeerConnection.ondatachannel", "ondatachannel")}} 이벤트 핸들러 속성을 통해 사용이 가능합니다.</dd>
 <dt>{{domxref("RTCPeerConnection.icecandidate_event", "icecandidate")}}</dt>
 <dd>특정 ICE candidate가 원격 피어에 전달되도록 피어 연결에 요청을 보냅니다. 또한, {{domxref("RTCPeerConnection.onicecandidate", "onicecandidate")}} 이벤트 핸들러 속성을 통해 사용이 가능합니다.</dd>
 <dt>{{domxref("RTCPeerConnection.icecandidateerror_event", "icecandidateerror")}}</dt>
 <dd>ICE candidate를 수집하는 과정에서 에러가 발생하면 연결에 {{domxref("RTCPeerConnectionIceErrorEvent")}} 에러 타입을 보냅니다. 이는 또한, {{domxref("RTCPeerConnection.onicecandidateerror", "onicecandidateerror")}} 이벤트 핸들러 속성을 통해 사용이 가능합니다.</dd>
 <dt>{{domxref("RTCPeerConnection.iceconnectionstatechange_event", "iceconnectionstatechange")}}</dt>
 <dd>연결이 끊기는 상황과 같이 ICE 연결의 상태가 변하게되면 <code>RTCPeerConnection</code>에 전달합니다. 이는 또한, {{domxref("RTCPeerConnection.oniceconnectionstatechange", "oniceconnectionstatechange")}} 이벤트 핸들러 속성을 통해 사용이 가능합니다.</dd>
</dl>

<dl>
 <dt>{{domxref("RTCPeerConnection.icegatheringstatechange_event", "icegatheringstatechange")}}</dt>
 <dd>{{domxref("RTCPeerConnection.iceGatheringState", "iceGatheringState")}}에 의해 반영되는 ICE 계층의 수집 상태가 변하면, <code>RTCPeerConnection</code>에 전달합니다. 계층의 수집 상태는 ICE 네고시에이션이 아직 시작을 안했거나 (<code>new</code>), 시작하고 candidate를 수집하는 중이거나 (<code>gathering</code>), 혹은 수집이 완료 (<code>complete</code>)된 상태로 나눠집니다. 이는 또한, {{domxref("RTCPeerConnection.onicegatheringstatechange", "onicegatheringstatechange")}} 이벤트 핸들러 속성을 통해 사용이 가능합니다.</dd>
 <dt>{{domxref("RTCPeerConnection.isolationchange_event", "isolationchange")}}</dt>
 <dd>연결과 관련이 있는 하나의 {{domxref("MediaStreamTrack")}} 객체가 있는 {{domxref("MediaStreamTrack.isolated", "isolated")}} 속성의 값이 변하면, <code>RTCPeerConnection</code>에 전달합니다. 만약 미디어 컨텐츠가 인증이 되어있지 않거나, 트랙이 cross-origin source (CORS)에서 오는 것이라면 트랙의 상태는 {{domxref("MediaStreamTrack.isolated", "isolated")}}이 됩니다. 이는 또한, {{domxref("RTCPeerConnection.onisolationchange", "onisolationchange")}} 이벤트 핸들러 속성을 통해 사용이 가능합니다.</dd>
</dl>

<dl>
 <dt>{{domxref("RTCPeerConnection.negotiationneeded_event", "negotiationneeded")}}</dt>
 <dd>ICE 연결의 네고시에이션 혹은 네고시에이션을 다시 수행해야 할 때, <code>RTCPeerConnection</code>에 전달됩니다. 이는 연결이 처음 생성되는 순간뿐만아니라 네트워크 조건이 바뀌게 되면 발생합니다. 리시버는 offer를 생성하고, 이를 다른 피어에 전달하기위해 응답해야합니다. 이는 또한, {{domxref("RTCPeerConnection.onnegotiationneeded", "onnegotiationneeded")}} 이벤트 핸들러 속성을 통해 사용이 가능합니다.</dd>
 <dt>{{domxref("RTCPeerConnection.signalingstatechange_event", "signalingstatechange")}}</dt>
 <dd>연결의 ICE 신호 상태가 변경되면 <code>signalingstatechange</code>이벤트를 <code>RTCPeerConnection</code>에 전달합니다. 이는 또한, {{domxref("RTCPeerConnection.onsignalingstatechange", "onsignalingstatechange")}} 이벤트 핸들러 속성을 통해 사용이 가능합니다.</dd>
 <dt>{{domxref("RTCPeerConnection.statsended_event", "statsended")}}</dt>
 <dd>모니터링이 되던 statistics 객체가 삭제되면, <code>statsended</code>이벤트를 전달합니다. {{domxref("RTCStatsEvent")}}는 삭제된 객체의 마지막 리포트를 포함합니다. 마지막 리포트를 전달받고나서 여러개의 객체가 삭제되었다면, 여러 객체에 대한 마지막 리포트를 포함합니다. 예를 들어 연결이 종료되거나 삭제되면, statistics 객체는 삭제됩니다. </dd>
 <dd>The <code>statsended</code> event is sent when a statistics object being monitored is deleted. The {{domxref("RTCStatsEvent")}} includes the final report on the deleted object (or objects, if multiple objects have been deleted since the last report was delivered). A statistics object is deleted, for example, when the connection is closed and deleted.<br>
 Available as the {{domxref("RTCPeerConnection.onstatsended", "onstatsended")}} event handler property.</dd>
 <dt>{{domxref("RTCPeerConnection.track_event", "track")}}</dt>
 <dd>연결을 구성하고 있는 {{domxref("RTCRtpReceiver")}} 인스턴스들 중 하나에 신규 트랙이 추가된 후에, <code>track</code>이벤트를 보냅니다. 이는 또한, {{domxref("RTCPeerConnection.ontrack", "ontrack")}} 이벤트 핸들러 속성을 통해 사용이 가능합니다.</dd>
</dl>

<h3 id="사용되지_않는_이벤트">사용되지 않는 이벤트</h3>

<dl>
 <dt>{{domxref("RTCPeerConnection.addstream_event", "addstream")}} {{obsolete_inline}}</dt>
 <dd>Sent when a new {{domxref("MediaStream")}} has been added to the connection. Instead of watching for this obsolete event, you should watch each for {{domxref("RTCPeerConnection.track_event", "track")}} events; one is sent for each {{domxref("MediaStreamTrack")}} added to the connection.<br>
 Available as the {{domxref("RTCPeerConnection.onaddstream", "onaddstream")}} event handler property.</dd>
 <dt>{{domxref("RTCPeerConnection.identityresult_event", "identityresult")}} {{obsolete_inline}}</dt>
 <dd>In old versions of the WebRTC specification, this event was used to indicate that an identity assertion is available. Now, you should instead wait for a the promise returned by {{domxref("RTCPeerConnection.peerIdentity", "peerIdentity")}} to resolve with an identity.<br>
 Also available using the {{domxref("RTCPeerConnection.onidentityresult", "onidentityresult")}} event handler property.</dd>
 <dt>{{domxref("RTCPeerConnection.idpassertionerror_event", "idpassertionerror")}} {{obsolete_inline}}</dt>
 <dd>In old versions of the WebRTC specification, this event was used to indicate that an error occurred while attempting to generate an identity assertion. Now, you should instead wait for a the promise returned by {{domxref("RTCPeerConnection.peerIdentity", "peerIdentity")}} to be rejected with an error.<br>
 Also available as the {{domxref("RTCPeerConnection.onidpassertionerror", "onidpinsertionerror")}} event handler property.</dd>
 <dt>{{domxref("RTCPeerConnection.idpvalidationerror_event", "idpvalidationerror")}} {{obsolete_inline}}</dt>
 <dd>In old versions of the WebRTC specification, this event was used to indicate that an error occurred while attempting to validate an identity assertion. Now, you should instead wait for a the promise returned by {{domxref("RTCPeerConnection.peerIdentity", "peerIdentity")}} to be rejected with an error.<br>
 Also available using the {{domxref("RTCPeerConnection.onpeeridentity", "onpeerdentity")}} event handler property.</dd>
 <dt>{{domxref("RTCPeerConnection.peeridentity_event", "peeridentity")}} {{obsolete_inline}}</dt>
 <dd>In old versions of the WebRTC specification, this event was used to deliver a received identity. Now, you should instead wait for a the promise returned by {{domxref("RTCPeerConnection.peerIdentity", "peerIdentity")}} to resolve with an identity.</dd>
 <dt>{{domxref("RTCPeerConnection.removestream_event", "removestream")}} {{obsolete_inline}}</dt>
 <dd>Sent to the <code>RTCPeerConnection</code> when a {{domxref("MediaStream")}} is removed from the connection. Instead of watching for this obsolete event, you should watch each stream for {{domxref("MediaStream.removetrack_event", "removetrack")}} events on each stream within the <code>RTCPeerConnection</code>.<br>
 Also available as the {{domxref("RTCPeerConnection.onremovestream", "onaddstream")}} event handler property.</dd>
</dl>

<h2 id="상수">상수</h2>

<h3 id="RTCBundlePolicy_열거체">RTCBundlePolicy 열거체</h3>

<p>The <code>RTCBundlePolicy</code> enum defines string constants which are used to request a specific policy for gathering ICE candidates if the remote peer isn't compatible with the <a href="https://webrtcstandards.info/sdp-bundle/">SDP BUNDLE standard</a> for bundling multiple media streams on a single transport link.</p>

<div class="note">
<p>In technical terms, a BUNDLE lets all media flow between two peers flow across a single <strong>5-tuple</strong>; that is, from the same IP and port on one peer to the same IP and port on the other peer, using the same transport protocol.</p>
</div>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">상수명</th>
   <th scope="col">설명</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td><code>"balanced"</code></td>
   <td>On BUNDLE-aware connections, the ICE agent should gather candidates for all of the media types in use (audio, video, and data). Otherwise, the ICE agent should only negotiate one audio and video track on separate transports.</td>
  </tr>
  <tr>
   <td><code>"max-compat"</code></td>
   <td>The ICE agent should gather candidates for each track, using separate transports to negotiate all media tracks for connections which aren't BUNDLE-compatible.</td>
  </tr>
  <tr>
   <td><code>"max-bundle"</code></td>
   <td>The ICE agent should gather candidates for just one track. If the connection isn't BUNDLE-compatible, then the ICE agent should negotiate just one media track.</td>
  </tr>
 </tbody>
</table>

<h3 id="RTCIceConnectionState_열거체">RTCIceConnectionState 열거체</h3>

<p>The <code>RTCIceConnectionState</code> enum defines the string constants used to describe the current state of the ICE agent and its connection to the ICE server (that is, the {{Glossary("STUN")}} or {{Glossary("TURN")}} server).</p>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">상수명</th>
   <th scope="col">설명</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td><code>"new"</code></td>
   <td>The ICE agent is gathering addresses or is waiting to be given remote candidates through calls to {{domxref("RTCPeerConnection.addIceCandidate()")}} (or both).</td>
  </tr>
  <tr>
   <td><code>"checking"</code></td>
   <td>The ICE agent has been given one or more remote candidates and is checking pairs of local and remote candidates against one another to try to find a compatible match, but has not yet found a pair which will allow the peer connection to be made. It's possible that gathering of candidates is also still underway.</td>
  </tr>
  <tr>
   <td><code>"connected"</code></td>
   <td>A usable pairing of local and remote candidates has been found for all components of the connection, and the connection has been established. It's possible that gathering is still underway, and it's also possible that the ICE agent is still checking candidates against one another looking for a better connection to use.</td>
  </tr>
  <tr>
   <td><code>"completed"</code></td>
   <td>The ICE agent has finished gathering candidates, has checked all pairs against one another, and has found a connection for all components.</td>
  </tr>
  <tr>
   <td><code>"failed"</code></td>
   <td>The ICE candidate has checked all candidates pairs against one another and has failed to find compatible matches for all components of the connection. It is, however, possible that the ICE agent did find compatible connections for some components.</td>
  </tr>
  <tr>
   <td><code>"disconnected"</code></td>
   <td>Checks to ensure that components are still connected failed for at least one component of the {{domxref("RTCPeerConnection")}}. This is a less stringent test than <code>"failed"</code> and may trigger intermittently and resolve just as spontaneously on less reliable networks, or during temporary disconnections. When the problem resolves, the connection may return to the <code>"connected"</code> state.</td>
  </tr>
  <tr>
   <td><code>"closed"</code></td>
   <td>The ICE agent for this {{domxref("RTCPeerConnection")}} has shut down and is no longer handling requests.</td>
  </tr>
 </tbody>
</table>

<h3 id="RTCIceGatheringState_enum">RTCIceGatheringState enum</h3>

<p>{{domxref("RTCPeerConnection.iceGatheringState")}} 속성을 사용하게되면 반환되는 <code>RTCIceGatheringState</code> enum은 현재의 ICE 수집 상태를 반영하여 알려주는 문자열 상수입니다. {{event("icegatheringstatechange")}} 타입의 이벤트를 감시해서 이 값이 언제 변하는지 확인 할 수 있습니다.</p>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">상수명</th>
   <th scope="col">설명</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td><code>"new"</code></td>
   <td>피어 연결이 새로 생성되었지만, 아직 네트워킹은 시작되지 않은 상태</td>
  </tr>
  <tr>
   <td><code>"gathering"</code></td>
   <td>ICE 에이전트가 연결을 위한 ICE candidate를 수집하는 과정에 있음을 알려주는 상태</td>
  </tr>
  <tr>
   <td><code>"complete"</code></td>
   <td>ICE 에이전트가 candidate 수집을 완료한 상태. 새로운 인터페이스가 추가되거나, 신규 ICE 서버가 추가와 같이 신규 ICE candidate를 수집해야하는 상황이 오면, 상태가 <code>complete</code>에서 <code>gathering</code>으로 다시 바뀝니다.</td>
  </tr>
 </tbody>
</table>

<h3 id="RTCIceTransportPolicy_enum">RTCIceTransportPolicy enum</h3>

<p>The <code>RTCIceTransportPolicy</code> enum defines string constants which can be used to limit the transport policies of the ICE candidates to be considered during the connection process.</p>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">상수명</th>
   <th scope="col">설명</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td><code>"all"</code></td>
   <td>All ICE candidates will be considered.</td>
  </tr>
  <tr>
   <td><code>"public" </code>{{obsolete_inline}}</td>
   <td>Only ICE candidates with public IP addresses will be considered. <em>Removed from the specification's May 13, 2016 working draft.</em></td>
  </tr>
  <tr>
   <td><code>"relay"</code></td>
   <td>Only ICE candidates whose IP addresses are being relayed, such as those being passed through a TURN server, will be considered.</td>
  </tr>
 </tbody>
</table>

<h3 id="RTCPeerConnectionState_enum">RTCPeerConnectionState enum</h3>

<p><code>RTCPeerConnectionState</code> enum은 <code>RTCPeerConnection</code>이 존재 할 수 도있는 상태에 대해 알려주는 문자열 상수를 정의합니다. 이 값들은 {domxref("RTCPeerConnection.connectionState", "connectionState")}} 속성에 의해 반홥됩니다. 근본적으로 이 상태는 연결에 의해 사용되는 모든 ICE 전송 ({{domxref("RTCIceTransport")}} 혹은 {{domxref("RTCDtlsTransport")}}의 타입)의 상태 집합을 나타냅니다. </p>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">상수명</th>
   <th scope="col">설명</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td><code>"new"</code></td>
   <td>
    <p>연결의 ICE 전송 중 적어도 한 개가 새로 만들어진 <code>"new"</code> 상태이고,  그 외의 나머지는 다음의 상태 중 하나가 아니여야 합니다: <code>"connecting"</code>, <code>"checking"</code>, <code>"failed"</code>, 혹은 <code>"disconnected"</code>, 혹은  모든 연결의 전송이 끝났다는 <code>"closed"</code>상태.</p>
   </td>
  </tr>
  <tr>
   <td><code>"connecting"</code></td>
   <td>하나 혹은 여러개의 ICE 전송이 현재 연결을 구성하는 중에 있음을 알려주는 값. 이는 <code>RTCIceConnectionState</code><code>"checking"</code> 혹은 <code>"connected"</code>이며, 그 어떤 전송도 <code>"failed"</code>상태가 아니여야합니다. <strong>&lt;&lt;&lt; Make this a link once I know where that will be documented</strong></td>
  </tr>
  <tr>
   <td><code>"connected"</code></td>
   <td>연결에 의해 사용되는 모든 ICE 전송이 사용 중 (<code>"connected"</code> 혹은 <code>"completed"</code>)이거나, 종료된 상태입니다. 추가적으로 최소 하나의 전송이 <code>"connected"</code> 혹은 <code>"completed"</code>입니다.</td>
  </tr>
  <tr>
   <td><code>"disconnected"</code></td>
   <td>연결에 대한 최소 한 개의 ICE 전송이 <code>"disconnected"</code>상태이고, 그 외의 다른 전송 상태는 <code>"failed"</code>, <code>"connecting"</code>, 혹은 <code>"checking"</code>이 아님을 알려주는 값. </td>
  </tr>
  <tr>
   <td><code>"failed"</code></td>
   <td>
    <p>연결에 대한 하나 혹은 여러개의 ICE 전송이 <code>"failed"</code>상태임을 알려주는 값.</p>
   </td>
  </tr>
  <tr>
   <td><code>"closed"</code></td>
   <td>
    <p><code>RTCPeerConnection</code> 개통되지 않음을 알려주는 값.</p>

    <p>2016년 5월 13일에 작성된 명세서의 초안에 따르면, 이 값은 <a href="#RTCPeerConnectionState_enum"><code>RTCPeerConnectionState</code> enum</a> 안에 존재했었습니다. 따라서, {{domxref("RTCPeerConnection.signalingState", "signalingState")}}의 값을 통해 찾을 수 있습니다. </p>
   </td>
  </tr>
 </tbody>
</table>

<h3 id="RTCRtcpMuxPolicy_enum">RTCRtcpMuxPolicy enum</h3>

<p>The <code>RTCRtcpMuxPolicy</code> enum defines string constants which specify what ICE candidates are gathered to support non-multiplexed RTCP. <strong>&lt;&lt;&lt;add a link to info about multiplexed RTCP.</strong></p>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">상수명</th>
   <th scope="col">설명</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td><code>"negotiate"</code></td>
   <td>Instructs the ICE agent to gather both {{Glossary("RTP")}} and {{Glossary("RTCP")}} candidates. If the remote peer can multiplex RTCP, then RTCP candidates are multiplexed atop the corresponding RTP candidates. Otherwise, both the RTP and RTCP candidates are returned, separately.</td>
  </tr>
  <tr>
   <td><code>"require"</code></td>
   <td>Tells the ICE agent to gather ICE candidates for only RTP, and to multiplex RTCP atop them. If the remote peer doesn't support RTCP multiplexing, then session negotiation fails.</td>
  </tr>
 </tbody>
</table>

<h3 id="RTCSignalingState_enum">RTCSignalingState enum</h3>

<p>The <code>RTCSignalingState</code> enum specifies the possible values of {{domxref("RTCPeerConnection.signalingState")}}, which indicates where in the process of signaling the exchange of offer and answer the connection currently is.</p>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">상수명</th>
   <th scope="col">설명</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td><code>"stable"</code></td>
   <td>There is no ongoing exchange of offer and answer underway. This may mean that the {{domxref("RTCPeerConnection")}} object is new, in which case both the {{domxref("RTCPeerConnection.localDescription", "localDescription")}} and {{domxref("RTCPeerConnection.remoteDescription", "remoteDescription")}} are <code>null</code>; it may also mean that negotiation is complete and a connection has been established.</td>
  </tr>
  <tr>
   <td><code>"have-local-offer"</code></td>
   <td>The local peer has called {{domxref("RTCPeerConnection.setLocalDescription()")}}, passing in SDP representing an offer (usually created by calling {{domxref("RTCPeerConnection.createOffer()")}}), and the offer has been applied successfully.</td>
  </tr>
  <tr>
   <td><code>"have-remote-offer"</code></td>
   <td>The remote peer has created an offer and used the signaling server to deliver it to the local peer, which has set the offer as the remote description by calling {{domxref("RTCPeerConnection.setRemoteDescription()")}}.</td>
  </tr>
  <tr>
   <td><code>"have-local-pranswer"</code></td>
   <td>The offer sent by the remote peer has been applied and an answer has been created (usually by calling {{domxref("RTCPeerConnection.createAnswer()")}}) and applied by calling {{domxref("RTCPeerConnection.setLocalDescription()")}}. This provisional answer describes the supported media formats and so forth, but may not have a complete set of ICE candidates included. Further candidates will be delivered separately later.</td>
  </tr>
  <tr>
   <td><code>"have-remote-pranswer"</code></td>
   <td>A provisional answer has been received and successfully applied in response to an offer previously sent and established by calling <code>setLocalDescription()</code>.</td>
  </tr>
  <tr>
   <td><code>"closed"</code> {{obsolete_inline}}</td>
   <td>
    <p>The connection is closed.</p>

    <div class="note">
    <p>This value moved into the <a href="#RTCPeerConnectionState_enum"><code>RTCPeerConnectionState</code> enum</a> in the May 13, 2016 draft of the specification, as it reflects the state of the <code>RTCPeerConnection</code>, not the signaling connection. You now detect a closed connection by checking for {{domxref("RTCPeerConnection.connectionState", "connectionState")}} to be <code>"closed"</code> instead.</p>
    </div>
   </td>
  </tr>
 </tbody>
</table>

<h2 id="사양">사양</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">사양명</th>
   <th scope="col">상태</th>
   <th scope="col">설명</th>
  </tr>
  <tr>
   <td>{{SpecName('WebRTC 1.0', '#interface-definition', 'RTCPeerConnection')}}</td>
   <td>{{Spec2('WebRTC 1.0')}}</td>
   <td>초기 정의.</td>
  </tr>
 </tbody>
</table>

<h2 id="브라우저_호환성">브라우저 호환성</h2>

<div></div>

<div>{{Compat("api.RTCPeerConnection")}}</div>

<h2 id="참고">참고</h2>

<ul>
 <li><a href="https://github.com/jesup/nightly-gupshup/blob/master/static/js/chat.js">https://github.com/jesup/nightly-gupshup/blob/master/static/js/chat.js</a></li>
 <li><a href="http://www.html5rocks.com/en/tutorials/webrtc/basics/#toc-simple">http://www.html5rocks.com/en/tutorials/webrtc/basics/#toc-simple</a></li>
 <li><a href="https://github.com/chrisjohndigital/TutorRoom">TutorRoom</a>: Node.js HTML5 video capture, peer-to-peer video and filesharing application (<a href="https://github.com/chrisjohndigital/TutorRoom">source on GitHub</a>)</li>
</ul>