↳ Premium

AirConsole

new AirConsole(opts) → {AirConsoleObject}

Your gateway object to AirConsole. There are getter and setter functions for all properties. Do not access properties of this object directly.
Parameters:
Name Type Description
opts AirConsole~Config Constructor config, see bellow.
Source:
Returns:
The AirConsole object.
Type
AirConsoleObject

Methods

getPremium()

Offers the user to become a premium member. Can only be called from controllers. If you call getPremium in development mode, the device becomes premium immediately.
Source:

getPremiumDeviceIds() → {Array.<number>}

Returns all device ids that are premium.
Source:
Returns:
Type
Array.<number>

isPremium(device_id) → {boolean|undefined}

Returns true if the device is premium
Parameters:
Name Type Description
device_id number The device_id that should be checked. Only controllers can be premium. Default is this device.
Source:
Returns:
Returns true or false for a valid device_id and undefined if the device_id is not valid.
Type
boolean | undefined

(abstract) onPremium(device_id)

Gets called when a device becomes premium or when a premium device connects.
Parameters:
Name Type Description
device_id number The device id of the premium device.
Source: