Method Summary
|
apply
(
|
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
(
|
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
(
|
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
(
|
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
(
|
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
(
|
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
(
|
This method removes an event listener for a specific event. |
Methods
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:
Parameters:
-
Name Type Description typenumber The event type of the event to subscribe to.
listenerToiEventListener 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.
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 callbacksAsyncCallback 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:
-
Type: ToiAsynchronousOperation
operation The asynchronous operation created by the function.
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.
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 outputIdToiVideoOutputConfiguration.ToiVideoOutputId Output identifier.
configurationToiVideoOutputConfigurationSession.ToiConfiguration The output configuration.
Throws:
-
ToiOperationNotSupportedException Raised if output can not be set.
ToiInvalidArgumentException Raised if outputId is an invalid output.
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 colorSystemToiVideoOutputConfiguration.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.
Get current color system.
Inherited From:
Returns:
-
Type: ToiVideoOutputConfiguration.ToiColorSystem
Current color system.
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:
Parameters:
-
Name Type Description outputIdToiVideoOutputConfiguration.ToiVideoOutputId Video output identifier.
Throws:
-
ToiInvalidArgumentException Raised if outputId is an invalid output.
Returns:
-
Type: ToiVideoOutputConfiguration.ToiDisplayInfo
Information for available displays.
Get information about current settings for a video output. The information is dependent on the currently applied settings for all outputs.
Inherited From:
Parameters:
-
Name Type Description outputIdToiVideoOutputConfiguration.ToiVideoOutputId Video output identifier.
Throws:
-
ToiOperationNotSupportedException Raised if outputs can not be listed.
ToiInvalidArgumentException Raised if outputId is an invalid output.
Returns:
-
Type: ToiVideoOutputConfiguration.ToiVideoOutputInfo
The video output information.
Returns available video outputs.
Inherited From:
Returns:
-
Type: Array.<ToiVideoOutputConfiguration.ToiVideoOutputId>
List of video output identifiers.
Get supported color systems.
Inherited From:
Returns:
-
Type: Array.<ToiVideoOutputConfiguration.ToiColorSystem>
Supported color systems.
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.
This method removes an event listener for a specific event.
Inherited From:
Parameters:
-
Name Type Description typenumber The event type of the event to remove the listener from.
listenerToiEventListener 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.
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
Composite output configuration
Struct fields
| Name | Description |
|---|---|
| aspectRatio
[optional] |
Configures the aspect ratio for a video output. Type: ToiVideoOutputConfiguration.ToiAspectRatio |
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 |
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 |
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 |