aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/api/rtcpeerconnection/localdescription/index.html
blob: 0525c9f0ebb730b9710d64d9b91e89ad5e36f9bf (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
---
title: RTCPeerConnection.localDescription
slug: Web/API/RTCPeerConnection/localDescription
translation_of: Web/API/RTCPeerConnection/localDescription
---
<p>{{WebRTCSidebar}}{{SeeCompatTable}}</p>

<p>읽기 속성인 <code><strong>RTCPeerConnection.localDescription</strong></code>는 연결의 로컬 엔드에 대한 세션을 설명하는 {{domxref("RTCSessionDescription")}}를 반환합니다. 아직 설정이 안되어있다면, <strong>null</strong> 입니다.</p>

<h2 id="Syntax">Syntax</h2>

<pre class="syntaxbox"> var <em>sessionDescription</em> = <em>peerConnection</em>.localDescription;</pre>

<p>기본적으로 반환 값은 해당 속성이 <code>null</code>이 아닐 때에만 {{domxref("RTCPeerConnection.pendingLocalDescription")}}의 값입니다. 그렇지 않은 경우에는 {{domxref("RTCPeerConnection.currentLocalDescription")}}의 값이 반환됩니다. 이 알고리즘 및 사용하는 이유에 대한 자세한 설명은 {{SectionOnPage("/en-US/docs/Web/API/WebRTC_API/Connectivity", "Pending and current descriptions")}}를 참조하십시오.</p>

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

<p>아래의 예시에서는 <code>localDescription</code>를 확인하고, {{domxref("RTCSessionDescription")}} 객체의 타입과 sdp필드를 담고있는 경고를 띄웁니다.</p>

<pre class="brush: js">var pc = new RTCPeerConnection();
…
var sd = pc.localDescription;
if (sd) {
  alert("Local session: type='" +
        sd.type + "'; sdp description='" +
        sd.sdp + "'");
}
else {
  alert("No local session yet.");
}
</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-localDescription', 'RTCPeerConnection.localDescription') }}</td>
   <td>{{ Spec2('WebRTC 1.0') }}</td>
   <td>Initial specification.</td>
  </tr>
 </tbody>
</table>

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



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

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

<ul>
 <li>{{domxref("RTCPeerConnection.setLocalDescription()")}}, {{domxref("RTCPeerConnection.pendingLocalDescription")}}, {{domxref("RTCPeerConnection.currentLocalDescription")}}</li>
 <li>{{domxref("RTCPeerConnection.setRemoteDescription()")}}, {{domxref("RTCPeerConnection.remoteDescription")}}, {{domxref("RTCPeerConnection.pendingRemoteDescription")}}, {{domxref("RTCPeerConnection.currentRemoteDescription")}}</li>
 <li><a href="/en-US/docs/Web/Guide/API/WebRTC">WebRTC</a></li>
</ul>