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

ON THIS PAGE

For more information about available methods, refer to the roVideoMode page.  If you’d like to change the video mode of the player, you will need to use BrightScript instead of this JavaScript class. 

Attributes

  • readonly attribute int resX
  • readonly attribute int resY
  • readonly attribute int safeX
  • readonly attribute int safeY
  • readonly attribute int safeWidth
  • readonly attribute int safe Height 
  • readonly attribute DOMString mode
  • readonly attribute BSDecoderModeList decoderModeList

Methods 

boolean IsAttached(in DOMString connector)

DOMString GetBestMode(in DOMString connector)

boolean SetBackgroundColour(in unsigned long rgb)

boolean SetBackgroundColour(in unsigned long r,
	in unsigned long g,
	in unsigned long b)

boolean SetPowerSaveMode(in boolean disable)

boolean HdmiAudioDisable(in boolean disable)
 
boolean SetDecoderMode(in DOMString decoder,
	in DOMString timeslice_mode,
	in int z_order,
	in DOMString friendly_name,
	in boolean enable_mosaic_deinterlacer)

BSDecoderMode

The decoderModeList attribute contains an array of BSDecoderMode objects, each containing information about a configured decoder on the player.

interface BSDecoderMode {
    readonly attribute DOMString decoderName;
    readonly attribute DOMString friendlyName;
    readonly attribute DOMString maxSize;
    readonly attribute DOMString configuredSize;
    readonly attribute unsigned long currentUsage;
    readonly attribute unsigned long maxUsage;
    readonly attribute boolean mosaic;
    readonly attribute boolean enableDeinterlacer;
};

Note

See the SetDecoderMode() and GetDecoderMode() entries on the roVideoMode page for more information about decoder parameters.

Example

The following JavaScript example illustrates how to retrieve information about the current video mode:

function fillInVideoData()
    {
        var videomode_info = new BSVideoMode();
        document.getElementById("resX").innerHTML = videomode_info.resX;
        document.getElementById("resY").innerHTML = videomode_info.resY;
        document.getElementById("safeX").innerHTML = videomode_info.safeX;
        document.getElementById("safeY").innerHTML = videomode_info.safeY;
        document.getElementById("safeWidth").innerHTML = videomode_info.safeWidth;
        document.getElementById("safeHeight").innerHTML = videomode_info.safeHeight;
        document.getElementById("videoMode").innerHTML = videomode_info.mode;
        document.getElementById("bestMode").innerHTML = videomode_info.GetBestMode("hdmi");
        document.getElementById("connectedFlag").innerHTML = videomode_info.IsAttached("vga");
    }

function changeBackground()
    {
        var videomode_info = new BSVideoMode();
        videomode_info.SetBackgroundColour(0xFF0000);
    }
  • No labels