htcmd

Playtech.API. htcmd

Members

# (static) isEnabled :boolean

Is `true` if Native integration is enabled.
Type:
  • boolean
Example
// false
Playtech.API.htcmd.isEnabled;

# (static) isWrapperEnabled :boolean

Is `true` if Wrapper integration is enabled.
Type:
  • boolean
Example
// false
Playtech.API.htcmd.isWrapperEnabled;

Methods

# (static) download(url, name, mime)

Send 'download' to Native / Wrapper application to initiate file download.
Parameters:
Name Type Description
url String Blob URL to download.
name String Name of the file.
mime String MIME type of the file.
Example
Playtech.API.htcmd.download(url, name, mime);

# (static) launchgame(options)

Send 'launchgame' to Native application to launch game.
Parameters:
Name Type Description
options Object Plain object with parameters for the command.
Properties
Name Type Description
code string Game code.
mode number Game mode.
Example
Playtech.API.htcmd.launchgame({ code: 'gameCode', mode: 1 });

# (static) login(options)

Send 'loginsuccess' (?isNative=1) / 'login' (?htcmd=1) to Native application with authentication data.
Parameters:
Name Type Description
options Object Plain object with parameters for the command.
Example
Playtech.API.htcmd.login({ ...options });

# (static) portalEvent(options)

Send portalEvent command to Native application.
Parameters:
Name Type Description
options Object Plain object with parameters for the command.
Properties
Name Type Description
event string
amount string
currency string
Example
Playtech.API.htcmd.portalEvent({ event: 'depositCompleted', amount: '20', currency: 'USD' });

# (static) processBiometricAuthentication()

Send "authentication/processBiometricAuthentication" command to Native application that Biometric Login is available.
Example
Playtech.API.htcmd.processBiometricAuthentication();

# (static) sendMessage(command, options)

Send command to Native application.
Parameters:
Name Type Description
command string Command name.
options Object Plain object with parameters for the command.
Properties
Name Type Description
event string
amount string
currency string
Example
Playtech.API.htcmd.sendMessage('portalEvent', { event: 'depositCompleted', amount: '20', currency: 'USD' });