This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
A datachannel
event informs the target, a RTCPeerConnection
object, that a RTCDataChannel
has been added to the connection, as a result of a call to RTCPeerConnection.createDataChannel()
by the remote peer.
This event is not dispatched when the local end of the connection creates the channel.
An event handler for this event can be added via the RTCPeerConnection.ondatachannel
property.
RTCDataChannelEvent
RTCPeerConnection
RTCDataChannelEvent
is based on Event
, so it also implements its properties.
channel
Read only
RTCDataChannel
which represents the data channel which was added to the RTCPeerConnection
.RTCDataChannelEvent
is based on Event
, so it also implements its properties. There are no methods specific to RTCDataChannelEvent
.
Specification | Status | Comment |
---|---|---|
WebRTC 1.0: Real-time Communication Between Browsers The definition of 'datachannel' in that specification. | Candidate Recommendation | Basic definition. |
We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | (Yes) | 22 (22) | No support | (Yes) | ? |
Feature | Android | Chrome for Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|---|
Basic support | No support | 28 [2] | 22.0 (22) | No support | No support | No support | (Yes) |
[2] WebRTC, including RTCDataChannel
, was introduced in Chrome 28 for Android behind a flag, and enabled by default starting in Chrome 29 for Android.
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/Events/datachannel