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

ToiVideoOutputService

Class Summary

Extends:
  • ToiEventTarget

The Video Output Service is used to get and set video output configurations. It is also used to setup adaptive video mode rule sets. Adaptive video mode rule sets are mainly used to handle automatic aspect ratio conversion upon changes in the currently displayed video content. Adaptive video mode rule sets are defined at build time.

The Video Output service is also used to create instances of configuration sessions to modify the current video mode settings.

Service:

This is a service and can be accessed through toi.videoOutputService
  • Methods
  • Members
  • Types
  • Events

Method Summary

createSession ( )  → ToiVideoOutputConfigurationSession

This method creates a session that makes it possible to change the video output configuration.

getAdaptiveTriggers ( )  → Array.<ToiVideoOutputService.ToiAdaptiveTrigger>

Get the list of information about the active adaptive triggers, which are the triggers that have any values other than the ToiVideoOutputService.TRIGGER_NO_VALUE.

getAvailableAdaptiveRuleSetNames ( )  → Array.<ToiVideoOutputService.ToiAdaptiveRuleSetName>

Get a sequence of rule set names based on the available adaptive video rule sets that can be loaded.

getConfiguration ( )  → ToiVideoOutputConfiguration

This method returns the video output configuration.

getLoadedAdaptiveRuleSetNames ( )  → Array.<ToiVideoOutputService.ToiAdaptiveRuleSetName>

Get a sequence of rule set names based on the adaptive video rule sets that have been loaded.

loadAdaptiveRuleSets ( adaptiveRuleSets )

Loads a sequence of adaptive video rule sets based on their names. An empty sequence will unload all currently loaded rule sets. Each rule within a loaded rule set is evaluated in the order it is placed and all rule sets are evaluated in parallel.

resetConfiguration ( )

This method resets the video output configuration (including the currently active settings on the video outputs). All stored values will be cleared and set to build-time settings. Configuration of previously connected displays are lost. The method cannot be called when a ToiVideoOutputConfigurationSession is active.

setAdaptiveTrigger ( name , value )

Sets the value of the given adaptive trigger. Setting the value to ToiVideoOutputService.TRIGGER_NO_VALUE will deactivate the trigger.

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.

removeEventListener ( type , listener )

This method removes an event listener for a specific event.

Type Definitions

ToiAdaptiveRuleSetName (Type: string)

Name of a rule set.

Events

  • ON_ADAPTIVE_RULE_MATCHING_CHANGED

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.

createSession ( )  → ToiVideoOutputConfigurationSession

This method creates a session that makes it possible to change the video output configuration.

Throws:

ToiInvalidArgumentException

Raised if the specified application identifier is invalid.

ToiInvalidPreconditionException

Raised if another session is active.

Returns:

A ToiVideoOutputConfigurationSession object.

Type: ToiVideoOutputConfigurationSession
getAdaptiveTriggers ( )  → Array.<ToiVideoOutputService.ToiAdaptiveTrigger>

Get the list of information about the active adaptive triggers, which are the triggers that have any values other than the ToiVideoOutputService.TRIGGER_NO_VALUE.

Returns:

List of the active triggers.

Type: Array.<ToiVideoOutputService.ToiAdaptiveTrigger>
getAvailableAdaptiveRuleSetNames ( )  → Array.<ToiVideoOutputService.ToiAdaptiveRuleSetName>

Get a sequence of rule set names based on the available adaptive video rule sets that can be loaded.

Returns:

A sequence of rule sets names.

Type: Array.<ToiVideoOutputService.ToiAdaptiveRuleSetName>
getConfiguration ( )  → ToiVideoOutputConfiguration

This method returns the video output configuration.

Returns:

A ToiVideoOutputConfiguration object.

Type: ToiVideoOutputConfiguration
getLoadedAdaptiveRuleSetNames ( )  → Array.<ToiVideoOutputService.ToiAdaptiveRuleSetName>

Get a sequence of rule set names based on the adaptive video rule sets that have been loaded.

Returns:

A sequence of rule sets names.

Type: Array.<ToiVideoOutputService.ToiAdaptiveRuleSetName>
loadAdaptiveRuleSets ( adaptiveRuleSets )

Loads a sequence of adaptive video rule sets based on their names. An empty sequence will unload all currently loaded rule sets. Each rule within a loaded rule set is evaluated in the order it is placed and all rule sets are evaluated in parallel.

Parameters:

Name Type Description
adaptiveRuleSets Array.<ToiVideoOutputService.ToiAdaptiveRuleSetName>

A sequence of rule set names.

Throws:

ToiNotEnoughResourcesException

Raised if necessary resource can not be allocated.

ToiInvalidArgumentException

Raised if the rule set is unavailable.

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.

resetConfiguration ( )

This method resets the video output configuration (including the currently active settings on the video outputs). All stored values will be cleared and set to build-time settings. Configuration of previously connected displays are lost. The method cannot be called when a ToiVideoOutputConfigurationSession is active.

Throws:

ToiInvalidPreconditionException

Raised if a session is active.

setAdaptiveTrigger ( name , value )

Sets the value of the given adaptive trigger. Setting the value to ToiVideoOutputService.TRIGGER_NO_VALUE will deactivate the trigger.

Parameters:

Name Type Description
name string

The name of the adaptive trigger to set.

value string

The value to set. It can be any application defined value, plus the predefined ToiVideoOutputService.TRIGGER_NO_VALUE.

Throws:

ToiInvalidArgumentException

Raised if the trigger name is empty.

Members

ON_ADAPTIVE_RULE_MATCHING_CHANGED (Type: ToiVideoOutputAdaptiveRuleMatchingChangedEvent) (value = 3900) (static, constant)

This is an Event identifier for ToiVideoOutputAdaptiveRuleMatchingChangedEvent.

Called when at least one set of adaptive rules changes its matching status.

Whenever a change occurs that results in a different set of matched rules than the ones before the change, OnAdaptiveRuleMatchingChanged will be called once and contains data for each rule set that changed. If no rule is matched in a rule set, the member Matched will be false (and member ruleName will be empty) for that index in the sequence.

This constant can be also be accessed from toi.consts.ToiVideoOutputService.ON_ADAPTIVE_RULE_MATCHING_CHANGED.
TRIGGER_NO_VALUE (Type: string) (value = '') (static, constant)

Define a trigger with no value to deactivate the trigger.

This constant can be also be accessed from toi.consts.ToiVideoOutputService.TRIGGER_NO_VALUE.
ToiAdaptiveTransition (Type: struct) (static)

State transition for adaptive video mode rules. Describes a newly entered state for one rule set.

Struct fields

Name Description
isMatched

If the rule matched or not.

Type: boolean
ruleName

The name of the rule.

Type: string
ruleSetName

The name of the rule set.

Type: string

ToiAdaptiveTrigger (Type: struct) (static)

Adaptive trigger information.

Struct fields

Name Description
name

The name of the trigger.

Type: string
value

The value of the trigger. It can be any application defined value, plus the predefined ToiVideoOutputService.TRIGGER_NO_VALUE.

Type: string

5.0.1

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