Player APIs (BrightScript & Ja...
JavaScript APIs
pointer
5min
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); }; 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)); });