Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

The pointer object provides information about screen-input devices connected to the player.

pointer IDL
interface Pointer {
    Promise<bool> isMousePresent();
    Promise<bool> isMultiTouchPresent();
    Promise<void> enableCursor(bool);
};

ON THIS PAGE

Object Creation

To create a pointer object, first load the brightsign/pointer module using the require() method. Then create an instance of the pointer class.

var pointerClass = require("@brightsign/pointer");
var pointer = new pointerClass();

Pointer

Use this interface to determine whether a screen-input device is present.

isMousePresent()
Promise<bool> isMousePresent()

Returns true if a mouse is connected to the player.

isMultiTouchPresent()
Promise<bool> isMultiTouchPresent()

Returns true if a multitouch device is connected to the player.

enableCursor()
Promise<void> enableCursor(bool)

Display a cursor if the parameter passed is true.

Example

var PointerClass = require("@brightsign/pointer");
var pointer = new PointerClass();

pointer.isMousePresent().then(
        function(data) {
            console.log("***Mouse Present***");
            console.log(JSON.stringify(data));
        })
    .catch(
        function(data) {
            console.log(JSON.stringify(data));
        });

pointer.isMultiTouchPresent().then(
        function(data) {
            console.log("***MultiTouch Present***");
            console.log(JSON.stringify(data));
        })
    .catch(
        function(data) {
            console.log(JSON.stringify(data));
        });






  • No labels