Due to limitations in the Active/NPAPI interfaces, the plugin's DataChannel has limited support to different data types.

Sending a string

The plugin behaves exactly the same way as Chrome and Firefox when sending a string :

 var data = "My string data";

Sending ArrayBufferViews

The following ArrayBuffer types can be sent using the plugin:

 var data = new Int8Array(10);


When you receive the data on the other side of the data channel, you can then use:

function onReceiveMessageCallback(event) { // was set as the receiving datachannel onmessage callback
	var data = new Int8Array(event.data);

Sending ArrayBuffers

We suggest sending ArrayBuffers by transforming them in typed arrays first:

var AB   = new ArrayBuffer(8);
var data = new Int8Array(AB);

Sending Blobs

Temasys is actively considering options for blob sending. 
Follow our Google Group or our support portal to be update as soon as a solution is released.

Examples of how to use the data channel

Please see our test samples for example of how to integrate the DataChannel in your web-application: