WebRTC API
WebRTC(Web Real-Time Communication)ì ì¹ ì í리ì¼ì´ì ê³¼ ì¬ì´í¸ê° ì¤ê°ì ìì´ ë¸ë¼ì°ì ê°ì ì¤ëì¤ë ìì 미ëì´ë¥¼ í¬ì°©íê³ ë§ìëë¡ ì¤í¸ë¦¼í ë¿ ìëë¼, ììì ë°ì´í°ë êµíí ì ìëë¡ íë 기ì ì ëë¤. WebRTC를 구ì±íë ì¼ë ¨ì íì¤ë¤ì íë¬ê·¸ì¸ì´ë ì 3ì ìíí¸ì¨ì´ ì¤ì¹ ìì´ ì¢ ë¨ ê° ë°ì´í° ê³µì ì íì íì를 ê°ë¥íê² í©ëë¤.
ì´ë¥¼ ìíì¬ WebRTCë ìí¸ ì°ê´ë APIì íë¡í ì½ë¡ 구ì±ëì´ í¨ê» ìëí©ëë¤. ì´ ë¬¸ìììë WebRTCì 기본ì ì´í´íê³ , ì¤ì íë©°, ë°ì´í°ì 미ëì´ ì°ê²°ì ìí´ ì¬ì©í ì ìê² ëìì¤ ê²ì ëë¤.
ìí¸ ì´ì©ì±
WebRTCì 구íì´ ê³ì ì§ííê³ ìì¼ë©° ê° ë¸ë¼ì°ì ë§ë¤ ë¤ë¥¸ ì½ë± ë° ê¸°í 미ëì´ ê¸°ë¥ì ëí ì§ì ìì¤ì´ ë¤ë¥´ê¸° ë문ì, ì½ë ìì±ì ììí기 ì ì Googleìì ì ê³µíë Adapter.js ë¼ì´ë¸ë¬ë¦¬ë¥¼ ì¬ì©íë ê²ì ê°ë ¥íê² ê³ ë ¤í´ë³´ìì¼í©ëë¤.
Adapter.jsë shim ë° polyfillì ì¬ì©íì¬ ë¤ìí íë«í¼ìì WebRTC 구í ê°ì ë¤ìí ì°¨ì´ì ì ìì ì¤ëë¤. ëí WebRTC ê°ë° íë¡ì¸ì¤ë¥¼ ì ì²´ì ì¼ë¡ ì½ê² ìí í ì ìëë¡ ì ëì¬ì ë¤ë¥¸ ì´ë¦ ì§ì ì ì°¨ì´ì ì ì²ë¦¬íë©°ë³´ë¤ ê´ë²ìíê² í¸íëë 결과를 ì ê³µí©ëë¤. ë¼ì´ë¸ë¬ë¦¬ë NPM í¨í¤ì§ë¡ë ì ê³µë©ëë¤.
Adapter.jsì ëí ìì¸í ë´ì©ì Improving compatibility using WebRTC adapter.js를 참조íììì¤.
WebRTC ê°ë ë° ì¬ì©ë²
WebRTCë ì¬ë¬ê°ì§ 목ì ì¼ë¡ ì¬ì©ë ì ìì¼ë©°, Media Capture and Streams API ì ìë¹í ë§ì ë¶ë¶ì´ ê²¹ì¹ë¤. ì´ ëì ìë¡ ìí¸ìì©ì íë©´ì ì¹ì ê°ë ¥í ë©í°ë¯¸ëì´ ê¸°ë¥ì ì ê³µíë¤. ì를ë¤ì´ ìì±, íì íì, íì¼ êµí, ~~ê³ì ê´ë¦¬~~, ~~DTMF ìê·¸ëì ì´ì©í´ legacy telephone ìì¤í interfacing~~ ë±ì´ ìë¤. í¼ì´ë¤ ê°ì 커ë¥ì ì´ ë§ë¤ì´ì§ëë° ì´ë¤ ëë¼ì´ë²ë íë¬ê·¸ì¸ë íìíì§ ìëë¤. ~~ê·¸ë¦¬ê³ ê°ëì ì¤ê° ìë² ìì´ë ë§ë¤ì´ì§ ì ìë¤.~~
ë í¼ì´ ê°ì 커ë¥ì
ì RTCPeerConnectionì¸í°íì´ì¤ë¥¼ íµí´ ì´ë£¨ì´ì§ë¤. 커ë¥ì
ì´ ì´ë£¨ì´ì§ê³ ì´ë¦¬ë©´, 미ëì´ ì¤í¸ë¦¼ë¤ (MediaStream) ê³¼ ë°ì´í° ì±ë(RTCDataChannel)ë¤ì 커ë¥ì
ì ì°ê²°í ì ìë¤.
미ëì´ ì¤í¸ë¦¼ë¤ì 미ëì´ ì 보를 ê°ì§ë ë¤ìì í¸ëë¤ë¡ 구ì±ë ì ìë¤. MediaStreamTrackì¸í°íì´ì¤ object를 ë² ì´ì¤ë¡ íë í¸ëì ìì±, ìì ë° í
ì¤í¸(ì 목 ëë ì±í° ì´ë¦ ì¡°ì°¨ë í¬í¨ ê°ë¥íë¤)를 í¬í¨íë ë¤ìí 미ëì´ ë°ì´í°ì íì
ì¤ íë를 í¬í¨ í ì ìë¤. ëë¶ë¶ì ì¤í¸ë¦¼ë¤ì ì ì´ë í ê° ì´ìì ìì±(ìì) í¸ëì¼ë¡ 구ì±ëì´ ìê³ , live 미ëì´(ì¹ ìº ë±)ë ì ì¥ë(ì¤í¸ë¦¬ë°) 미ëì´ë¤ì ì ì¡íê³ ë°ì ì ìë¤.
ëí, ììì ë°ì´ë리 ë°ì´í°(ì´ë¯¸ì§ë í
ì¤í¸ë íì¼ì´ë 모ë ê°ë¥íë¤ë ë»)를 RTCDataChannelì¸í°íì´ì¤ë¥¼ íµí´ í¼ì´ë¤ ê°ì êµíí ì ìë¤. ì´ê²ì ~~back-channel ì ë³´ë¤~~, ë©íë°ì´í° êµí, ê²ì status í¨í·ë¤, íì¼ êµí, ~~ë°ì´í° êµíì ìí primary channel~~ ë±ì ì°ì¼ ì ìë¤.
ë ìì¸í ë´ì©ì ë°ì guideì tutorialì 참조í길 ë°ëë¤
WebRTC ì¸í°íì´ì¤
WebRTCë ë¤ìí ìì ì ìíí기 ìí´ í¨ê» ëìíë ì¸í°íì´ì¤ë¥¼ ì ê³µí기ë문ì ìë 목ë¡ì ì¸í°íì´ì¤ë¤ì ì¹´í ê³ ë¦¬ë³ë¡ ëëìë¤. ìíë²³ ìì¼ë¡ ì 리ë 목ë¡ì ì¬ì´ë ë°ë¥¼ 참조íë¼.
ì°ê²° ì¤ì ë° ê´ë¦¬
ì´ ì¸í°íì´ì¤ë¤ì ì¬ì©íì¬ WebRTC ì°ê²°ì ì¤ì í ì ìê³ , ì°ê²°ì 맺ì ì ìì¼ë©° WebRTC ì°ê²°ì ê´ë¦¬í ì ìë¤.
RTCPeerConnection-
ë¡ì»¬ ì»´í¨í°ì ì격 í¼ì´ ê°ì WebRTC ì°ê²°ì ëíë¸ë¤. ë í¼ì´ ê°ì í¨ì¨ì ì¸ ë°ì´í° ì¤í¸ë¦¬ë°ì ì²ë¦¬íëë° ì¬ì©ëë¤.
RTCDataChannel-
ì°ê²°ë ë í¼ì´ê°ì ìë°©í¥ ë°ì´í° ì±ëì ëíë¸ë¤.
RTCDataChannelEvent-
RTCDataChannelìRTCPeerConnectionì ì°ê²°íë ëì ë°ìíë ì´ë²¤í¸ë¥¼ ëíë¸ë¤. ì´ ì¸í°íì´ì¤ì í¨ê» ì ì¡ëë ì ì¼í ì´ë²¤í¸ëdatachannelì´ë¤. RTCSessionDescription-
ì¸ì ì ë§¤ê° ë³ì를 ëíë ëë¤. ê°
RTCSessionDescriptionë ì¸ì ì SDP 기ì ì(descriptor)ì 기ì ì ì / ìëµ íì ê³¼ì ì ì¼ë¶ë¥¼ ëíë´ë ì¤ëªtypeì¼ë¡ 구ì±ëì´ ììµëë¤. RTCStatsReport-
ì°ê²° ëë ì°ê²°ì ê°ë³ í¸ëì ëí íµê³ë¥¼ ìì¸í ì¤ëª íë ì 보를 ì ê³µí©ëë¤.
RTCPeerConnection.getStats()를 í¸ì¶íì¬ ë³´ê³ ì를 ì»ì ì ììµëë¤. RTCIceCandidate-
RTCPeerConnectionì¤ì ì ìí íë³´ ì¸í°ë· ì°ê²° ì¤ì (ICE; internet connectivity establishment) ìë²ë¥¼ ëíë ëë¤. RTCIceTransport-
ì¸í°ë· ì°ê²° ì¤ì (ICE) ì ì¡ì ëí ì 보를 ëíë ëë¤.
RTCPeerConnectionIceEvent-
ëìì´ìë ICE íë³´ì ê´ë ¨íì¬ ë°ìíë ì´ë²¤í¸ (ì¼ë°ì ì¼ë¡
RTCPeerConnection)를 ëíë ëë¤.icecandidateì íì ì´ë²¤í¸ ë§ ììµëë¤. RTCRtpSender-
RTCPeerConnectionììMediaStreamTrackì ë°ì´í° ì¸ì½ë© ë° ì ì¡ì ê´ë¦¬í©ëë¤. RTCRtpReceiver-
RTCPeerConnectionììMediaStreamTrackì ë°ì´í° ìì ë° ëì½ë©ì ê´ë¦¬í©ëë¤. RTCTrackEvent-
ìë¡ê² ìì ë
MediaStreamTrackì´ ìì±ëê³ ê´ë ¨RTCRtpReceiverê°ì²´ê°RTCPeerConnectionê°ì²´ì ì¶ê°ëììì ëíë ëë¤. RTCSctpTransport-
ì¤í¸ë¦¼ ì ì´ ì ì¡ íë¡í ì½(Stream Control Transmission Protocol, SCTP) ì ì¡ì ì¤ëª íë ì 보를 ì ê³µíê³ , 모ë
RTCPeerConnectionë°ì´í° ì±ëì ëí SCTP í¨í·ì´ ì¡ìì ëë 기본 ë°ì´í°ê·¸ë¨ ì ì¡ ë³´ì ê³ì¸µ íë¡í ì½(Datagram Transport Layer Security, DTLS) ì ì¡ì ì ê·¼í기 ìí ë°©ë²ì ì ê³µí©ëë¤.
Dictionaries
RTCConfiguration-
RTCPeerConnectionêµ¬ì± ìµì ì ì ê³µíëë° ì¬ì©ë©ëë¤. RTCIceServer-
Defines how to connect to a single ICE server (such as a STUN or TURN server).
RTCRtpContributingSource-
Contains information about a given contributing source (CSRC) including the most recent time a packet that the source contributed was played out.
Types
RTCSctpTransportState-
Indicates the state of an
RTCSctpTransportinstance. RTCSessionDescriptionCallback-
The RTCSessionDescriptionCallback is passed into the
RTCPeerConnectionobject when requesting it to create offers or answers.
ìë³ìì ë³´ì
WebRTC APIìë ë³´ì ë° ìë³ì를 ê´ë¦¬í기ìí ì¬ë¬ ì¸í°íì´ì¤ê° í¬í¨ëì´ ììµëë¤.
RTCIdentityProvider-
ì¬ì©ì ìì´ì í¸ê° Identity Assertionì ìì± ëë ê²ì¦ì ìì²í ì ìëë¡í©ëë¤.
RTCIdentityAssertion-
Represents the identity of the a remote peer of the current connection. If no peer has yet been set and verified this interface returns
null. Once set it can't be changed. RTCIdentityProviderRegistrar-
ìë³ì ê³µê¸ì(idP; identity provider)를 ì ê³µí©ëë¤.
RTCCertificate-
Represents a certificate that an
RTCPeerConnectionuses to authenticate.
Telephony
ì´ë¬í ì¸í°íì´ì¤ë¤ì ê³µì¤ ì íë§ (PTSN; public-switched telephone networks)ê³¼ì ìí¸ ìì©ê³¼ ê´ë ¨ì´ ììµëë¤
RTCDTMFSender-
Manages the encoding and transmission of dual-tone multi-frequency (DTMF) signaling for an
RTCPeerConnection. RTCDTMFToneChangeEvent-
Indicates an occurrence of a of dual-tone multi-frequency (DTMF). This event does not bubble (except where otherwise stated) and is not cancelable (except where otherwise stated).
Guides
- Introduction to WebRTC protocols
-
ì´ ë¬¸ìë WebRTC APIê° êµ¬ì¶ë 기ë°ì´ ëë íë¡í ì½ì ìê°íë¤.
- WebRTC connectivity
-
WebRTC 커ë¥ì ì ìë ë°©ì ë° ë¤ìí íë¡í ì½ê³¼ ì¸í°íì´ì¤ë¥¼ í¨ê» ì¬ì©íì¬ ê°ë ¥í 커뮤ëì¼ì´ì ì±ì ë§ëë ë°©ë²ì ëí ê°ì´ëì´ë¤.
- Lifetime of a WebRTC session
-
WebRTCë ìì ë°ì´í°, ì¤ëì¤, ë¹ëì¤ ëë ì´ë¤ì 모ë ì¡°í©ì ëí í¼ì´ í¬ í¼ì´ 커뮤ëì¼ì´ì ì ë¸ë¼ì°ì ì´í리ì¼ì´ì ì¼ë¡ 구ì¶íëë¡ í´ì¤ë¤. ì´ ë¬¸ìììë, 모ë ë°©ë²ì¼ë¡ 커ë¥ì ì ì¤ì íë ê²ìì ë¶í° ë ì´ì íìíì§ ìì ë 커ë¥ì ì ë«ë ê²ê¹ì§ WebRTC ì¸ì ì ìëª ì ëí´ ì´í´ë³¼ ê²ì´ë¤.
- Signaling and two-way video calling
-
ì¬ë¬ ì¬ì©ìë¤ ê°ì íìíµí를 í ì ìë Websocketì 기ë°ì¼ë¡í íí ë¦¬ì¼ ë° ìì ì´ë¤. ì±í ìë²ì ì¹ìì¼ ì»¤ë¥ì ì WebRTCì ìê·¸ëë§ì ìí´ ì¬ì©ëë¤.
- Codecs used by WebRTC
-
A guide to the codecs which WebRTC requires browsers to support as well as the optional ones supported by various popular browsers. Included is a guide to help you choose the best codecs for your needs.
- Using WebRTC data channels
-
ì´ ê°ì´ëë ë í¼ì´ ì¬ì´ì ììì ë°ì´í°ë¥¼ êµíí기 ìí´ í¼ì´ 커ë¥ì ì ê´ë ¨ë
RTCDataChannelì ì¬ì©í ì ìë ë°©ë²ì ë¤ë£¬ë¤. - Using DTMF with WebRTC
-
구ì ì í ìì¤í ì ì°ê²°ëë ê²ì´í¸ì¨ì´ì ìí¸ ìì©í기 ìí WebRTCì ì§ììë
RTCDTMFSenderì¸í°íì´ì¤ë¥¼ ì¬ì©íì¬ DTMF í¤ì ë³´ë´ë 기ë¥ì´ í¬í¨ëë¤. ì´ ê°ì´ëë ì´ë»ê² ê·¸ë ê² íëì§ ë³´ì¬ì¤ë¤.
Tutorials
- Improving compatibility using WebRTC adapter.js
-
The WebRTC organization provides on GitHub the WebRTC adapter to work around compatibility issues in different browsers' WebRTC implementations. The adapter is a JavaScript shim which lets your code to be written to the specification so that it will "just work" in all browsers with WebRTC support.
- Taking still photos with WebRTC
-
This article shows how to use WebRTC to access the camera on a computer or mobile phone with WebRTC support and take a photo with it.
- A simple RTCDataChannel sample
-
The
RTCDataChannelinterface is a feature which lets you open a channel between two peers over which you may send and receive arbitrary data. The API is intentionally similar to the WebSocket API, so that the same programming model can be used for each.
Resources
>Protocols
WebRTC-proper protocols
- Application Layer Protocol Negotiation for Web Real-Time Communications
- WebRTC Audio Codec and Processing Requirements
- RTCWeb Data Channels
- RTCWeb Data Channel Protocol
- Web Real-Time Communication (WebRTC): Media Transport and Use of RTP
- WebRTC Security Architecture
- Transports for RTCWEB
Related supporting protocols
- Interactive Connectivity Establishment (ICE): A Protocol for Network Address Translator (NAT) Traversal for Offer/Answer Protocol
- Session Traversal Utilities for NAT (STUN)
- URI Scheme for the Session Traversal Utilities for NAT (STUN) Protocol
- Traversal Using Relays around NAT (TURN) Uniform Resource Identifiers
- An Offer/Answer Model with Session Description Protocol (SDP)
- Session Traversal Utilities for NAT (STUN) Extension for Third Party Authorization
ëª ì¸ì
| Specification |
|---|
| WebRTC: Real-Time Communication in Browsers > |
| Media Capture and Streams > |
| Media Capture from DOM Elements > |
In additions to these specifications defining the API needed to use WebRTC, there are several protocols, listed under resources.