bufferedAmount

The read-only RTCDataChannel property bufferedAmount returns the number of bytes of data currently queued to be sent over the data channel.

MDN Reference