ondatachannel
Ondatachannel is an event handler in the WebRTC API, attached to RTCPeerConnection. It fires when a data channel is created by the remote peer or when the local peer receives an inbound data channel. This event enables an application to configure and use the incoming RTCDataChannel for bidirectional data transfer.
When the event occurs, the event object includes a channel property, which is the RTCDataChannel associated
Usage typically involves assigning a function to the RTCPeerConnection’s ondatachannel handler. Within that handler, developers obtain
Compatibility and scope: ondatachannel is supported in major browsers that implement the WebRTC DataChannel API. It