HDMIInput Module


Version HDMIInput 1.2.0

Table of Contents

Usage

To use the HDMIInput module, you can import it into your project from the Firebolt SDK:

import { HDMIInput } from '@firebolt-js/manage-sdk'

Overview

Methods for managing HDMI inputs on an HDMI sink device.

Methods

autoLowLatencyModeCapable

Property for each port auto low latency mode setting.

To get the value of autoLowLatencyModeCapable call the method like this:

function autoLowLatencyModeCapable(port: HDMIPortId): Promise<boolean>

Parameters:

Param Type Required Description
port HDMIPortId true
pattern: ^HDMI[0-9]+$

Promise resolution:

Capabilities:

Role Capability
uses xrn:firebolt:capability:inputs:hdmi

Examples

Default Example

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

let enabled = await HDMIInput.autoLowLatencyModeCapable('HDMI1')
console.log(enabled)

Value of enabled:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.autoLowLatencyModeCapable",
  "params": {
    "port": "HDMI1"
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default Example #2

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

let enabled = await HDMIInput.autoLowLatencyModeCapable('HDMI1')
console.log(enabled)

Value of enabled:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.autoLowLatencyModeCapable",
  "params": {
    "port": "HDMI1"
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": false
}

To set the value of autoLowLatencyModeCapable call the method like this:

function autoLowLatencyModeCapable(
  port: HDMIPortId,
  value: boolean,
): Promise<void>

Parameters:

Param Type Required Description
port HDMIPortId true
pattern: ^HDMI[0-9]+$
value boolean true  

Promise resolution:

Examples

Default Example

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

let result = await HDMIInput.autoLowLatencyModeCapable('HDMI1', true)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.setAutoLowLatencyModeCapable",
  "params": {
    "port": "HDMI1",
    "value": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

Default Example #2

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

let result = await HDMIInput.autoLowLatencyModeCapable('HDMI1', false)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.setAutoLowLatencyModeCapable",
  "params": {
    "port": "HDMI1",
    "value": false
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

To subscribe to notifications when the value changes, call the method like this:

function autoLowLatencyModeCapable(
  callback: (value) => AutoLowLatencyModeCapableChangedInfo,
): Promise<number>

Promise resolution:

number

Examples

Default Example

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

let listenerId = await autoLowLatencyModeCapable((value) => {
  console.log(value)
})
console.log(listenerId)

Value of data:

{
	"port": "HDMI1",
	"enabled": true
}
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.onAutoLowLatencyModeCapableChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "port": "HDMI1",
    "enabled": true
  }
}

Default Example #2

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

let listenerId = await autoLowLatencyModeCapable((value) => {
  console.log(value)
})
console.log(listenerId)

Value of data:

{
	"port": "HDMI1",
	"enabled": true
}
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.onAutoLowLatencyModeCapableChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "port": "HDMI1",
    "enabled": false
  }
}

close

Closes the given HDMI Port if it is the current active source for HDMI Input. If there was no active source, then there would no action taken on the device.

function close(): Promise<void>

Promise resolution:

Capabilities:

Role Capability
manages xrn:firebolt:capability:inputs:hdmi

Examples

Default Example for stop

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

let port = await HDMIInput.close()
console.log(port)

Value of port:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.close",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

edidVersion

Property for each port’s active EDID version.

To get the value of edidVersion call the method like this:

function edidVersion(port: HDMIPortId): Promise<EDIDVersion>

Parameters:

Param Type Required Description
port HDMIPortId true
pattern: ^HDMI[0-9]+$

Promise resolution:

EDIDVersion

Capabilities:

Role Capability
uses xrn:firebolt:capability:inputs:hdmi

Examples

Default Example

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

let edidVersion = await HDMIInput.edidVersion('HDMI1')
console.log(edidVersion)

Value of edidVersion:

'2.0'
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.edidVersion",
  "params": {
    "port": "HDMI1"
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "2.0"
}

Default Example #2

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

let edidVersion = await HDMIInput.edidVersion('HDMI1')
console.log(edidVersion)

Value of edidVersion:

'2.0'
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.edidVersion",
  "params": {
    "port": "HDMI1"
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "1.4"
}

To set the value of edidVersion call the method like this:

function edidVersion(port: HDMIPortId, value: EDIDVersion): Promise<void>

Parameters:

Param Type Required Description
port HDMIPortId true
pattern: ^HDMI[0-9]+$
value EDIDVersion true
values: '1.4' \| '2.0' \| 'unknown'

Promise resolution:

Examples

Default Example

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

let result = await HDMIInput.edidVersion('HDMI1', '2.0')
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.setEdidVersion",
  "params": {
    "port": "HDMI1",
    "value": "2.0"
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

Default Example #2

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

let result = await HDMIInput.edidVersion('HDMI1', '1.4')
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.setEdidVersion",
  "params": {
    "port": "HDMI1",
    "value": "1.4"
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

To subscribe to notifications when the value changes, call the method like this:

function edidVersion(
  port: HDMIPortId,
  callback: (value) => EDIDVersion,
): Promise<number>

Parameters:

Param Type Required Description
port HDMIPortId true
pattern: ^HDMI[0-9]+$

Promise resolution:

number

Examples

Default Example

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

let listenerId = await edidVersion((value) => {
  console.log(value)
})
console.log(listenerId)

Value of edidVersion:

'2.0'
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.onEdidVersionChanged",
  "params": {
    "port": "HDMI1",
    "listen": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "2.0"
}

Default Example #2

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

let listenerId = await edidVersion((value) => {
  console.log(value)
})
console.log(listenerId)

Value of edidVersion:

'2.0'
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.onEdidVersionChanged",
  "params": {
    "port": "HDMI1",
    "listen": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "1.4"
}

listen

To listen to a specific event pass the event name as the first parameter:

listen(event: string, callback: (data: any) => void): Promise<number>

Parameters:

Param Type Required Summary
event string Yes The event to listen for, see Events.
callback function Yes A function that will be invoked when the event occurs.

Promise resolution:

Type Description
number Listener ID to clear the callback method and stop receiving the event, e.g. HDMIInput.clear(id)

Callback parameters:

Param Type Required Summary
data any Yes The event data, which depends on which event is firing, see Events.

To listen to all events from this module pass only a callback, without specifying an event name:

listen(callback: (event: string, data: any) => void): Promise<number>

Parameters:

Param Type Required Summary
callback function Yes A function that will be invoked when the event occurs. The event data depends on which event is firing, see Events.

Callback parameters:

Param Type Required Summary
event string Yes The event that has occured listen for, see Events.
data any Yes The event data, which depends on which event is firing, see Events.

Promise resolution:

Type Description
number Listener ID to clear the callback method and stop receiving the event, e.g. HDMIInput.clear(id)

See Listening for events for more information and examples.

lowLatencyMode

Property for the low latency mode setting.

To get the value of lowLatencyMode call the method like this:

function lowLatencyMode(): Promise<boolean>

Promise resolution:

Capabilities:

Role Capability
uses xrn:firebolt:capability:inputs:hdmi

Examples

Default Example

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

let enabled = await HDMIInput.lowLatencyMode()
console.log(enabled)

Value of enabled:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.lowLatencyMode",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default Example #2

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

let enabled = await HDMIInput.lowLatencyMode()
console.log(enabled)

Value of enabled:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.lowLatencyMode",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": false
}

To set the value of lowLatencyMode call the method like this:

function lowLatencyMode(value: boolean): Promise<void>

Parameters:

Param Type Required Description
value boolean true  

Promise resolution:

Examples

Default Example

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

let result = await HDMIInput.lowLatencyMode(true)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.setLowLatencyMode",
  "params": {
    "value": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

Default Example #2

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

let result = await HDMIInput.lowLatencyMode(false)
console.log(result)

Value of result:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.setLowLatencyMode",
  "params": {
    "value": false
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

To subscribe to notifications when the value changes, call the method like this:

function lowLatencyMode(callback: (value) => boolean): Promise<number>

Promise resolution:

number

Examples

Default Example

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

let listenerId = await lowLatencyMode((value) => {
  console.log(value)
})
console.log(listenerId)

Value of enabled:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.onLowLatencyModeChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": true
}

Default Example #2

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

let listenerId = await lowLatencyMode((value) => {
  console.log(value)
})
console.log(listenerId)

Value of enabled:

true
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.onLowLatencyModeChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": false
}

once

To listen to a single instance of a specific event pass the event name as the first parameter:

once(event: string, callback: (data: any) => void): Promise<number>

The once method will only pass the next instance of this event, and then dicard the listener you provided.

Parameters:

Param Type Required Summary
event string Yes The event to listen for, see Events.
callback function Yes A function that will be invoked when the event occurs.

Promise resolution:

Type Description
number Listener ID to clear the callback method and stop receiving the event, e.g. HDMIInput.clear(id)

Callback parameters:

Param Type Required Summary
data any Yes The event data, which depends on which event is firing, see Events.

To listen to the next instance only of any events from this module pass only a callback, without specifying an event name:

once(callback: (event: string, data: any) => void): Promise<number>

Parameters:

Param Type Required Summary
callback function Yes A function that will be invoked when the event occurs. The event data depends on which event is firing, see Events.

Callback parameters:

Param Type Required Summary
event string Yes The event that has occured listen for, see Events.
data any Yes The event data, which depends on which event is firing, see Events.

Promise resolution:

Type Description
number Listener ID to clear the callback method and stop receiving the event, e.g. HDMIInput.clear(id)

See Listening for events for more information and examples.

open

Opens the HDMI Port allowing it to be the active source device. Incase there is a different HDMI portId already set as the active source, this call would stop the older portId before opening the given portId.

function open(portId: HDMIPortId): Promise<void>

Parameters:

Param Type Required Description
portId HDMIPortId true
pattern: ^HDMI[0-9]+$

Promise resolution:

Capabilities:

Role Capability
manages xrn:firebolt:capability:inputs:hdmi

Examples

Default Example for open

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

let port = await HDMIInput.open('HDMI1')
console.log(port)

Value of port:

null
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.open",
  "params": {
    "portId": "HDMI1"
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}

port

Retrieve a specific HDMI input port.

function port(portId: HDMIPortId): Promise<HDMIInputPort>

Parameters:

Param Type Required Description
portId HDMIPortId true
pattern: ^HDMI[0-9]+$

Promise resolution:

HDMIInputPort

Capabilities:

Role Capability
uses xrn:firebolt:capability:inputs:hdmi

Examples

Default Example

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

let port = await HDMIInput.port('HDMI1')
console.log(port)

Value of port:

{
	"port": "HDMI1",
	"connected": true,
	"signal": "stable",
	"arcCapable": true,
	"arcConnected": true,
	"edidVersion": "2.0",
	"autoLowLatencyModeCapable": true,
	"autoLowLatencyModeSignalled": true
}
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.port",
  "params": {
    "portId": "HDMI1"
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "port": "HDMI1",
    "connected": true,
    "signal": "stable",
    "arcCapable": true,
    "arcConnected": true,
    "edidVersion": "2.0",
    "autoLowLatencyModeCapable": true,
    "autoLowLatencyModeSignalled": true
  }
}

ports

Retrieve a list of HDMI input ports.

function ports(): Promise<HDMIInputPort[]>

Promise resolution:

Capabilities:

Role Capability
uses xrn:firebolt:capability:inputs:hdmi

Examples

Default Example

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

let ports = await HDMIInput.ports()
console.log(ports)

Value of ports:

;[
  {
    port: 'HDMI1',
    connected: true,
    signal: 'stable',
    arcCapable: true,
    arcConnected: true,
    edidVersion: '2.0',
    autoLowLatencyModeCapable: true,
    autoLowLatencyModeSignalled: true,
  },
]
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.ports",
  "params": {}
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "port": "HDMI1",
      "connected": true,
      "signal": "stable",
      "arcCapable": true,
      "arcConnected": true,
      "edidVersion": "2.0",
      "autoLowLatencyModeCapable": true,
      "autoLowLatencyModeSignalled": true
    }
  ]
}

Events

autoLowLatencyModeCapableChanged

See: autoLowLatencyModeCapable

autoLowLatencyModeSignalChanged

function listen('autoLowLatencyModeSignalChanged', () => void): Promise<number>

See also: listen(), once(), clear().

Event value:

AutoLowLatencyModeSignalChangedInfo

Capabilities:

Role Capability
uses xrn:firebolt:capability:inputs:hdmi

Examples

Default Example

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

HDMIInput.listen('autoLowLatencyModeSignalChanged', (info) => {
  console.log(info)
})

Value of info:

{
	"port": "HDMI1",
	"autoLowLatencyModeSignalled": true
}
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.onAutoLowLatencyModeSignalChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "port": "HDMI1",
    "autoLowLatencyModeSignalled": true
  }
}

connectionChanged

function listen('connectionChanged', () => void): Promise<number>

See also: listen(), once(), clear().

Event value:

ConnectionChangedInfo

Capabilities:

Role Capability
uses xrn:firebolt:capability:inputs:hdmi

Examples

Default Example

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

HDMIInput.listen('connectionChanged', (info) => {
  console.log(info)
})

Value of info:

{
	"port": "HDMI1",
	"connected": true
}
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.onConnectionChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "port": "HDMI1",
    "connected": true
  }
}

edidVersionChanged

See: edidVersion

lowLatencyModeChanged

See: lowLatencyMode

signalChanged

function listen('signalChanged', () => void): Promise<number>

See also: listen(), once(), clear().

Event value:

SignalChangedInfo

Capabilities:

Role Capability
uses xrn:firebolt:capability:inputs:hdmi

Examples

Default Example

JavaScript:

import { HDMIInput } from '@firebolt-js/manage-sdk'

HDMIInput.listen('signalChanged', (info) => {
  console.log(info)
})

Value of info:

{
	"port": "HDMI1",
	"signal": "stable"
}
JSON-RPC:

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "HDMIInput.onSignalChanged",
  "params": {
    "listen": true
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "port": "HDMI1",
    "signal": "stable"
  }
}

Types

EDIDVersion

EDIDVersion: {
    V1_4: '1.4',
    V2_0: '2.0',
    UNKNOWN: 'unknown',
},


HDMISignalStatus

HDMISignalStatus: {
    NONE: 'none',
    STABLE: 'stable',
    UNSTABLE: 'unstable',
    UNSUPPORTED: 'unsupported',
    UNKNOWN: 'unknown',
},


HDMIPortId



SignalChangedInfo

type SignalChangedInfo = {
  port: HDMIPortId
  signal: HDMISignalStatus
}

See also:

HDMIPortId HDMISignalStatus


AutoLowLatencyModeSignalChangedInfo

type AutoLowLatencyModeSignalChangedInfo = {
  port?: HDMIPortId
  autoLowLatencyModeSignalled?: boolean
}

See also:

HDMIPortId


HDMIInputPort

type HDMIInputPort = {
  port: HDMIPortId
  connected: boolean
  signal: HDMISignalStatus
  arcCapable: boolean
  arcConnected: boolean
  edidVersion: EDIDVersion
  autoLowLatencyModeCapable: boolean
  autoLowLatencyModeSignalled: boolean
}

See also:

HDMIPortId HDMISignalStatus EDIDVersion


AutoLowLatencyModeCapableChangedInfo

type AutoLowLatencyModeCapableChangedInfo = {
  port: HDMIPortId
  enabled: boolean
}

See also:

HDMIPortId


ConnectionChangedInfo

type ConnectionChangedInfo = {
  port?: HDMIPortId
  connected?: boolean
}

See also:

HDMIPortId