RTCPeerConnection.localDescription
Baseline
Widely available
This feature is well established and works across many devices and browser versions. Itâs been available across browsers since 2017ë 9ì.
Experimental: ì´ ê¸°ë¥ì ì¤íì ì¸ ê¸°ë¥ì
ëë¤.
íë¡ëì
íê²½ìì ì¬ì©í기 ì ì ë¸ë¼ì°ì í¸íì± í를 주ì ê¹ê² íì¸íì¸ì.
ì½ê¸° ìì±ì¸ RTCPeerConnection.localDescriptionë ì°ê²°ì ë¡ì»¬ ìëì ëí ì¸ì
ì ì¤ëª
íë RTCSessionDescription를 ë°íí©ëë¤. ìì§ ì¤ì ì´ ìëì´ìë¤ë©´, null ì
ëë¤.
Syntax
const sessionDescription = peerConnection.localDescription;
기본ì ì¼ë¡ ë°í ê°ì í´ë¹ ìì±ì´ nullì´ ìë ëìë§ RTCPeerConnection.pendingLocalDescriptionì ê°ì
ëë¤. ê·¸ë ì§ ìì ê²½ì°ìë RTCPeerConnection.currentLocalDescriptionì ê°ì´ ë°íë©ëë¤. ì´ ìê³ ë¦¬ì¦ ë° ì¬ì©íë ì´ì ì ëí ìì¸í ì¤ëª
ì Pending and current descriptions를 참조íììì¤.
ìì
ìëì ììììë localDescription를 íì¸íê³ , RTCSessionDescription ê°ì²´ì íì
ê³¼ sdpíë를 ë´ê³ ìë ê²½ê³ ë¥¼ ëìëë¤.
const pc = new RTCPeerConnection();
// ...
const sd = pc.localDescription;
if (sd) {
alert(`Local session: type='${sd.type}'; sdp description='${sd.sdp}'`);
} else {
alert("No local session yet.");
}
ëª ì¸ì
| Specification |
|---|
| WebRTC: Real-Time Communication in Browsers > # dom-peerconnection-localdescription > |