Class InputSource#getInputSourceStatus
InputSource
- Defined in: inputSource.js
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
InputSource#getInputSourceStatus(successCallback, errorCallback)
Gets current input source status.
|
Class Detail
InputSource#getInputSourceStatus(successCallback, errorCallback)
Gets current input source status.
// Javascript code
function getInputSourceStatus () {
function successCb(cbObject) {
var inputSourceList = cbObject.inputSourceList;
for ( var i = 0; i < inputSourceList.length; i++) {
console.log("inputSourceList[" + i + "] : " + JSON.stringify(inputSourceList[i]));
console.log("inputSourceList[" + i + "].inputPort : " + inputSourceList[i].inputPort);
}
console.log("currentInputSource : " + cbObject.currentInputSource);
console.log("currentSignalState : " + cbObject.currentSignalState);
// Do something
}
function failureCb(cbObject) {
var errorCode = cbObject.errorCode;
var errorText = cbObject.errorText;
console.log ("Error Code [" + errorCode + "]: " + errorText);
}
var inputSource = new InputSource();
inputSource.getInputSourceStatus(successCb, failureCb);
}
- Parameters:
- {Function} successCallback
- success callback function.
- {Function} errorCallback
- failure callback function.
- Since:
- 1.0
- Returns:
- {Object} array of inputSource object, signal state and current input source.
Property Type Description inputSourceList[] Array An array with input source object. inputSourceList[].inputPort String Input label (ext://hdmi:1, ext://hdmi:2, ext://dp:1, ext://dvi:1 etc) currentSignalState String Status and change information of the input that is currently selected.
"good" : good signal, "bad" : poor signal, "unknown" : can't indicate a signal statuscurrentInputSource String Input source that the viewer is currently watching.
input label - See:
- InputSource.changeInputSource()