aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/rtcpeerconnection/getconfiguration/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/ko/web/api/rtcpeerconnection/getconfiguration/index.html')
-rw-r--r--files/ko/web/api/rtcpeerconnection/getconfiguration/index.html78
1 files changed, 78 insertions, 0 deletions
diff --git a/files/ko/web/api/rtcpeerconnection/getconfiguration/index.html b/files/ko/web/api/rtcpeerconnection/getconfiguration/index.html
new file mode 100644
index 0000000000..c2d278cf1a
--- /dev/null
+++ b/files/ko/web/api/rtcpeerconnection/getconfiguration/index.html
@@ -0,0 +1,78 @@
+---
+title: RTCPeerConnection.getConfiguration()
+slug: Web/API/RTCPeerConnection/getConfiguration
+translation_of: Web/API/RTCPeerConnection/getConfiguration
+---
+<p>{{APIRef("WebRTC")}}{{SeeCompatTable}}</p>
+
+<p><strong><code>RTCPeerConnection.getConfiguration()</code></strong> 메소드는 호출 된 {{domxref("RTCPeerConnection")}}의 현재 설정을 알려주는 {{domxref("RTCConfiguration")}} 객체를 반환합니다.</p>
+
+<p>여기서 반환되는 설정 값 은 가장 최근에 적용했던 {{domxref("RTCPeerConnection.setConfiguration","setConfiguration()")}} 혹은 <code>setConfiguration()</code>가 호출 되지 않았다면, <code>RTCPeerConnection</code>가 구성되면서 생긴 설정입니다. 이 설정은 연결에 의해 사용되는 ICE 서버의 리스트, 전송 정책에 관한 정보, 그리고 식별 정보를 포함합니다. </p>
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="syntaxbox">var <em>configuration</em> = <em>RTCPeerConnection</em>.getConfiguration();</pre>
+
+<h3 class="syntaxbox" id="매개변수">매개변수</h3>
+
+<p>이 메소드는 입력 변수를 받지 않습니다.</p>
+
+<h3 id="반환_값">반환 값</h3>
+
+<p>{{domxref("RTCPeerConnection")}}의 현재 설정을 알려주는 {{domxref("RTCConfiguration")}} 객체입니다.</p>
+
+<h2 id="예시">예시</h2>
+
+<p>아래의 예제는 활성화된 연결에서 이미 사용 중인 인증서가 없다면, 신규 인증서를 추가하는 작업입니다.</p>
+
+<pre class="brush: js">let configuration = myPeerConnection.getConfiguration();
+
+if ((configuration.certificates != undefined) &amp;&amp; (!configuration.certificates.length)) {
+   RTCPeerConnection.generateCertificate({
+      name: 'RSASSA-PKCS1-v1_5',
+      hash: 'SHA-256',
+      modulusLength: 2048,
+      publicExponent: new Uint8Array([1, 0, 1])
+  }).then(function(cert) {
+ configuration.certificates = [cert];
+    myPeerConnection.setConfiguration(configuration);
+  });
+}
+</pre>
+
+<p>위의 예제에서는 {{domxref("RTCPeerConnection")}}의 현재 설정을 가져 온 다음에, 인증서가 존재하는지 확인하기 위해 (1) 설정에 <code>certificates</code>값이 포함되어 있는지, (2) 길이가 0인지를 확인합니다.</p>
+
+<p>만약 인증서가 존재하지 않으면, {{domxref("RTCPeerConnection.generateCertificate()")}}가 호출되어 신규 인증서를 만들어냅니다. 여기에 fulfillment 핸들러를 제공해서 새로 만들어진 인증서를 포함하는 배열을 현재 설정에 추가하고, {{domxref("RTCPeerConnect.setConfiguration", "setConfiguration()")}}에 전달해서 연결에 인증서를 추가합니다.</p>
+
+<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', '#widl-RTCPeerConnection-getConfiguration-RTCConfiguration', 'getConfiguration()')}}</td>
+ <td>{{Spec2('WebRTC 1.0')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="브라우저_호환성">브라우저 호환성</h2>
+
+<div>
+
+
+<p>{{Compat("api.RTCPeerConnection.getConfiguration")}}</p>
+</div>
+
+<h2 id="참조">참조</h2>
+
+<ul>
+ <li>{{domxref("RTCPeerConnection.setConfiguration()")}}</li>
+ <li>{{domxref("RTCConfiguration")}}</li>
+ <li>{{domxref("RTCPeerConnection")}}</li>
+</ul>