Class: DataSender

wsc. DataSender

Represents the sender of DataTransfer that can send raw data over the underlying data channel.

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)

Send 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");
Oracle® Communications WebRTC Session Controller JavaScript API Reference, E55131-03
Copyright © 2013, 2015, Oracle and/or its affiliates. All rights reserved.