aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/rtcpeerconnection/onicegatheringstatechange/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ko/web/api/rtcpeerconnection/onicegatheringstatechange/index.html')
-rw-r--r--files/ko/web/api/rtcpeerconnection/onicegatheringstatechange/index.html76
1 files changed, 76 insertions, 0 deletions
diff --git a/files/ko/web/api/rtcpeerconnection/onicegatheringstatechange/index.html b/files/ko/web/api/rtcpeerconnection/onicegatheringstatechange/index.html
new file mode 100644
index 0000000000..8e3e375efb
--- /dev/null
+++ b/files/ko/web/api/rtcpeerconnection/onicegatheringstatechange/index.html
@@ -0,0 +1,76 @@
+---
+title: RTCPeerConnection.onicegatheringstatechange
+slug: Web/API/RTCPeerConnection/onicegatheringstatechange
+translation_of: Web/API/RTCPeerConnection/onicegatheringstatechange
+---
+<p>{{APIRef("WebRTC")}}{{SeeCompatTable}}</p>
+
+<p><code><strong>RTCPeerConnection.onicegatheringstatechange</strong></code>속성은 {{event("icegatheringstatechange")}} 이벤트가 {{domxref("RTCPeerConnection")}}에 전달될 때 호출이되는 함수를 정의하는 {{domxref("EventHandler")}}입니다. 이이벤트는 ICE 에이전트가 ICE candidate를 수집을 하는지의 여부를 알려주는 ICE 수집 상태가 변하면 발생합니다. 하지만, ICE 수집 상태를 모니터링 해야하는 특별한 이유가 없으면 이 이벤트를 감시 할 필요는 없습니다.</p>
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="syntaxbox"><em>RTCPeerConnection</em>.onicegatheringstatechange = <em>eventHandler</em>;
+</pre>
+
+<h3 id="값">값</h3>
+
+<p>{{event("icegatheringstatechange")}} 이벤트를 가진 {{domxref("Event")}} 객체를 단일 패러미터로 전달하는 함수를 제공합니다. {{domxref("RTCPeerConnection.iceGatheringState")}} 속성의 값 확인을 통해 ICE 수집 상태를 새로운 값으로 변경이 가능합니다.</p>
+
+<h2 id="예시">예시</h2>
+
+<p>아래의 예제는 {{domxref("RTCPeerConnection.iceGatheringState", "iceGatheringState")}} 속성 값이 변할 때마다 현재 값을 확인하고, 수집 상태 변화에 맞추어 표시될 상태 내용을 업데이트해서 유저에게 알려줍니다.  </p>
+
+<p>이 상태는 {{HTMLElement("div")}} 요소에 텍스트로 표시됩니다.</p>
+
+<pre class="brush: html">&lt;div id="iceStatus"&gt;&lt;/div&gt;
+</pre>
+
+<p>예제에 사용된 이벤트 핸들러는 아래와 같습니다:</p>
+
+<pre class="brush: js">pc.onicegatheringstatechange = function() {
+ let label = "Unknown";
+
+ switch(pc.iceGatheringState) {
+ case "new":
+ case "complete":
+ label = "Idle";
+ break;
+ case "gathering":
+ label = "Determining route";
+ break;
+ }
+ // HTML에서 id가 "iceStatus"인 요소에 label 값을 지정
+ document.getElementById("iceStatus").innerHTML = label;
+}</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-onicegatheringstatechange', 'RTCPeerConnection.onicegatheringstatechange') }}</td>
+ <td>{{ Spec2('WebRTC 1.0') }}</td>
+ <td>Initial specification.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="브라우저_호환성">브라우저 호환성</h2>
+
+
+
+<p>{{Compat("api.RTCPeerConnection.onicegatheringstatechange")}}</p>
+
+<h2 id="참조">참조</h2>
+
+<ul>
+ <li>The {{event("icegatheringstatechange")}} event and its type, {{domxref("Event")}}.</li>
+ <li>{{domxref("RTCPeerConnection.iceGatheringState")}}</li>
+</ul>