You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/communication-services/concepts/voice-video-calling/data-channel.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,11 +24,11 @@ ms.subservice: calling
24
24
25
25
The Data Channel API enables real-time messaging during audio and video calls. With this API, you can now easily integrate chat and data exchange functionalities into the applications, providing a seamless communication experience for users. Key features include:
26
26
27
-
1. Real-time Messaging: The Data Channel API enables users to instantly send and receive messages during an ongoing audio or video call, promoting smooth and efficient communication. In group call scenarios, messages can be sent to a single participant, a specific set of participants, or all participants within the call. This flexibility enhances communication and collaboration among users during group interactions.
28
-
2. Unidirectional Communication: Unlike bidirectional communication, the Data Channel API is designed for unidirectional communication. It employs distinct objects for sending and receiving messages: the DataChannelSender object for sending and the DataChannelReceiver object for receiving. This separation simplifies message management in group calls, leading to a more streamlined user experience.
29
-
3. Binary Data Support: The API supports the sending and receiving of binary data, permitting the exchange of diverse data types, such as text, images, and files. Note that text messages must be serialized into a byte buffer before they can be transmitted.
30
-
4. Sender Options: The Data Channel API provides three configurable options when creating a sender object, including Reliability, Priority, and Bitrate. These options enable the configuration of a channel to meet specific needs for different use cases.
31
-
5. Security: All messages exchanged between a client and the other endpoint are encrypted, ensuring the privacy and security of users' data.
27
+
* Real-time Messaging: The Data Channel API enables users to instantly send and receive messages during an ongoing audio or video call, promoting smooth and efficient communication. In group call scenarios, messages can be sent to a single participant, a specific set of participants, or all participants within the call. This flexibility enhances communication and collaboration among users during group interactions.
28
+
* Unidirectional Communication: Unlike bidirectional communication, the Data Channel API is designed for unidirectional communication. It employs distinct objects for sending and receiving messages: the DataChannelSender object for sending and the DataChannelReceiver object for receiving. This separation simplifies message management in group calls, leading to a more streamlined user experience.
29
+
* Binary Data Support: The API supports the sending and receiving of binary data, permitting the exchange of diverse data types, such as text, images, and files. Note that text messages must be serialized into a byte buffer before they can be transmitted.
30
+
* Sender Options: The Data Channel API provides three configurable options when creating a sender object, including Reliability, Priority, and Bitrate. These options enable the configuration of a channel to meet specific needs for different use cases.
31
+
* Security: All messages exchanged between a client and the other endpoint are encrypted, ensuring the privacy and security of users' data.
32
32
33
33
## Common use cases
34
34
@@ -61,7 +61,7 @@ The decoupling of sender and receiver objects simplifies message handling in gro
61
61
62
62
### Channel
63
63
Every Data Channel message is associated with a specific channel identified by `channelId`.
64
-
It's important to clarify that this channelId isn't related to the id property in the WebRTC Data Channel.
64
+
It's important to clarify that this channelId isn't related to the `id` property in the WebRTC Data Channel.
65
65
This channelId can be utilized to differentiate various application uses, such as using 100 for chat messages and 101 for image transfers.
66
66
67
67
The channelId is assigned during the creation of a DataChannelSender object,
@@ -80,7 +80,8 @@ In the Web SDK, the durability of the channel is ensured through a reliable SCTP
80
80
In the context of a group call, it signifies the prevention of message loss between the sender and server.
81
81
In a peer-to-peer call, it denotes reliable transmission between the sender and remote endpoint.
82
82
83
-
Note: In the current Web SDK implementation, data transmission is done through a reliable WebRTC Data Channel connection for both `lossy` and `durable` channels.
83
+
> [!Note]
84
+
> In the current Web SDK implementation, data transmission is done through a reliable WebRTC Data Channel connection for both `lossy` and `durable` channels.
84
85
85
86
### Priority
86
87
Upon creation, a channel can be configured to be one of the two Priority options: `normal` or `high`.
@@ -129,7 +130,7 @@ As an alternative, you could opt for broadcasting messages. However, be aware th
129
130
### Rate limiting
130
131
There's a limit on the overall send bitrate, currently set at 500 Kbps.
131
132
However, when broadcasting messages, the send bitrate limit is dynamic and depends on the receive bitrate.
132
-
In the current implementation, the send bitrate limit is calculted as the maximum send bitrate (500 Kbps) minus 80% of the receive bitrate.
133
+
In the current implementation, the send bitrate limit is calculated as the maximum send bitrate (500 Kbps) minus 80% of the receive bitrate.
133
134
134
135
Furthermore, we also enforce a packet rate restriction when sending broadcast messages.
135
136
The current limit is set at 80 packets per second, where every 1200 bytes in a message is counted as one packet.
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/voice-video-calling/includes/data-channel/data-channel-javascript.md
The Data Channel feature API enables real-time messaging during audio and video calls. In this quickstart guide, we'll illustrate how to integrate DataChannel feature, enabling the exchange of text messages among participants within a group call.
14
+
The Data Channel feature API enables real-time messaging during audio and video calls. In this quickstart guide, we'll illustrate how to integrate the Data Channel feature, enabling the exchange of text messages among participants within a group call.
Within the listener callback function, you can access the receiver object and retrieve information such as `channelId` and the sender participant id`senderParticipantIdentifier`.
48
+
Within the listener callback function, you can access the receiver object and retrieve information such as `channelId` and the sender participant ID`senderParticipantIdentifier`.
49
49
It's your responsibility to maintain the receiver object reference, as the SDK will only emit the event once for each created receiver object.
50
50
51
51
## Handle messageReady and close event of DataChannelReceiver object
0 commit comments