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
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ The Data Channel API enables real-time messaging during audio and video calls. W
26
26
27
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
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.
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. The text messages must be serialized into a byte buffer before they can be transmitted.
30
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
31
* Security: All messages exchanged between a client and the other endpoint are encrypted, ensuring the privacy and security of users' data.
32
32
@@ -49,7 +49,7 @@ This setup offers an efficient method for file transfer, taking full advantage o
49
49
50
50
In a group call scenario, files can still be shared among participants. However, there are better ways, such as Azure Storage or Azure Files.
51
51
Additionally, broadcasting the file content to all participants in a call can be achieved by setting an empty participant list.
52
-
However, it's important to keep in mind that, in additional to bandwidth limitations,
52
+
However, it's important to keep in mind that, in addition to bandwidth limitations,
53
53
there are further restrictions imposed during a group call when broadcasting messages, such as packet rate and back pressure from the receive bitrate.
54
54
55
55
## Key concepts
@@ -76,7 +76,7 @@ Upon creation, a channel can be configured to be one of the two Reliability opti
76
76
A `lossy` channel means the order of messages isn't guaranteed and a message can be silently dropped when sending fails. It generally affords a faster data transfer speed.
77
77
78
78
A `durable` channel means the SDK guarantees a lossless and ordered message delivery. In cases when a message can't be delivered, an exception will be thrown by the SDK.
79
-
In the Web SDK, the durability of the channel is ensured through a reliable SCTP connection. However, it doesn't imply that message will not be lost in an end-to-end manner.
79
+
In the Web SDK, the durability of the channel is ensured through a reliable SCTP connection. However, it doesn't imply that message won't be lost in an end-to-end manner.
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
@@ -91,7 +91,7 @@ For the Web SDK, priority settings are only compared among channels on the sende
91
91
### Bitrate
92
92
When creating a channel, a desirable bitrate can be specified for bandwidth allocation.
93
93
94
-
This Bitrate property is to notify the SDK of the expected bandwidth requirement for a particular use case. Although the SDK generally can't match the exact bitrate, it will try to accommodate the request.
94
+
This Bitrate property is to notify the SDK of the expected bandwidth requirement for a particular use case. Although the SDK generally can't match the exact bitrate, it tries to accommodate the request.
95
95
96
96
97
97
### Session
@@ -100,17 +100,17 @@ In the SDK, the session is associated to the sender or the receiver object.
100
100
101
101
Upon creating a sender object with a new channelId, the sender object is in open state.
102
102
If the `close()` API is invoked on the sender object, the session becomes closed and can no longer facilitate message sending.
103
-
At the same time, the sender object will notify all participants in the call that the session is closed.
103
+
At the same time, the sender object notifies all participants in the call that the session is closed.
104
104
105
105
If a sender object is created with an already existing channelId, the existing sender object associated with the channelId will be closed and any messages sent from the newly created sender object will be recognized as part of a new session.
106
106
107
107
From the receiver's perspective, messages coming from different sessions on the sender's side are directed to distinct receiver objects.
108
108
If the SDK identifies a new session associated with an existing channelId on the receiver's side, it creates a new receiver object.
109
-
The SDK won't close the older receiver object; such closure will only take place 1) when the receiver object receives a closure notification from the sender, or 2) if the session hasn't received any messages from the sender for over two minutes.
109
+
The SDK doesn't close the older receiver object; such closure takes place 1) when the receiver object receives a closure notification from the sender, or 2) if the session hasn't received any messages from the sender for over two minutes.
110
110
111
-
In instances where the session of a receiver object is closed and no new session for the same channelId exists on the receiver's side, the SDK will create a new receiver object upon receipt of a message from the same session at a later time. However, if a new session for the same channelId exists on the receiver's side, the SDK will discard any incoming messages from the previous session.
111
+
In instances where the session of a receiver object is closed and no new session for the same channelId exists on the receiver's side, the SDK creates a new receiver object upon receipt of a message from the same session at a later time. However, if a new session for the same channelId exists on the receiver's side, the SDK discards any incoming messages from the previous session.
112
112
113
-
Considering that the receiver object will close if it doesn't receive messages for more than two minutes. We suggest that the application periodically sends keep-alive messages from the sender's side to maintain the active status of the receiver object.
113
+
Considering that the receiver object closes if it doesn't receive messages for more than two minutes, we suggest that the application periodically sends keep-alive messages from the sender's side to maintain the active status of the receiver object.
114
114
115
115
### Sequence number
116
116
The sequence number is a 32-bit unsigned integer included in the Data Channel message to indicate the order of messages within a channel. It's important to note this number is generated from the sender's perspective. Consequently, a receiver may notice a gap in the sequence numbers if the sender alters the recipients during sending messages.
@@ -124,8 +124,8 @@ The maximum allowable size for a single message is 32 KB. If you need to send da
124
124
125
125
### Participant list
126
126
The maximum number of participants in a list is limited to 64. If you want to specify more participants, you'll need to manage participant list on your own. For example, if you want to send a message to 50 participants, you can create two different channels, each with 25 participants in their recipient lists.
127
-
Note that when calculating the limit, two endpoints with the same participant identifier will be counted as separate entities.
128
-
As an alternative, you could opt for broadcasting messages. However, be aware that certain restrictions apply when broadcasting messages.
127
+
When calculating the limit, two endpoints with the same participant identifier will be counted as separate entities.
128
+
As an alternative, you could opt for broadcasting messages. However, certain restrictions apply when broadcasting messages.
129
129
130
130
### Rate limiting
131
131
There's a limit on the overall send bitrate, currently set at 500 Kbps.
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/voice-video-calling/includes/data-channel/data-channel-javascript.md
Within the listener callback function, you can access the receiver object and retrieve information such as `channelId` and the sender participant ID `senderParticipantIdentifier`.
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.
49
+
It's your responsibility to maintain the receiver object reference, as the SDK emits the event once for each created receiver object.
50
50
51
51
## Handle messageReady and close event of DataChannelReceiver object
52
52
@@ -82,7 +82,7 @@ Please note that the participant list is limited to 64 participants. If the part
82
82
## Send and receive messages
83
83
84
84
DataChannel feature API requires you to pass data as `Uint8Array` type. You can't directly send a JavaScript string using `sendMessage` API.
85
-
For example, if you want to send a string 'abc', you can't use `sender.sendMessage('abc')`. Instead, you need to serialize the data to a byte buffer first.
85
+
For example, if you want to send a string `abc`, you can't use `sender.sendMessage('abc')`. Instead, you need to serialize the data to a byte buffer first.
0 commit comments