aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/rtcconfiguration/index.html
blob: bc578aaf53bfde6cab7c9d9fa91924034ba9a7c6 (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
---
title: RTCConfiguration
slug: Web/API/RTCConfiguration
tags:
  - API
  - Dictionary
  - Interface
  - RTCConfiguration
  - WebRTC
translation_of: Web/API/RTCConfiguration
---
<p>{{APIRef("WebRTC")}}{{draft}}</p>

<p><strong><code>RTCConfiguration</code></strong>는 {{domxref("RTCPeerConnection")}}의 설정에 대한 옵션들을 제공합니다. 연결이 처음으로 이루어질 때 {{domxref("RTCPeerConnection")}} 생성자에 전달되거나, 연결이 확립된 동안 설정을 확인하고 변경이 가능한{{domxref("RTCPeerConnection.getConfiguration()")}} 및 {{domxref("RTCPeerConnection.setConfiguration()")}} 메소드와 같이 사용됩니다.</p>

<p>옵션은 ICE 서버, 전달 셋팅, 그리고 identity 정보를 포함합니다.</p>

<h2 id="속성">속성</h2>

<dl>
 <dt>{{domxref("RTCConfiguration.bundlePolicy", "bundlePolicy")}} {{optional_inline}}</dt>
 <dd>원격 피어가 <a href="https://webrtcstandards.info/sdp-bundle/">SDP BUNDLE standard</a>에 호환이 불가능할 때, 어떻게 candidate의 네고시에이션을 처리 할 것인지를 정의합니다. 이 옵션은 무조건 enum <code><a href="#RTCBundlePolicy_enum">RTCBundlePolicy</a></code>의 값들 중 하나여야만 합니다. 만약 이 값이 딕셔너리에 없으면, <code>"balanced"</code> 으로 지정됩니다.</dd>
 <dt>{{domxref("RTCConfiguration.certificates", "certificates")}} {{optional_inline}}</dt>
 <dd>인증을 위해 연결에서 사용되는 {{domxref("RTCCertificate")}} 타입의 객체의 {{jsxref("Array")}} 입니다. 이 속성이 정의되어있지 않으면, 각 {{domxref("RTCPeerConnection")}} 인스턴스별로 자동으로 인증서 모음이 생성됩니다. 하나의 연결에는 오직 한개의 인증서만 사용이 되지만, 여러 알고리즘들에 대해 다수의 인증서를 제공하는 방법으로 어떤 상황에서 우연치 않게 연결이 성공되는 경우를 줄일 수 있습니다. 아래는 {{anch("Using certificates")}}에 대한 추가 정보입니다.
 <div class="note">이 설정 옵션은 한 번 정의되면 변경이 불가능합니다. 한 번 인증서가 지정되면, 그 후 발생하는 {{domxref("RTCPeerConnection.setConfiguration()")}} 호출에서 이 속성이 무시됩니다.</div>
 </dd>
 <dt>{{domxref("RTCConfiguration.iceCandidatePoolSize", "iceCandidatePoolSize")}} {{optional_inline}}</dt>
 <dd>미리 가져와진 ICE candidate pool의 크기를 정의하는 서명되지 않은 16-bit 정수 값. 기본 값은 0으로 candidate를 미리 가져오는 것이 발생하지 않음을 뜻함. 연결 시도를 시작하기전에 ICE 에이전트가 ICE candidates를 미리 가져오게 허용하면, candidate들은  {{domxref("RTCPeerConnection.setLocalDescription()")}} 호출로 이미 확인이 가능하게 되고, 이로 인해 몇몇 상황에서 연결이 더 빠르게 성립됩니다.
 <div class="note">ICE candidate pool의 크기 변경은 ICE 수집을 시작하게 만들 수 있습니다.</div>
 </dd>
 <dt>{{domxref("RTCConfiguration.iceServers", "iceServers")}} {{optional_inline}}</dt>
 <dd>ICE 에이전트에 의해 이용될 수 있는 하나의 서버를 설명하는 {{domxref("RTCIceServer")}} 객체의 배열. 일반적으로 STUN 혹은 TURN 서버들입니다. 이 옵션이 정의가 안되어있으면, ICE 에이전트는 자체 ICE 서버를 선택하여 사용 할 수 있습니다. 자체 서버가 없다면, 연결은 사용 가능한 STUN 혹은 TURN 서버 없이 진행되고, 이는 로컬 피어와의 연결을 제한합니다. </dd>
 <dt>{{domxref("RTCConfiguration.iceTransportPolicy", "iceTransportPolicy")}} {{optional_inline}}</dt>
 <dd>현재 ICE 전송 정책; 이는 <code><a href="#RTCIceTransportPolicy_enum">RTCIceTransportPolicy</a></code> enum에 존재하는 값입니다. 이 옵션이 정의가 안되어있으면, <code>"all"</code>로 설정됩니다.</dd>
 <dt>{{domxref("RTCConfiguration.peerIdentity", "peerIdentity")}} {{optional_inline}}</dt>
 <dd>{{domxref("RTCPeerConnection")}}에 대한 타겟 피어 identity를 명시하는 {{domxref("DOMString")}}. 이 값이 지정되어있으면, <code>RTCPeerConnection</code>은 주어진 이름으로 인증이 성공하지 않는 이상 원격 피어와 연결하지 않습니다. (기본 값은 <code>null</code> 입니다.) </dd>
 <dt>{{domxref("RTCConfiguration.rtcpMuxPolicy", "rtcpMuxPolicy")}} {{optional_inline}}</dt>
 <dd>non-multiplexed RTCP를 지원하기 위해, ICE candidate를 수집 할 때 사용되는 RTCP mux 정책. 이 값은 <a href="#RTCRtcpMuxPolicy_enum"><code>RTCRtcpMuxPolicy</code> enum</a>.에 존재하는 값입니다. 기본 값은 <code>"require"</code>입니다.</dd>
</dl>

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

<p>{{page("/en-US/docs/Web/API/RTCPeerConnection", "RTCBundlePolicy enum", 0, 1)}}</p>

<p>{{page("/en-US/docs/Web/API/RTCPeerConnection", "RTCIceTransportPolicy enum", 0, 1)}}</p>

<p>{{page("/en-US/docs/Web/API/RTCPeerConnection", "RTCRtcpMuxPolicy enum", 0, 1)}}</p>

<h2 id="인증서_사용하기">인증서 사용하기</h2>

<p><code>RTCPeerConnection</code>가 자동으로 생성하는 인증서 대신에, 사용자가 직접 {{domxref("RTCPeerConnection")}}을 위한 자체 인증서를 만들기를 원한다면 {{domxref("RTCPeerConnection.generateCertificate()")}} 호출 합니다. </p>

<p>이 속성은 다중 인증서 제공을 지원합니다. 이는 주어진 DTLS 연결이 오직 하나의 인증서를 사용한다해도, 다중 인증서는 여러개의 암호화 알고리즘 지원을 허용하기 때문입니다. <code>RTCPeerConnection</code>의 구현은 DTLS 합의 중 결정된 알고리즘 및 원격 피어에 근거해서 어떤 인증서를 사용 할지 선택합니다.</p>

<p>인증서를 제공하지 않으면, 신규 인증서가 자동으로 생성이 됩니다. 사용자 자체의 identity 키를 제공하는 것의 한 가지 명백한 장점은 연속성입니다. 동일한 인증서를 이후 호출에도 사용하게되면, 원격 피어는 사용자가 같은 caller인지 알 수 있습니다. 또한, 새로운 인증키를 발급하지 않아도 됩니다. </p>

<p>&lt;&lt;&lt;link to added info on identity&gt;&gt;&gt;</p>

<h2 id="예시">예시</h2>

<p>아래 설정은 두개의 ICE 서버를 구축합니다. 첫 번째 서버, <code>stun:stun.services.mozilla.com</code>는 인증을 요구하기 때문에 유저 이름과 비밀번호를 제공합니다. 두 번째 서버는 두 개의 URL 주소가 있습니다: <code>stun:stun.example.com</code><code>stun:stun-1.example.com</code>입니다.</p>

<pre class="brush: js">var configuration = { iceServers: [{
                          urls: "stun:stun.services.mozilla.com",
                          username: "louis@mozilla.com",
                          credential: "webrtcdemo"
                      }, {
                          urls: ["stun:stun.example.com", "stun:stun-1.example.com"]
                      }]
};

var pc = new RTCPeerConnection(configuration);</pre>

<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('WebRTC 1.0','#dom-rtcconfiguration','RTCConfiguration')}}</td>
   <td>{{Spec2('WebRTC 1.0')}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

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

<div>


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