Class InputSource#changeInputSource
InputSource
- Defined in: inputSource.js
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
InputSource#changeInputSource(successCallback, errorCallback, options)
Changes the input source that viewer is currently watching.
|
Class Detail
InputSource#changeInputSource(successCallback, errorCallback, options)
Changes the input source that viewer is currently watching. This method is used to change to other input source after initializing the inputSource object (creating video tag. etc.) using InputSource.initialize() method.
Available input types and number of input sources for each input types may differ model by model.
For example, LS55A model has the following inputs : (HDMI1, HDMI2, DP, DVI) or SM5B model has the following inputs : (HDMI1, DP, DVI, RGB, OPS)
For example, LS55A model has the following inputs : (HDMI1, HDMI2, DP, DVI) or SM5B model has the following inputs : (HDMI1, DP, DVI, RGB, OPS)
// Javascript code
function changeInputSource () {
var options = {
src : "ext://hdmi:1"
};
function successCb() {
// Do something
}
function failureCb(cbObject) {
var errorCode = cbObject.errorCode;
var errorText = cbObject.errorText;
console.log ("Error Code [" + errorCode + "]: " + errorText);
}
var inputSource = new InputSource();
inputSource.changeInputSource(successCb, failureCb, options);
}
- Parameters:
- {Function} successCallback
- success callback function.
- {Function} errorCallback
- failure callback function.
- {Object} options
Property Type Description Required src String Define the src attribute of video tag. "ext://[externalinput]:[portNum]" (eg, "ext://dp:1") required
- Since:
- 1.0
- Returns:
If the method is successfully executed, success callback function is called without a parameter. If an error occurs, failure callback function is called with failure callback object as a parameter.
- See:
- InputSource.getInputSourceStatus()