IDAL

IDAL

The IDAL object is available in the global scope when using the ID-AL JavaScript SDK.

This object is an easy-to-use entry point for accessing system features.
For more information about using the SDK, please refer to this tutorial.

You can download the latest of the SDK here.

Methods

(static) getClient(hostname, username, password): IDALClient

Get a low-level communication client to interact with the HTTP API of a remote player

Since:
  • firmware v1.08 / SDK 1.1.0
Parameters
Name Type Description
hostname string

Hostname or IP address of the remote player

username string

Username for authentication

password string

Password for authentication

Returns

A low level client

Type
IDALClient

(static) getControlInterfaces(): Promise.<IdalControlInterfaces>

Get the control interfaces necessary to control the video player.

It is strongly advised to use this method as the entry point to program the system as it avoid dealing directly with the SystemReadyEvent event.

Note that it is not possible to use this method within an <iframe>: controlling the system is only allowed on the main page.

Example
IDAL.getControlInterfaces()
    .then(function(ifaces) {
            // The ifaces object contains all the system control interfaces:
            //      - ifaces.player
            //      - ifaces.serial
            //      - ifaces.logger
            //      - ifaces.printer
            //      - ifaces.contact

            // The video playback can now be controlled:
            ifaces.player.getAllFolders()
                .then(function(folders) {
                    // Do something useful...
                    console.log("Folders received: " + JSON.stringify(folders));
                })
                .catch(function(error) {
                    // Do something useful...
                });
    });
Returns

A promise resolved with an IdalControlInterfaces.

Type
Promise.<IdalControlInterfaces>

(static) getRemoteControlInterfaces(hostname, username, password): Promise.<IdalControlInterfaces>

Get control interfaces for a remote video player.

This method can be used to retrieve the control interfaces of a remote video player.
It can be used to control a video player from a third-party web browser using the same code and API that would be used when running on the video player itself.
It is therefore also possible to locally run and debug pages intended for run on the video player.

Example
// To control the video player having IP address 192.168.0.123:
IDAL.getRemoteControlInterfaces("192.168.0.123", "user", "password")
    .then(function(ifaces) {
            // The ifaces object contains all the system control interfaces:
            //      - ifaces.player
            //      - ifaces.serial
            //      - ifaces.logger
            //      - ifaces.printer
            //      - ifaces.contact

            // The video playback can now be controlled:
            ifaces.player.getAllFolders()
                .then(function(folders) {
                    // Do something useful...
                    console.log("Folders received: " + JSON.stringify(folders));
                })
                .catch(function(error) {
                    // Do something useful...
                });
    });
Parameters
Name Type Description
hostname string

Hostname or IP address of the remote player

username string

Username for authentication

password string

Password for authentication

Returns

A promise resolved with an IdalControlInterfaces.

Type
Promise.<IdalControlInterfaces>