Tablet

Description

The Tablet API provides the facilities to work with the system or other tablet. In toolbar mode (Developer > UI > Tablet Becomes Toolbar), the tablet's menu buttons are displayed in a toolbar and other tablet content is displayed in a dialog.

Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts

Methods

Name Return Value Summary
getTablet TabletProxy Gets an instance of a tablet. A new tablet is created if one with the specified ID doesn't already exist.
playSound None Plays a standard tablet sound. The sound is played locally (only the user running the script hears it) without a position.

Signals

Name Summary
tabletNotification Triggered when a tablet message or dialog is displayed on the tablet that needs the user's attention.

Note: Only triggered if the script is running in the same script engine as the script that created the tablet. By default, this means in scripts included as part of the default scripts.

Type Definitions

AudioEvents
Type: number

Standard tablet sounds.

ValueDescription
0Button click.
1Button hover.
2Tablet open.
3Tablet hands in.
4Tablet hands out.

Method Details

(static) getTablet( name ) → {TabletProxy}
Returns: The tablet instance.

Gets an instance of a tablet. A new tablet is created if one with the specified ID doesn't already exist.

Parameters

Name Type Description
name string A unique name that identifies the tablet.
Example

Display the High Fidelity home page on the system tablet.

var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
tablet.gotoWebScreen("https://highfidelity.com/");
(static) playSound( sound )

Plays a standard tablet sound. The sound is played locally (only the user running the script hears it) without a position.

Parameters

Name Type Description
sound Tablet.AudioEvents The tablet sound to play.
Example

Play a tablet sound.

var TABLET_BUTTON_CLICK = 0;
Tablet.playSound(TABLET_BUTTON_CLICK);

Signal Details

tabletNotification( )
Returns: Signal

Triggered when a tablet message or dialog is displayed on the tablet that needs the user's attention.

Note: Only triggered if the script is running in the same script engine as the script that created the tablet. By default, this means in scripts included as part of the default scripts.