The bytesSent property of the RTCDataChannelStats dictionary returns the total number of payload bytes sent on the associated RTCDataChannel.
Note that non-payload bytes, such as those for framing and in headers, are not included.
A positive integer value indicating the total number of payload bytes sent on the associated data channel.