O'Reilly logo

Real-Time Communication with WebRTC by Simon Pietro Romano, Salvatore Loreto

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix A. WebRTC 1.0 APIs

This Appendix provides a summary of the W3C WebRTC APIs.

RTCPeerConnection API

An RTCPeerConnection allows two users to communicate directly, browser to browser.

Configuration

Table A-1. RTCConfiguration dictionary members
NameTypeDefaultDescription

iceServers

sequence<RTCIceServer>

An array containing URIs of servers available to be used by ICE, such as STUN and TURN servers.

iceTransports

RTCIceTransports

“all”

Indicates which candidates the ICE engine is allowed to use.

requestIdentity

RTCIdentityOption

“ifconfigured”

See the requestIdentity member of the RTCOfferAnswerOptions dictionary.

Table A-2. RTCIceServer dictionary members
NameTypeDescription

credential

DOMString

If this RTCIceServer object represents a TURN server, then this attribute specifies the credentials to use with that TURN server.

urls

(DOMString or sequence<DOMString>)

STUN or TURN URI(s) as defined in [STUN-URI] and [TURN-URI] or other URI types.

username

DOMString

If this RTCIceServer object represents a TURN server, then this attribute specifies the username to use with that TURN server.

Table A-3. RTCIceTransports enumeration values
ValueDescription

none

The ICE engine must not send or receive any packets at this point.

relay

The ICE engine must only use media relay candidates such as candidates passing through a TURN server. This can be used to reduce leakage of IP addresses in certain use cases.

all

The ICE engine may use any type of candidates when this value is specified.

Constructor

This is the RTCPeerConnection ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required