# Namespace hcap.mode

hcap.mode

- Defined in: hcap-1.24.6.5901.js

Namespace Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| hcap.mode

## Method Summary

## Namespace Detail

hcap.mode

## Field Detail

<static> <constant> hcap.mode.HCAP_MODE_0
HCAP mode 0

Since:
  1.3.1

<static> <constant> hcap.mode.HCAP_MODE_1
HCAP mode 1

Since:
  1.3.1

<static> <constant> hcap.mode.HCAP_MODE_2
HCAP mode 2

Since:
  1.3.1

<static> <constant> hcap.mode.HCAP_MODE_3
HCAP mode 3

Since:
  1.3.1

<static> <constant> hcap.mode.HCAP_MODE_4
HCAP mode 4

Since:
  1.3.1

## Method Detail

- <static> hcap.mode.getHcapMode(param)
  Gets the current HCAP mode.
  Hcap mode is related to the application visibility and the key control.
  Following table specifies application visibility for each HCAP mode.

  | HCAP_MODE_0 | HCAP_MODE_1 | HCAP_MODE_2 | HCAP_MODE_3 | HCAP_MODE_4
  --- | --- | --- | --- | --- | ---
  Application Visibility | X | O | O | O | O
  HCAP Mode & Application Visibility (O : visible, X : invisible)

  Following table specifies whether key is delivered to application or not for each HCAP mode.
  (O : key is delivered to application, X : key is not delivered to application)

  Key | HCAP_MODE_0 | HCAP_MODE_1 | HCAP_MODE_2 | HCAP_MODE_3 | HCAP_MODE_4
  --- | --- | --- | --- | --- | ---
  NUM_0~NUM_9 | X | O | X | O | X
  MINUS | X | O | X | O | X
  CH_UP | X | O | X | X | O
  CH_DOWN | X | O | X | X | O
  GUIDE | O | O | O | O | O
  INFO | O | O | O | O | O
  LEFT | X | O | O | O | O
  UP | X | O | O | O | O
  RIGHT | X | O | O | O | O
  DOWN | X | O | O | O | O
  ENTER | X | O | O | O | O
  BACK | X | O | O | O | O
  EXIT | X | O | O | O | O
  RED | X | O | O | O | O
  GREEN | X | O | O | O | O
  YELLOW | X | O | O | O | O
  BLUE | X | O | O | O | O
  STOP | X | O | O | O | O
  PLAY | X | O | O | O | O
  PAUSE | X | O | O | O | O
  REWIND | X | O | O | O | O
  FAST_FORWARD | X | O | O | O | O
  LAST_CH | X | O | X | X | O
  PORTAL | O | O | O | O | O
  ORDER | X | O | O | O | O
  NETFLIX | O | O | O | O | O
  Keys not in list | X | X | X | X | X
  HCAP Mode & Key Delivery

      hcap.mode.getHcapMode({
           "onSuccess" : function(s) {
               console.log("onSuccess : current hcap mode = " + s.mode);
           },
           "onFailure" : function(f) {
               console.log("onFailure : errorMessage = " + f.errorMessage);
           }
      });

  Parameters:
  {Object} param
    - {Function} param.onSuccess [Optional] - success callback function.

            param.onSuccess = function (param) {
                // {Number} param.mode - HCAP mode.
            }

    - {Function} param.onFailure [Optional] - failure callback function.

            param.onFailure = function (param) {
                // {String} param.errorMessage - in case of failure, this message provides the details.
            }

  Since:
    1.3.1
  See:
    hcap.mode.setHcapMode()
    HCAP_MODE_0
    HCAP_MODE_1
    HCAP_MODE_2
    HCAP_MODE_3
    HCAP_MODE_4
- <static> hcap.mode.setHcapMode(param)
  Sets the HCAP mode.
  Please refer to hcap.mode.getHcapMode() for the detailed information regarding the HCAP mode.

      hcap.mode.setHcapMode({
           "mode" : hcap.mode.HCAP_MODE_2,
           "onSuccess" : function() {
               console.log("onSuccess");
           },
           "onFailure" : function(f) {
               console.log("onFailure : errorMessage = " + f.errorMessage);
           }
      });

  Parameters:
  {Object} param
    - {Number} param.mode [Required] - HCAP mode.
    - {Function} param.onSuccess [Optional] - success callback function.
      Setting to the same HCAP mode as before will invoke this callback function.

            param.onSuccess = function() {
                // No parameter.
            }

    - {Function} param.onFailure [Optional] - failure callback function.

            param.onFailure = function (param) {
                // {String} param.errorMessage - in case of failure, this message provides the details.
            }

  Since:
    1.3.1
  See:
    hcap.mode.getHcapMode()
    HCAP_MODE_0
    HCAP_MODE_1
    HCAP_MODE_2
    HCAP_MODE_3
    HCAP_MODE_4