...
Code Block |
---|
language | js |
---|
title | videooutput IDL |
---|
collapse | true |
---|
|
[
GarbageCollected,interface VideoOutputEvent {
attribute String type;
};
callback VideoOutputEventCallback = void (VideoOutputEvent event);
[
constructor(DOMStringString interfaceName)
] interface VideoOutputConfiguration : EventTarget {
attribute DOMStringString type;
Promise<Size> getVideoResolution();
Promise<Size> getGraphicsResolution();
Promise<Size> getOutputResolution();
Promise<>Promise<void> adjustGraphicsColor(ColorProperties);
Promise<EdidIdentity> getEdidIdentity();
Promise<DOMString>Promise<String> getEdid();
Promise<>Promise<void> setMultiScreenBezel(int xPercentage, int yPercentage);
Promise<>Promise<void> setBackgroundColor(int color);
Promise<>Promise<void> setPowerSaveMode(bool enable);
Promise<>Promise<bool> set3dModegetPowerSaveMode(int mode);
Promise<>Promise<void> setSyncDomainset3dMode(DOMStringint domainmode);
Promise<bool> isAttached();
[type == "hdmi"] Promise<OutputStatus> getOutputStatus();
[type == "hdmi"] Promise<>Promise<void> disableAudio(bool disable);
[type == "hdmi"] Promise<TxHdcpStatus> getTxHdcpStatus();
[type == "hdmi"] Promise<>Promise<void> forceHdcpOn(bool);
EventHandler hotplugeventPromise<void> setSyncDomain(String domain)
Promise<void> setMpcdi(String filename);
void addEventListener(String type, VideoOutputEventCallback callback);
void removeEventListener(String type, VideoOutputEventCallback callback);
};
interface EdidIdentity {
attribute DOMStringString manufacturer;
attribute int product;
attribute int serialNumber;
attribute int weekOfManufacture;
attribute int yearOfManufacture;
attribute DOMStringString monitorName;
attribute DOMStringString textString;
attribute DOMStringString serialNumberString;
attribute bool bt2020RgbSupport;
attribute bool bt2020YccSupport;
attribute bool sdrEotfSupport;
attribute bool hdrEotfSupport;
attribute bool hdrSt2084Support;
attribute bool unstable};
}
interface OutputStatus {
attribute bool outputPresent;
attribute bool outputPowered;
attribute bool unstable;
attribute DOMStringString audioFormat;
attribute int audioSampleRate;
attribute int audioBitsPerSample;
attribute int audioChannelCount;
attribute DOMStringString eotf;
};
interface Size {
attribute int width;
attribute int height;
};
interface ColorProperties {
attribute int constrast;
attribute int saturation;
attribute int hue;
attribute int brightness;
};
interface TxHdcpStatus {
attribute DOMString state;
}; |
Object Creation
To create a videooutput object, first load the brightsign/videooutput
module using the require()
method. Then create an instance of the videooutput class with a string value specifying the video output to configure (currently accepted values are "hdmi" and "vga").
...
Use this interface to perform operations on the video output.
Events
[EventHandler] hotplugevent
: This event VideoOutputEvent
: An event that is raised when the hotplug status of the HDMI output changes.
Methods
getVideoResolution()
Code Block |
---|
|
Promise<Size> getVideoResolution() |
Returns the current resoultion resolution of the video plane.
getGraphicsResolution()
Code Block |
---|
|
Promise<Size> getGraphicsResolution() |
Returns the current resoultion resolution of the graphics plane.
getOutputResolution()
...
Note |
---|
|
In most cases, the values returned by the getVideoResolution(), getGraphicsResolution(), and getOutputResolution () methods will be identical. The "GraphicsResolution" and "VideoResolution" values will differ when a 4K video mode is selected and full-resolution graphics is not enabled: The graphics plane remains at HD (1920x1080), while the video plane expands to 4K (e.g. to 3840x2160). The "OutputResolution" value will differ from the other two values when the video output is upscaled: For example, when upscaling from HD to 4K, the "GraphicsResolution" and "VideoResolution" values will remain at 1920x1080, while the "OutputResolution" values will indicate 3840x2160. |
adjustGraphicsColor()
Code Block |
---|
|
Promise<> adjustGraphicsColor(ColorProperties) |
...
getEdid()
Code Block |
---|
|
Promise<DOMString>Promise<String> getEdid() |
Returns EDID information from a compatible monitor/television as a hex-encoded string
...
Disables HDMI output and the syncs for VGA output if passed true
. The absence of a signal will cause some monitors to go into standby mode.
getPowerSaveMode()
Code Block |
---|
|
Promise<bool> getPowerSaveMode() |
Returns T
rue
if power save mode is enabled on the video output.
set3dMode()
Code Block |
---|
|
Promise<> set3dMode(int mode) |
...
- 0: Standard mono video (default)
- 1: Side-by-side stereo video
- 2: Top-and-bottom stereo video
...
Code Block |
---|
|
Promise<> setSyncDomain(DOMString domain) |
Enables Genlock synchronization on the specified BSSyncManager/roSyncManager domain. To disable Genlock on the domain, pass an empty string to this method. To reconfigure an active Genlock synchronization, call SetSyncDomain()
again using the domain name of the new or edited sync-manager instance.
isAttached()
Code Block |
---|
|
Promise<bool> isAttached() |
Returns true
if the HDMI/VGA video connector is attached to an output device (i.e. the display EDID can be read successfully).
...
...
This method will always return false
if setPowerSaveMode(true)
has been called on the output.
getOutputStatus()
Code Block |
---|
|
[type == "hdmi"] Promise<OutputStatus> getOutputStatus() |
Returns an OutputStatus interface containing information about an attached HDMI display device OutputStatus which describes the current state of the video output and is defined below.
disableAudio()
Code Block |
---|
|
[type == "hdmi"] Promise<>Promise<void> disableAudio(bool disable) |
Disables HDMI audio output if passed true
. If passed True
, the video will continue to output.
getTxHdcpStatus()
Code Block |
---|
|
[type == "hdmi"] Promise<TxHdcpStatus> getTxHdcpStatus() |
Returns a TxHdcpStatus interface indcating the current HDCP status authentication state of the HDMI video output.
forceHdcpOn()
Code Block |
---|
|
[type == "hdmi"] Promise<>Promise<void> forceHdcpOn(bool) |
Forces Can be used to force HDCP authentication on the HDMI output if passed true
. Passing false
to this method will prevent forced authentication attempts with subsequent hotplug events. This method will return false
if the player does not support HDCP or if forceHDCPOn()
has already been called with the same valuevideo output. Even without HDCP forced on, there can still be HDCP on the output if an HDMI input has requested authentication.
setSyncDomain()
Anchor |
---|
| setsyncdomain |
---|
| setsyncdomain |
---|
|
Code Block |
---|
|
Promise<void> setSyncDomain(String domain) |
Passing any string will enable Genlock synchronization. To disable Genlock on the domain, pass an empty string to this method. Genlock synchronization will lock the vertical sync of the video output to the system clock reference. PTP is then used to synchronize the system clock of multiple players (for example, in a video wall).
setMpcdi()
Code Block |
---|
|
Promise<void> setMpcdi(String filename) |
Users that construct an MPCDI file as per the version1a 2D media profile should pass videoOutputHDMI.setMpcdi("SD:/filename.mpcdi")
to the BrightSign player to decode the file and apply the warp and blend to the output as per the requirements set in filename.mpcdi (replace "filename" with the name of your actual file). Passing an empty string will turn off the warp and blend, and the image will return to the normal format.
BrightSign Series 4 players implement all levels of the MPCDI 2D media profile (version 1a).
EdidIdentity
This interface contains EDID information about an attached display:
[DOMStringString] manufacturer
[int] product
[int] serialNumber
[int] weekOfManufacture
[int] yearOfManufacture
[DOMStringString] monitorName
[DOMStringString] textString
[DOMStringString] serialNumberString
[bool] bt2020RgbSupport
[bool] bt2020YccSupport
[bool] sdrEotfSupport
[bool] hdrEotfSupport
[bool] hdrSt2084Support
[bool] unstable
OutputStatus
This interface contains information about an attached HDMI display device.
...
This interface is returned by the getTxHdcpStatus()
method.
[
DOMStringString] state
: The HDCP status of the HDMI output, which can be one of the following values:"
notRequirednot-required"
: HDCP is not required by the player. HDCP is required by the player if the video has been decoded locally and needs protection or if the script has called the forceHdcpOn()
method. Note that, even if this parameter indicates "notRequired"
not-required
, HDCP might still be active in passthrough mode if an upstream HDMI source (i.e. a device connected to the HDMI input port on the player) has requested it."authenticated"
: HDCP has been enabled and successfully negotiated."
authenticationInProgressauthentication-in-progress"
: HDCP has been enabled but authentication is incomplete."
authenticationFailedauthentication-failed"
: HDCP has been requested but could not be negotiated.
Example
Code Block |
---|
|
var VideoOutputClass = require("@brightsign/videooutput");
var videoOutputHDMI = new VideoOutputClass("hdmi");
videoOutputHDMI.getOutputStatus().then(
function(data) {
console.log("\nPrint the HDMI output status");
console.log(JSON.stringify(data));
})
.catch(
function(data) {
console.log(JSON.stringify(data));
}) |
...