RTCDataChannel extension type
The RTCDataChannel interface represents a network channel which can be
used for bidirectional peer-to-peer transfers of arbitrary data. Every data
channel is associated with an RTCPeerConnection, and each peer connection
can have up to a theoretical maximum of 65,534 data channels (the actual
limit may vary from browser to browser).
To create a data channel and ask a remote peer to join you, call the
RTCPeerConnection's RTCPeerConnection.createDataChannel method. The peer
being invited to exchange data receives a
RTCPeerConnection.datachannel_event event (which has type
RTCDataChannelEvent) to let it know the data channel has been added to the
connection.
RTCDataChannel is a
transferable object.
API documentation sourced from MDN Web Docs.
- on
- Implemented types
- Available extensions
Properties
- asString → String
-
Available on JSAny, provided by the JSAnyExtension extension
no setter - asString → String?
-
Available on JSAny?, provided by the JSAnyNullableExtension extension
no setter - binaryType ↔ BinaryType
-
The property
binaryTypeon the RTCDataChannel interface is a string which specifies the type of object which should be used to represent binary data received on the RTCDataChannel. Values allowed by the WebSocket.binaryType property are also permitted here:blobif Blob objects are being used orarraybufferifArrayBufferobjects are being used. The default isblob.getter/setter pair - bufferedAmount → int
-
The read-only
RTCDataChannelpropertybufferedAmountreturns the number of bytes of data currently queued to be sent over the data channel. The queue may build up as a result of calls to the RTCDataChannel.send method. This only includes data buffered by the user agent itself; it doesn't include any framing overhead or buffering done by the operating system or network hardware.no setter - bufferedAmountLowThreshold ↔ int
-
The
RTCDataChannelpropertybufferedAmountLowThresholdis used to specify the number of bytes of buffered outgoing data that is considered "low." The default value is 0. When the number of buffered outgoing bytes, as indicated by the RTCDataChannel.bufferedAmount property, falls to or below this value, aRTCDataChannel.bufferedamountlow_eventevent is fired. This event may be used, for example, to implement code which queues more messages to be sent whenever there's room to buffer them. Listeners may be added withRTCDataChannel.bufferedamountlow_eventor EventTarget.addEventListener.getter/setter pair -
entries
→ Iterable<
MapEntry< String, dynamic> > -
Available on JSObject, provided by the JSObjectExtension extension
no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- id → int?
-
The read-only
RTCDataChannelpropertyidreturns an ID number (between 0 and 65,534) which uniquely identifies the RTCDataChannel. This ID is set at the time the data channel is created, either by the user agent (if RTCDataChannel.negotiated isfalse) or by the site or app script (ifnegotiatedistrue).no setter - isDefinedAndNotNull → bool
-
Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension
no setter - isElement → bool
-
Available on JSObject?, provided by the JSObjectWebExtension extension
no setter - isHTMLElement → bool
-
Available on JSObject?, provided by the JSObjectWebExtension extension
no setter - isNode → bool
-
Available on JSObject?, provided by the JSObjectWebExtension extension
no setter - isNull → bool
-
Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension
Whether this value corresponds to JavaScriptnull.no setter - isTruthy → JSBoolean
-
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of!!in JavaScript.thisno setter - isUndefined → bool
-
Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension
Whether this value corresponds to JavaScriptundefined.no setter - isUndefinedOrNull → bool
-
Available on JSAny?, provided by the NullableUndefineableJSAnyExtension extension
no setter -
keys
→ Iterable<
String> -
Available on JSObject, provided by the JSObjectExtension extension
no setter - label → String
-
The read-only
RTCDataChannelpropertylabelreturns a string containing a name describing the data channel. These labels are not required to be unique.no setter - maxPacketLifeTime → int?
-
The read-only
RTCDataChannelpropertymaxPacketLifeTimereturns the amount of time, in milliseconds, the browser is allowed to take to attempt to transmit a message, as set when the data channel was created, ornull. This limits how long the browser can continue to attempt to transmit and retransmit the message before giving up.no setter - maxRetransmits → int?
-
The read-only
RTCDataChannelpropertymaxRetransmitsreturns the maximum number of times the browser should try to retransmit a message before giving up, as set when the data channel was created, ornull, which indicates that there is no maximum. This can only be set when the RTCDataChannel is created by calling RTCPeerConnection.createDataChannel, using themaxRetransmitsfield in the specifiedoptions.no setter - negotiated → bool
-
The read-only
RTCDataChannelpropertynegotiatedindicates whether the RTCDataChannel's connection was negotiated by the Web app (true) or by the WebRTC layer (false). The default isfalse.no setter - not → JSBoolean
-
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result of!in JavaScript.thisno setter - onbufferedamountlow ↔ EventHandler?
-
getter/setter pair
- onclose ↔ EventHandler?
-
getter/setter pair
- onclosing ↔ EventHandler?
-
getter/setter pair
- onerror ↔ EventHandler?
-
getter/setter pair
- onmessage ↔ EventHandler?
-
getter/setter pair
- onopen ↔ EventHandler?
-
getter/setter pair
- ordered → bool
-
The read-only
RTCDataChannelpropertyorderedindicates whether or not the data channel guarantees in-order delivery of messages; the default istrue, which indicates that the data channel is indeed ordered. This is set when the RTCDataChannel is created, by setting theorderedproperty on the object passed as RTCPeerConnection.createDataChannel'soptionsparameter.no setter - protocol → String
-
The read-only
RTCDataChannelpropertyprotocolreturns a string containing the name of the subprotocol in use. If no protocol was specified when the data channel was created, then this property's value is the empty string ("").no setter - readyState → RTCDataChannelState
-
The read-only
RTCDataChannelpropertyreadyStatereturns a string which indicates the state of the data channel's underlying data connection.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
add(
JSAny? any) → JSAny -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this+any -
addEventListener(
String type, EventListener? callback, [JSAny options]) → void -
The
addEventListener()method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.inherited -
and(
JSAny? any) → JSAny? -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this&&any -
as<
T extends JSObject> () → T? -
Available on JSObject, provided by the JSObjectExtension extension
-
callMethod<
R extends JSAny?> (JSAny method, [JSAny? arg1, JSAny? arg2, JSAny? arg3, JSAny? arg4]) → R -
Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension
Callsmethodon this JSObject with up to four arguments. -
callMethodVarArgs<
R extends JSAny?> (JSAny method, [List< JSAny?> ? arguments]) → R -
Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension
Callsmethodon this JSObject with a variable number ofarguments. -
close(
) → void -
The
RTCDataChannel.close()method closes the RTCDataChannel. Either peer is permitted to call this method to initiate closure of the channel. -
dartify(
) → Object? -
Available on JSAny?, provided by the JSAnyUtilityExtension extension
Converts a JavaScript JSON-like value to the Dart equivalent if possible. -
delete(
JSAny property) → JSBoolean -
Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension
Deletes the property with keypropertyfrom this JSObject. -
dispatchEvent(
Event event) → bool -
The
dispatchEvent()method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually withdispatchEvent().inherited -
divide(
JSAny? any) → JSAny -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this/any -
equals(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this==any -
exponentiate(
JSAny? any) → JSAny -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this**any -
get(
String key) → Object? -
Available on JSObject, provided by the JSObjectExtension extension
-
getProperty<
R extends JSAny?> (JSAny property) → R -
Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension
The value of the property keypropertyof this JSObject. -
greaterThan(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this>any -
greaterThanOrEqualTo(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this>=any -
has(
String property) → bool -
Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension
Shorthand helper for hasProperty to check whether this JSObject contains the property keyproperty, but takes and returns a Dart value. -
hasProperty(
JSAny property) → JSBoolean -
Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension
Whether or not this JSObject contains the property keyproperty. -
instanceof(
JSFunction constructor) → bool -
Available on JSAny?, provided by the JSAnyUtilityExtension extension
Whether thisJSAny?is aninstanceofconstructor. -
instanceOfString(
String constructorName) → bool -
Available on JSAny?, provided by the JSAnyUtilityExtension extension
Whether thisJSAny?is aninstanceofthe constructor that is defined byconstructorName, which is looked up in the globalContext. -
isA<
T extends JSAny?> () → bool -
Available on JSAny?, provided by the JSAnyUtilityExtension extension
Whether thisJSAny?is an instance of the JavaScript type that is declared byT. -
lessThan(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this<any -
lessThanOrEqualTo(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this<=any -
modulo(
JSAny? any) → JSAny -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this%any -
multiply(
JSAny? any) → JSAny -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this*any -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notEquals(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this!=any -
or(
JSAny? any) → JSAny? -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this||any -
put(
Object key, Object? value) → void -
Available on JSObject, provided by the JSObjectExtension extension
-
removeEventListener(
String type, EventListener? callback, [JSAny options]) → void -
The
removeEventListener()method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.inherited -
send(
JSAny data) → void -
The
send()method of the RTCDataChannel interface sends data across the data channel to the remote peer. This can be done any time except during the initial process of creating the underlying transport channel. Data sent before connecting is buffered if possible (or an error occurs if it's not possible), and is also buffered if sent while the connection is closing or closed. -
setProperty(
JSAny property, JSAny? value) → void -
Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension
Write thevalueof property keypropertyof this JSObject. -
strictEquals(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this===any -
strictNotEquals(
JSAny? any) → JSBoolean -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this!==any -
subtract(
JSAny? any) → JSAny -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this-any -
toMap(
) → Map< String, dynamic> -
Available on JSObject, provided by the JSObjectExtension extension
-
toString(
) → String -
A string representation of this object.
inherited
-
typeofEquals(
String typeString) → bool -
Available on JSAny?, provided by the JSAnyUtilityExtension extension
Whether the result oftypeofon thisJSAny?istypeString. -
unsignedRightShift(
JSAny? any) → JSNumber -
Available on JSAny?, provided by the JSAnyOperatorExtension extension
The result ofin JavaScript.this>>>any
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
String property) → JSAny? -
Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension
Shorthand helper for getProperty to get the value of the property keypropertyof this JSObject, but takes a Dart value. -
operator []=(
String property, JSAny? value) → void -
Available on JSObject, provided by the JSObjectUnsafeUtilExtension extension
Shorthand helper for setProperty to write thevalueof the property keypropertyof this JSObject, but takes a Dart value.