RTCFactory
#
MethodscreatePeerConnection
: Creates a newRTCPeerConnection
object with the specifiedRTCConfiguration
.
RTCPeerConnection pc = await createPeerConnection({ 'iceServers': [ {'urls': 'stun:stun.l.google.com:19302'}, ]});
createLocalMediaStream
: Creates a newMediaStream
object with the specifiedlable
.
MediaStream stream = factory.createLocalMediaStream('new_stream_label');
getRtpSenderCapabilities
: Returns aRTCRtpCapabilities
object that represents the capabilities of the sender for the givenkind
.
RTCRtpCapabilities capabilities = getRtpSenderCapabilities('video'); // or 'audio'
getRtpReceiverCapabilities
: Returns aRTCRtpCapabilities
object that represents the capabilities of the receiver for the givenkind
.
RTCRtpCapabilities capabilities = getRtpReceiverCapabilities('video'); // or 'audio'
#
PropertiesframeCryptorFactory
: Returns aFrameCryptorFactory
object for End to End Encryption.