bbc/cordova-plugin-dialclient

Name: cordova-plugin-dialclient

Owner: BBC

Description: A Cordova library for discovery of devices on iOS platforms using DIAL.

Created: 2017-01-23 11:26:45.0

Updated: 2017-05-15 21:47:47.0

Pushed: 2017-05-26 14:51:55.0

Homepage: null

Size: 4059

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

cordova-plugin-dialclient

A Cordova library for discovery of HbbTV2.0 devices on iOS platforms using DIAL.

Usage

You can add the plugin to your Cordova application by adding the following line to your app's config.xml:

<plugin name="cordova-dialclient" spec="https://github.com/bbc/cordova-plugin-dialclient.git" /> 

The plugin is available to the global Javascript namespace via the DIALClient object. This object has a single method: DIALClient.getDIALClient() which creates a new DIAL discovery client. The client object has the following methods:

Each DiscoveredTerminal object returned by the callback of startDiscovery has the following properties:

Example usage

A minimal code snippet:

var client = DIALClient.getDIALClient();
client.startDiscovery(function (terminals) {
    console.log("Discovered terminals changed:");
    for (var i = 0; i < terminals.length; i++) {
        console.log(terminals[i]);
    }
});

A minimal example Cordova app is also available here.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.