• Quick Start
  • Booting
  • Platform
  • Portals
  • References
    • API Reference TOI3
    • IIP Reference
  • Resources
ARRIS Enterprises, Inc. Confidential Information

ToiVideoOutputConfigurationSession

Class Summary

Extends:
  • ToiVideoOutputConfiguration

The ToiVideoOutputConfigurationSession interface allows session based changes of video output settings.

When the session is created it contains currently applied settings for all outputs. To create a session without configuration settings for any output call ToiVideoOutputConfigurationSession#clear.

For detectable outputs, i.e. outputs that can detect and uniquely identify a connected display (like HDMI) the settings will be stored and reapplied when the display is (re-)connected. The permanent settings can be removed by performing a factory reset.

If the display is switched during a session (see ToiVideoOutputConfigurationObserver#onDisplayCapabilitiesChanged), any applied changes will become unrevertable, and the session will contain the settings of the connected display.

  • Methods
  • Members

Method Summary

apply ( callbacks )  → operation

Applies the changes made in the configuration session and makes the changes permanent.

ToiVideoOutputConfigurationSession#apply is asynchronous and the call is considered finished as soon as the ToiAsynchronousOperation has been completed.

Until the operation is completed it is not allowed to call any methods except ToiVideoOutputConfigurationSession#releaseInstance for the session or cancel() for the asynchronous operation. Violating this rule will result in a ToiOperationNotSupportedException exception.

If settings has been changed on an output that can detect and uniquely identify a connected display (like HDMI), then a successful ToiVideoOutputConfigurationSession#apply call will result in a setting that is stored in association with the current connected display. This associated setting will automatically be reapplied when the display is connected.

clear ( )

Clears this configuration session.

After a call to ToiVideoOutputConfigurationSession#clear, the output configuration for each output is undefined and must be set via ToiVideoOutputConfigurationSession#configure.

configure ( outputId , configuration )

Tries to configure output with the supplied configuration.

The ToiVideoOutputConfigurationSession#configure method is designed to be used together with ToiVideoOutputConfigurationSession#getOutputInfo. ToiVideoOutputConfigurationSession#getOutputInfo will provide information on what type of settings are valid or legal and ToiVideoOutputConfigurationSession#configure will be used to change them. Note that the settings are not applied until ToiVideoOutputConfigurationSession#apply has been called.

In most cases ToiVideoOutputConfigurationSession#configure will only be called once per output configuration. This will be the case when, for example, configuring video mode on an HDMI output or when changing output mode on a SCART output. More advanced settings may require a series of calls to ToiVideoOutputConfigurationSession#configure. In those scenarios configuring an output should be seen as an incremental process where each call gets the user closer to a valid, final, configuration.

configureColorSystem ( colorSystem )

Tries to configure color system, e.g. NTSC or PAL.

Using ToiVideoOutputConfigurationSession#configureColorSystem will affect all outputs and settings. This is why it is separated from ToiVideoOutputConfigurationSession#configure. To change color system, ToiVideoOutputConfigurationSession#configureColorSystem must be called before ToiVideoOutputConfigurationSession#configure.

releaseInstance ( )

This function releases the resources used by this instance and ends the configuration session. If ToiVideoOutputConfigurationSession#apply has not been called, the session configuration is lost. When this function returns all observers has also been released.

revert ( )

Reverts a configuration session to the state it had when first being created or the display has been switched, even if changes have been applied. The reverted configuration is not applied until ToiVideoOutputConfigurationSession#apply is called.

Inherited Methods

addEventListener ( type , listener )

This method registers an event listener for a specific event. Multiple listeners can be added for the same event. Events are broadcast to all registered listeners.

getColorSystem ( )  → colorSystem

Get current color system.

getDisplayCapabilities ( outputId )  → info

Returns information about the capabilities of a display that is connected to a video output. If no display is connected then the corresponding display information will be empty.

getOutputInfo ( outputId )  → info

Get information about current settings for a video output. The information is dependent on the currently applied settings for all outputs.

getOutputs ( )  → Array.<ToiVideoOutputConfiguration.ToiVideoOutputId>

Returns available video outputs.

getSupportedColorSystems ( )  → Array.<ToiVideoOutputConfiguration.ToiColorSystem>

Get supported color systems.

removeEventListener ( type , listener )

This method removes an event listener for a specific event.

Methods

addEventListener ( type , listener )

This method registers an event listener for a specific event. Multiple listeners can be added for the same event. Events are broadcast to all registered listeners.

Inherited From:

  • ToiEventTarget#addEventListener

Parameters:

Name Type Description
type number

The event type of the event to subscribe to.

listener ToiEventListener

The JavaScript function that will receive events.

Throws:

ToiInvalidArgumentException Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the application calls addEventListener with the same combination of type and listener twice.

apply ( callbacks )  → operation

Applies the changes made in the configuration session and makes the changes permanent.

ToiVideoOutputConfigurationSession#apply is asynchronous and the call is considered finished as soon as the ToiAsynchronousOperation has been completed.

Until the operation is completed it is not allowed to call any methods except ToiVideoOutputConfigurationSession#releaseInstance for the session or cancel() for the asynchronous operation. Violating this rule will result in a ToiOperationNotSupportedException exception.

If settings has been changed on an output that can detect and uniquely identify a connected display (like HDMI), then a successful ToiVideoOutputConfigurationSession#apply call will result in a setting that is stored in association with the current connected display. This associated setting will automatically be reapplied when the display is connected.

Parameters:

Name Type Description
callbacks AsyncCallback

Object with callback functions for the asynchronous operation. No result is produced by this method, so callbacks.onResult() will not be invoked..

Throws:

ToiOperationNotSupportedException

Raised if ToiVideoOutputConfigurationSession#apply cannot be performed.

Returns:

operation The asynchronous operation created by the function.

Type: ToiAsynchronousOperation
clear ( )

Clears this configuration session.

After a call to ToiVideoOutputConfigurationSession#clear, the output configuration for each output is undefined and must be set via ToiVideoOutputConfigurationSession#configure.

Throws:

ToiOperationNotSupportedException

Raised if ToiVideoOutputConfigurationSession#clear cannot be performed.

configure ( outputId , configuration )

Tries to configure output with the supplied configuration.

The ToiVideoOutputConfigurationSession#configure method is designed to be used together with ToiVideoOutputConfigurationSession#getOutputInfo. ToiVideoOutputConfigurationSession#getOutputInfo will provide information on what type of settings are valid or legal and ToiVideoOutputConfigurationSession#configure will be used to change them. Note that the settings are not applied until ToiVideoOutputConfigurationSession#apply has been called.

In most cases ToiVideoOutputConfigurationSession#configure will only be called once per output configuration. This will be the case when, for example, configuring video mode on an HDMI output or when changing output mode on a SCART output. More advanced settings may require a series of calls to ToiVideoOutputConfigurationSession#configure. In those scenarios configuring an output should be seen as an incremental process where each call gets the user closer to a valid, final, configuration.

Parameters:

Name Type Description
outputId ToiVideoOutputConfiguration.ToiVideoOutputId

Output identifier.

configuration ToiVideoOutputConfigurationSession.ToiConfiguration

The output configuration.

Throws:

ToiOperationNotSupportedException

Raised if output can not be set.

ToiInvalidArgumentException

Raised if outputId is an invalid output.

configureColorSystem ( colorSystem )

Tries to configure color system, e.g. NTSC or PAL.

Using ToiVideoOutputConfigurationSession#configureColorSystem will affect all outputs and settings. This is why it is separated from ToiVideoOutputConfigurationSession#configure. To change color system, ToiVideoOutputConfigurationSession#configureColorSystem must be called before ToiVideoOutputConfigurationSession#configure.

Parameters:

Name Type Description
colorSystem ToiVideoOutputConfiguration.ToiColorSystem

Color system setting.

Throws:

ToiOperationNotSupportedException

Raised if color system can not be changed.

ToiInvalidArgumentException

Raised if specified color system cannot be set.

ToiInvalidPreconditionException

Raised if there is already a configuration ongoing, i.e. ToiVideoOutputConfigurationSession#configure has already been called by application.

getColorSystem ( )  → colorSystem

Get current color system.

Inherited From:

  • ToiVideoOutputConfiguration#getColorSystem

Returns:

Current color system.

Type: ToiVideoOutputConfiguration.ToiColorSystem
getDisplayCapabilities ( outputId )  → info

Returns information about the capabilities of a display that is connected to a video output. If no display is connected then the corresponding display information will be empty.

Inherited From:

  • ToiVideoOutputConfiguration#getDisplayCapabilities

Parameters:

Name Type Description
outputId ToiVideoOutputConfiguration.ToiVideoOutputId

Video output identifier.

Throws:

ToiInvalidArgumentException

Raised if outputId is an invalid output.

Returns:

Information for available displays.

Type: ToiVideoOutputConfiguration.ToiDisplayInfo
getOutputInfo ( outputId )  → info

Get information about current settings for a video output. The information is dependent on the currently applied settings for all outputs.

Inherited From:

  • ToiVideoOutputConfiguration#getOutputInfo

Parameters:

Name Type Description
outputId ToiVideoOutputConfiguration.ToiVideoOutputId

Video output identifier.

Throws:

ToiOperationNotSupportedException

Raised if outputs can not be listed.

ToiInvalidArgumentException

Raised if outputId is an invalid output.

Returns:

The video output information.

Type: ToiVideoOutputConfiguration.ToiVideoOutputInfo
getOutputs ( )  → Array.<ToiVideoOutputConfiguration.ToiVideoOutputId>

Returns available video outputs.

Inherited From:

  • ToiVideoOutputConfiguration#getOutputs

Returns:

List of video output identifiers.

Type: Array.<ToiVideoOutputConfiguration.ToiVideoOutputId>
getSupportedColorSystems ( )  → Array.<ToiVideoOutputConfiguration.ToiColorSystem>

Get supported color systems.

Inherited From:

  • ToiVideoOutputConfiguration#getSupportedColorSystems

Returns:

Supported color systems.

Type: Array.<ToiVideoOutputConfiguration.ToiColorSystem>
releaseInstance ( )

This function releases the resources used by this instance and ends the configuration session. If ToiVideoOutputConfigurationSession#apply has not been called, the session configuration is lost. When this function returns all observers has also been released.

removeEventListener ( type , listener )

This method removes an event listener for a specific event.

Inherited From:

  • ToiEventTarget#removeEventListener

Parameters:

Name Type Description
type number

The event type of the event to remove the listener from.

listener ToiEventListener

The JavaScript function that was previously added as an event listener.

Throws:

ToiInvalidArgumentException Raised if the event type is not supported by this object or if the listener is not a valid JavaScript function. This exception is also raised if the listener has not previously been added.

revert ( )

Reverts a configuration session to the state it had when first being created or the display has been switched, even if changes have been applied. The reverted configuration is not applied until ToiVideoOutputConfigurationSession#apply is called.

Throws:

ToiOperationNotSupportedException

Raised if ToiVideoOutputConfigurationSession#revert cannot be performed.

Members

ToiCompositeConfiguration (Type: struct) (static)

Composite output configuration

Struct fields

Name Description
aspectRatio
[optional]

Configures the aspect ratio for a video output.

Type: ToiVideoOutputConfiguration.ToiAspectRatio

ToiConfiguration (Type: struct) (static)

Output configuration.

The configuration is divided into connection type specific parts.

Struct fields

Name Description
composite
[optional]

Composite configuration.

Type: ToiVideoOutputConfigurationSession.ToiCompositeConfiguration
hdmi
[optional]

HDMI configuration.

Type: ToiVideoOutputConfigurationSession.ToiHdmiConfiguration
scart
[optional]

SCART configuration.

Type: ToiVideoOutputConfigurationSession.ToiScartConfiguration

ToiHdmiConfiguration (Type: struct) (static)

HDMI output settings

This configuration can be provided to ToiVideoOutputConfigurationSession#configure either as a complete configuration (with all attributes set) or provided piece by piece by only setting a subset of all attributes for each ToiVideoOutputConfigurationSession#configure call. The latter way usually involves probing allowed settings using ToiVideoOutputConfigurationSession#getOutputInfo.

Struct fields

Name Description
aspectRatio
[optional]

Configures the aspect ratio for an output. The attribute is used to indicate the aspect ratio of the display that is connected to the output.

Type: ToiVideoOutputConfiguration.ToiAspectRatio
colorDepth
[optional]

The attribute is used for advanced configuration of HDMI color depth. The user should avoid trying to manually configure this attribute and instead let the service choose one automatically.

If the attribute is not set, the service will pick the optimal color depth with respect to the current setup (i.e. the configuration and the connected display).

Type: ToiVideoOutputConfiguration.ToiColorDepth
colorLevel
[optional]

The attribute is used for advanced configuration of HDMI color level. The user should avoid trying to manually configure this attribute and instead let the service choose one automatically.

If the attribute is not set, the service will pick the optimal color level with respect to the current setup (i.e. the configuration and the connected display).

Type: ToiVideoOutputConfiguration.ToiColorLevel
colorSpace
[optional]

The attribute is used for advanced configuration of HDMI color space. The user should avoid trying to manually configure this attribute and instead let the service choose one automatically.

If the attribute is not set, the service will pick the optimal color space with respect to the current setup (i.e. the configuration and the connected display).

Type: ToiVideoOutputConfiguration.ToiColorSpace
ignoreDisplayCapabilities
[optional]

If set to true, ignore display restrictions. In the HDMI case this means to ignore the EDID. Default is to consider display restrictions.

If this is set to true on a configuration with multiple attributes set, it will ignore display capabilities for all of those attributes. Subsequent calls to ToiVideoOutputConfigurationSession#configure will not remember the setting of this attribute, e.g. it is possible to ignore capabilities when configuring video mode, but not when setting color space.

Type: boolean
mode
[optional]

Configures the video mode for an output.

The valid modes with respect to the current configuration can be found in ToiHdmiOutputInfo.AllowedModes available from ToiVideoOutputConfigurationSession#getOutputInfo.

If IgnoreDisplayCapabilities is set to true, then all modes in ToiHdmiOutputInfo.ConfigurableModes can be used.

Type: ToiVideoOutputConfiguration.ToiVideoMode
scanBehavior
[optional]

The attribute is used for advanced configuration of HDMI scan behavior. The user should avoid trying to manually configure this attribute and instead let the service choose one automatically.

If the attribute is not set, the service will pick the optimal scan behavior with respect to the current setup (i.e. the configuration and the connected display).

Type: ToiVideoOutputConfiguration.ToiScanBehavior
signalMode
[optional]

The attribute is used for advanced configuration of HDMI signal mode. The user should avoid trying to manually configure this attribute and instead let the service choose one automatically.

If the attribute is not set, the service will pick the best mode with respect to the current setup.

Type: ToiVideoOutputConfiguration.ToiHdmiSignalMode

ToiScartConfiguration (Type: struct) (static)

SCART output configuration

Struct fields

Name Description
aspectRatio
[optional]

Configures the aspect ratio for a video output.

Type: ToiVideoOutputConfiguration.ToiAspectRatio
scartMode
[optional]

Configures the SCART mode for a video output.

Type: ToiVideoOutputConfiguration.ToiScartMode

5.0.1

Copyright (c) 2016 ARRIS Enterprises, LLC. All Rights Reserved. ARRIS Enterprises, LLC. Confidential Information.