aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/rtcpeerconnection/onconnectionstatechange/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ko/web/api/rtcpeerconnection/onconnectionstatechange/index.html')
-rw-r--r--files/ko/web/api/rtcpeerconnection/onconnectionstatechange/index.html65
1 files changed, 65 insertions, 0 deletions
diff --git a/files/ko/web/api/rtcpeerconnection/onconnectionstatechange/index.html b/files/ko/web/api/rtcpeerconnection/onconnectionstatechange/index.html
new file mode 100644
index 0000000000..5505f509eb
--- /dev/null
+++ b/files/ko/web/api/rtcpeerconnection/onconnectionstatechange/index.html
@@ -0,0 +1,65 @@
+---
+title: RTCPeerConnection.onconnectionstatechange
+slug: Web/API/RTCPeerConnection/onconnectionstatechange
+translation_of: Web/API/RTCPeerConnection/onconnectionstatechange
+---
+<p>{{APIRef("WebRTC")}}</p>
+
+<p><span class="seoSummary"><strong><code>RTCPeerConnection.onconnectionstatechange</code></strong> 속성에 {{domxref("RTCPeerConnection")}} 인스턴스에서 발생하는 {{event("connectionstatechange")}} 이벤트를 처리하기 위해 호출되는 {{domxref("EventHandler")}}를 정의하게됩니다. 이 이벤트는  연결의 상태 집합체가 변할 때마다 발생합니다. 이 상태 집합체는 연결에 의해 사용되는 각각의 네트워크 전송 상태들의 묶음입니다.</span></p>
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="syntaxbox"><em>RTCPeerConnection</em>.onconnectionstatechange = <em>eventHandler</em>;
+</pre>
+
+<h3 id="값">값</h3>
+
+<p>{{domxref("RTCPeerConnection")}}에서 {{event("connectionstatechange")}} 이벤트가 생길 때, 브라우저에 의해 호출되는 함수입니다. 이 함수는 {{domxref("Event")}} 타입의 객체인 단일 패러미터를 입력인자로 받습니다. 해당 이벤트 객체는 특별한 정보를 담고 있지는 않습니다. 새로운 상태를 확인하려면 피어 연결의 {{domxref("RTCPeerConnection.connectionState", "connectionState")}}에 해당하는 값을 살펴보십시오. </p>
+
+<h2 id="예시">예시</h2>
+
+<pre class="brush: js">pc.onconnectionstatechange = function(event) {
+ switch(pc.connectionState) {
+ case "connected":
+ // The connection has become fully connected
+ break;
+ case "disconnected":
+ case "failed":
+ // One or more transports has terminated unexpectedly or in an error
+ break;
+ case "closed":
+ // The connection has been closed
+ break;
+ }
+}</pre>
+
+<h2 id="명세">명세</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">명세</th>
+ <th scope="col">상태</th>
+ <th scope="col">코멘트</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{ SpecName('WebRTC 1.0', '#widl-RTCPeerConnection-onconnectionstatechange', 'RTCPeerConnection.onconnectionstatechange') }}</td>
+ <td>{{ Spec2('WebRTC 1.0') }}</td>
+ <td>Initial specification.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="브라우저_호환성">브라우저 호환성</h2>
+
+
+
+<p>{{Compat("api.RTCPeerConnection.onconnectionstatechange")}}</p>
+
+<h2 id="참조">참조</h2>
+
+<ul>
+ <li>{{event("connectionstatechange")}} 이벤트와 이 이벤트의 타입인 {{domxref("Event")}}을 참조하십시오.</li>
+</ul>