new DataSender()
Instance created by DataTransfer. An object of this class is created by
DataTransfer and set to the member dataSender.
An instance of this class can be obtained by calling {DataTransfer.getSender()} of a DataTransfer object.
- See:
Methods
-
send(data)
-
Sends raw data through the underlying RTCDataChannel.
Parameters:
Name Type Description data
String | Blob | ArrayBuffer | ArrayBufferView the supported data type depends on browser's implementation.
Throws:
Exception The exception thrown by RTCDataChannel.Example
For blob data blob = new Blob([myField.value]); dataSender.send(blob); For a text String dataSender.send("Hello");