Page tree
Skip to end of metadata
Go to start of metadata

ON THIS PAGE

The videoinput object allows you to retrieve information about the HDMI input and configure EDID settings for it.

videoinput IDL
[
    GarbageCollected
] interface VideoInputConfiguration : EventTarget {
    VideoInputConfig defaultConfig();
    Promise <VideoInputConfig> getConfig();
    Promise <Status> applyConfig(VideoInputConfig config);
    Promise <HdmiInputStatus> getStatus();
    EventHandler hdmiinputchange;
};

interface VideoInputConfig {
    attribute bool enableAc3;
    attribute bool enableEac3;
    attribute bool enableTrueHdMlp;
    attribute bool enableDts;
    attribute bool enableDtsHd;
    attribute int maxSampleRate;
    attribute int maxChannelCount;
    attribute DOMString lockAudioTo;
};

interface Status {
    attribute bool rebootRequired;
};

interface HdmiInputStatus {
    attribute bool devicePresent;
    attribute int  width;
    attribute int  height;
    attribute bool interlaced;
    attribute float frameRate;
    attribute float pixelClock;
    attribute DOMString colorSpace;
    attribute DOMString audioType;
    attribute int audioSamplingRate;
};

Object Creation

To create a videoinput object, first load the brightsign/videoinput module using the Require() method. Then create an instance of the videoinput class.

var VideoInputClass = require("@brightsign/videoinput");
var vi = new VideoInputClass();

VideoInputConfiguration

Use this interface to retrieve and modify video input data.

Events

  • [EventHandler] hdmiinputchanged:  An event that is is raised when the hotplug status of the HDMI input changes. Use the addEventListener() method to listen for this event. Results are returned as a HDMIInputStatus interface.

Methods

defaultConfig()
VideoInputConfig defaultConfig() 

Immediately returns a VideoInputConfig interface containing default EDID-reporting values for the HDMI input.

getConfig()
Promise <VideoInputConfig> getConfig() 

Returns a VideoInputConfig interface containing the current EDID-reporting configuration for the HDMI input.

applyConfig()
Promise <Status> applyConfig(VideoInputConfig config) 

Configures EDID reporting for the HDMI input. By default, the input EDID includes video modes from the display attached to the HDMI output, some video modes supported by the player, and support for PCM audio up to 48kHz; it does not report proprietary media codecs that can be decoded by the device connected to the HDMI output, so you can use this method to announce such support if available at the endpoint. This method returns a promise containing a Status interface that indicates whether a reboot is required for the specified EDID-reporting settings to take effect. 

getStatus()
Promise <HdmiInputStatus> getStatus() 

Returns the current status of the HDMI input.

VideoInputConfig

This interface contains confugration data related to the video input.

  • [bool] enableAc3: A flag specifying whether AC-3 is supported
  • [bool] enableEac3: A flag specifying whether E-AC-3 is supported
  • [bool] enableTrueHdMlp: A flag specifying whether TrueHD MLP is supported
  • [bool] enableDts: A flag specifying whether DTS is supported
  • [bool] enableDtsHd: A flag specifying whether DTS-HD is supported
  • [int] maxSampleRate: The maximum supported PCM audio sampling rate in Hz (e.g. the default sampling rate is 48000)
  • [int] maxChannelCount: The number of PCM channels that are advertised over EDID. The default value is 2, which allows for stereo mixdown. Increasing this value to 6 allows the source to send multichannel PCM.

    Note

    If AC-3 or E-AC-3 is enabled on the player, multichannel audio is supported regardless of the maxChannelCount setting. 

  • [DOMString] lockAudioTo: A value specifying whether the audio sample rate clock is locked to the video clock ("video") or audio clock ("audio") of the incoming HDMI signal. The determination can also be left to the system software ("auto").

Status

This interface is returned by the applyConfig() method.

  • [bool] rebootRequired: A flag indicating whether or not a reboot is required for the change in EDID settings to take effect.

HDMIInputStatus

This interface contains information about the video source connected to the HDMI input: 

  • [bool] devicePresent: A flag indicating whether an HDMI input source is present (true) or not (false)
  • [int] width: The width of the source video
  • [int] height: The height of the source video
  • [bool] interlaced: A flag indicating whether the video source is interlaced
  • [float] frameRate: The framerate of the source video
  • [float] pixelClock: The pixel-clock rate of the source video (in MHz)
  • [DOMString] colorSpace: The color space of the source video, which can be one of the following: "RGB""YCbCr420""YCbCr422""YCbCr444"
  • [DOMString] audioType: The audio encoding of the source video, which can be either "PCM" or "Compressed"
  • [int] audioSamplingRate: The audio sampling rate of the source video (in Hz)

Example

var VideoInputClass = require("@brightsign/videoinput");
var vi = new VideoInputClass();


var inputConfig = {};
inputConfig.enableAc3 = true;

vi.applyConfig(inputConfig).then(
        function(data) {
            if (data.rebootRequired === true) {
                system.reboot();
            } else {
                console.log("Reboot not required.")
            }
        })
    .catch(
        function(data) {
            console.log(JSON.stringify(data));
        });

vi.getConfig().then(
        function(data) {
            console.log("***Current Config***");
            console.log(JSON.stringify(data));
        })
    .catch(
        function(data) {
            console.log(JSON.stringify(data));
        });

  • No labels