Packagecom.adobe.cc
Classpublic class CCDecoderImpl
InheritanceCCDecoderImpl Inheritance Object
Subclasses SimpleCCDecoder

Common logic for various CCDecoder implementations. Most users will not typically need to instantiate or subclass this class directly, and instead should take advantage of one of the subclasses.



Public Properties
 PropertyDefined By
  backgroundColor : int
Background color override to apply to rendered text.
CCDecoderImpl
  backgroundOpacity : Number
Background opacity override to apply to rendered text.
CCDecoderImpl
  defaultFont : String
The default font to use when no font override is specified.
CCDecoderImpl
  edgeColor : int
Edge color override to apply to rendered text.
CCDecoderImpl
  edgeType : String
Edge type override to apply to rendered text.
CCDecoderImpl
  enabled : Boolean
Whether caption data decoding and rendering is enabled or disabled.
CCDecoderImpl
  enableRollUpAnimations : Boolean
Indicates whether rollup animations should be enabled (true), or not (false).
CCDecoderImpl
  font : String
Font override to apply to rendered text.
CCDecoderImpl
  fontSize : Number
Font size override to apply to rendered text.
CCDecoderImpl
  safeAreaHeightPercent : Number
Override that can be used to resize the safe zone vertical margin.
CCDecoderImpl
  service : String
The caption "service" to decode and render.
CCDecoderImpl
  textColor : int
Text color override to apply to rendered text.
CCDecoderImpl
  textOpacity : Number
Text opacity override to apply to rendered text.
CCDecoderImpl
  type : String
The active type of closed captioning data to decode and render.
CCDecoderImpl
Public Methods
 MethodDefined By
  
Constructs a CCDecoder.
CCDecoderImpl
  
isServiceActive(service:String):Boolean
Checks if the provided service is active or not.
CCDecoderImpl
  
reset():void
Resets the internal decoder and renderer.
CCDecoderImpl
Protected Methods
 MethodDefined By
  
activateService(activeService:String):void
Called when a new CC service becomes active.
CCDecoderImpl
  
CCDecoderImpl
Property Detail
backgroundColorproperty
backgroundColor:int

Background color override to apply to rendered text. The value should be an RGB hex value (e.g. 0xFF00FF). A value of -1 indicates no override.

The default value is -1.


Implementation
    public function get backgroundColor():int
    public function set backgroundColor(value:int):void

Throws
ArgumentError — if the value is not -1 and not within the RGB hex range.
backgroundOpacityproperty 
backgroundOpacity:Number

Background opacity override to apply to rendered text. Value must be between 0 (fully transparent) to 1 (fully opaque), or -1 to indicate no override.

The default value is -1.


Implementation
    public function get backgroundOpacity():Number
    public function set backgroundOpacity(value:Number):void

Throws
ArgumentError — if the value is not -1 and not within the range of [0, 1].
defaultFontproperty 
defaultFont:String

The default font to use when no font override is specified.

The default value is an appropriate monospaced font.


Implementation
    public function get defaultFont():String
    public function set defaultFont(value:String):void

Throws
ArgumentError — if the font is null.
edgeColorproperty 
edgeColor:int

Edge color override to apply to rendered text. The value should be an RGB hex value (e.g. 0xFF00FF). A value of -1 indicates no override. A reasonable default edge color will be selected.

The default value is -1.


Implementation
    public function get edgeColor():int
    public function set edgeColor(value:int):void

Throws
ArgumentError — if the value is not -1 and not within the RGB hex range.
edgeTypeproperty 
edgeType:String

Edge type override to apply to rendered text. Valid values are indicated by the EdgeType enumeration, or null to indicate no override.

The default value is null.


Implementation
    public function get edgeType():String
    public function set edgeType(value:String):void

Throws
ArgumentError — if the value is not null and not a memory of the EdgeType enumeration.
enabledproperty 
enabled:Boolean

Whether caption data decoding and rendering is enabled or disabled.

The default value is true.


Implementation
    public function get enabled():Boolean
    public function set enabled(value:Boolean):void
enableRollUpAnimationsproperty 
enableRollUpAnimations:Boolean

Indicates whether rollup animations should be enabled (true), or not (false).

The default value is true.


Implementation
    public function get enableRollUpAnimations():Boolean
    public function set enableRollUpAnimations(value:Boolean):void
fontproperty 
font:String

Font override to apply to rendered text. Value should be the name of the font to use, or null to indicate no override.

The default value is null.


Implementation
    public function get font():String
    public function set font(value:String):void
fontSizeproperty 
fontSize:Number

Font size override to apply to rendered text. The value indicates the displayed text size expressed as decimal percentage of the default size. For example, a value of 0.75 will decrease the font size from the original, as text will appear as 75% of the original size. Similarly, a value of 1.25 will increase the font size from the original, and text will appear as 125% of the original size. For 608 content, larger than default text will be grown to fill the safe area. Value must be greater than 0. -1 to indicate no override.

The default value is -1.


Implementation
    public function get fontSize():Number
    public function set fontSize(value:Number):void

Throws
ArgumentError — if the value is not -1 and not greater than 0.
safeAreaHeightPercentproperty 
safeAreaHeightPercent:Number

Override that can be used to resize the safe zone vertical margin. The safe zone is a 4:3 area centered on video bounds upon which captions will appear. The height of the safe zone is a specific percentage of the video height. Must be greater than or equal to 0, or -1. When greater than or equal to 0, indicate the percentage of the video height to use. For an example video height of 200, a safeAreaHeightPercents of 0, 0.10, 1.00, 1.5 will yield safe zone heights of 0, 20, 200, and 300 respectively. A value of -1 indicates that the default safe zone should be used (equivalent to a value of 0.80).

The default value is -1.


Implementation
    public function get safeAreaHeightPercent():Number
    public function set safeAreaHeightPercent(value:Number):void
serviceproperty 
service:String

The caption "service" to decode and render. For type null, the value must be null. For type CCType.CEA708, valid values are indicated by the CEA708Service enumeration.


Implementation
    public function get service():String
    public function set service(value:String):void

Throws
ArgumentError — if the assigned service value is not supported.
textColorproperty 
textColor:int

Text color override to apply to rendered text. The value must be an RGB hex value (e.g. 0xFF00FF), or -1 to indicate no override.

The default value is -1.


Implementation
    public function get textColor():int
    public function set textColor(value:int):void

Throws
ArgumentError — if the value is not -1 and not within the RGB hex range.
textOpacityproperty 
textOpacity:Number

Text opacity override to apply to rendered text. Value must be between 0 (fully transparent) to 1 (fully opaque), or -1 to indicate no override.

The default value is -1.


Implementation
    public function get textOpacity():Number
    public function set textOpacity(value:Number):void

Throws
ArgumentError — if the value is not -1 and not within the range of [0, 1].
typeproperty 
type:String

The active type of closed captioning data to decode and render. Value must be value from the CCType enumeration class, or null to indicate no captions.

The default value is null.


Implementation
    public function get type():String
    public function set type(value:String):void

Throws
ArgumentError — if the specified type is not supported.

See also

Constructor Detail
CCDecoderImpl()Constructor
public function CCDecoderImpl()

Constructs a CCDecoder.

Method Detail
activateService()method
protected function activateService(activeService:String):void

Called when a new CC service becomes active. Child classes are responsible for overriding it with the desired behavior.

Parameters

activeService:String

clearActiveServiceList()method 
protected function clearActiveServiceList():void

isServiceActive()method 
public function isServiceActive(service:String):Boolean

Checks if the provided service is active or not. By default all services are inactive. A service becomes active when its associated CC data is decoded. A service remains active during the entire lifelime of the decoder object. All services become inactive when clearActiveServiceList() or reset() methods are called.

Parameters

service:String

Returns
Boolean
reset()method 
public function reset():void

Resets the internal decoder and renderer. Any existing captions displayed on screen are cleared.