dizmoLive

The standard dizmoViewer software shares one or more dizmos with other devices and/or users on a local network. This is done through a Pad dizmo and is called dizmoLive.

Multiple sessions of dizmoLive can be run in parallel. This allows any combination of Pad, dizmos and device/users connections. Most dizmos can be shared through a Pad.

Sharing data across dizmoLive

The state of a dizmo, or any other information from it, is only shared across dizmoLive when its data is stored in the dizmo's data tree. In other words, only the persistent data of a dizmo is replicated over dizmoLive.

Assume that your dizmo has an input field where users can enter data. The content of the input field will not be shared across dizmoLive by default, since only persistent data in the dizmo data tree is replicated over dizmoLive.

Handling dizmoLive connection requests

There are three ways to accept incoming dizmoLive connection requests:

  1. Ask user is the default way to accept incoming dizmoLive connection requests with a Popup.
  2. Silent Live makes dizmoViewer immediately accept any incoming dizmoLive connection.
  3. Do Not Disturb blocks all incoming Live requests. No popup will appear.

Set properties

You can set these properties with:

viewer.setAttribute("settings/linkacceptmode","askuser");
viewer.setAttribute("settings/linkacceptmode","silentlive");
viewer.setAttribute("settings/linkacceptmode","donotdisturb");

Get current mode

You can also get the current mode with:

var status=viewer.getAttribute("settings/linkacceptmode");

Return list of possible connections

For a list of all dizmoViewer Instances that a dizmoLive connection can be opened to, use the viewer.getRemoteHosts function:

var remotehosts = viewer.getRemoteHosts();

Get details about a remote host

The following will return an array of identifiers and hostnames/ip-addresses. Use one of those identifiers to get more details about that remote host:

var remotehost = viewer.getRemoteHostById(identifier);

Get details about an active connection

For each dizmo, you can get more information about an active dizmoLive connection by using:

var connectioninfo = dizmo.getRemoteHost();

If there is an active connection, it returns the time when the connection was started and the username.

Get direction and identifier of each dizmo

You can also get more information about an active connection for each dizmo with:

dizmo.getAttribute("connection");

This will return the direction (incoming or outgoing) and the identifier of the remote host.

Use callbacks to react to live connections

To react to live connections which are added or removed, use these two callbacks:

var subscrId = dizmo.onRemoteHostConnected(callback);
var subscrId = dizmo.onRemoteHostDisconnected(callback);

Unsubscribe from live connections

Unsubscribe from both subscriptions with:

dizmo.unsubscribeRemoteHost(subscrId);