Packageorg.osmf.smpte.tt.media
Classpublic class SMPTETTProxyElement
InheritanceSMPTETTProxyElement Inheritance org.osmf.elements.ProxyElement
Subclasses SMPTETTProxyElementAsync

Language Version : ActionScript 3.0
Product Version : OSMF 1.6
Runtime Versions : Flash Player 10, AIR 1.5

The SMPTETTProxyElement class is a wrapper for the media supplied. It's purpose is to override the loadable trait to allow the retrieval and processing of an Timed Text file used for captioning.



Public Properties
 PropertyDefined By
  continueLoadOnFailure : Boolean
[read-only] Specifies whether or not this class should continue loading the media element when the captioning document fails to load.
SMPTETTProxyElement
  mediaElement : MediaElement
[read-only] The MediaElement for which this ProxyElement serves as a proxy.
SMPTETTProxyElement
  proxiedElement : MediaElement
[override]
SMPTETTProxyElement
Protected Properties
 PropertyDefined By
  captionElementsDisplayed : Dictionary
SMPTETTProxyElement
  loadTrait : SMPTETTLoadTrait
SMPTETTProxyElement
  _mediaPlayer : MediaPlayer
SMPTETTProxyElement
  totalCaptionElementsToDisplay : uint = 0
SMPTETTProxyElement
  _wasPaused : Boolean = false
SMPTETTProxyElement
  _wasPlaying : Boolean = false
SMPTETTProxyElement
Public Methods
 MethodDefined By
  
SMPTETTProxyElement(proxiedElement:MediaElement = null, continueLoadOnFailure:Boolean = true)
Constructor.
SMPTETTProxyElement
Protected Methods
 MethodDefined By
  
addEachCaptionToMetaData(document:CaptioningDocument, SMPTETTMetadata:TimelineMetadata):void
SMPTETTProxyElement
  
SMPTETTProxyElement
  
SMPTETTProxyElement
  
addToParallelElement(parallelElement:ParallelElement, p_captioningMediaElement:CaptioningMediaElement):void
SMPTETTProxyElement
  
createLoadTrait(smptettLoader:SMPTETTLoader, urlResource:URLResource):SMPTETTLoadTrait
SMPTETTProxyElement
  
SMPTETTProxyElement
  
getOrCreateTimelineMetaData():TimelineMetadata
SMPTETTProxyElement
  
onLoadStateChange_Error(event:LoadEvent):void
SMPTETTProxyElement
  
SMPTETTProxyElement
  
regionSpriteAddMediaElement(document:CaptioningDocument, i:uint, p_captioningMediaElement:CaptioningMediaElement):void
SMPTETTProxyElement
  
SMPTETTProxyElement
Public Constants
 ConstantDefined By
  DEBUG : Boolean = false
[static]
SMPTETTProxyElement
  MEDIA_ERROR_INVALID_PROXIED_ELEMENT : int = 2201
[static] Constant for the MediaError that is triggered when the proxiedElement is invalid (e.g.
SMPTETTProxyElement
Property Detail
_mediaPlayerproperty
protected var _mediaPlayer:MediaPlayer

_wasPausedproperty 
protected var _wasPaused:Boolean = false

_wasPlayingproperty 
protected var _wasPlaying:Boolean = false

captionElementsDisplayedproperty 
protected var captionElementsDisplayed:Dictionary

continueLoadOnFailureproperty 
continueLoadOnFailure:Boolean  [read-only]

Language Version : ActionScript 3.0
Product Version : OSMF 1.6
Runtime Versions : Flash Player 10, AIR 1.5

Specifies whether or not this class should continue loading the media element when the captioning document fails to load.


Implementation
    public function get continueLoadOnFailure():Boolean
loadTraitproperty 
protected var loadTrait:SMPTETTLoadTrait

mediaElementproperty 
mediaElement:MediaElement  [read-only]

Language Version : ActionScript 3.0
Product Version : OSMF 1.6
Runtime Versions : Flash Player 10, AIR 1.5

The MediaElement for which this ProxyElement serves as a proxy.


Implementation
    public function get mediaElement():MediaElement
proxiedElementproperty 
proxiedElement:MediaElement[override]


Implementation
    public function get proxiedElement():MediaElement
    public function set proxiedElement(value:MediaElement):void
totalCaptionElementsToDisplayproperty 
protected var totalCaptionElementsToDisplay:uint = 0

Constructor Detail
SMPTETTProxyElement()Constructor
public function SMPTETTProxyElement(proxiedElement:MediaElement = null, continueLoadOnFailure:Boolean = true)

Language Version : ActionScript 3.0
Product Version : OSMF 1.6
Runtime Versions : Flash Player 10, AIR 1.5

Constructor.

Parameters
proxiedElement:MediaElement (default = null) — Specifies whether or not the class should continue the load process if the captioning document fails to load. The default value is true.
 
continueLoadOnFailure:Boolean (default = true)
Method Detail
addEachCaptionToMetaData()method
protected function addEachCaptionToMetaData(document:CaptioningDocument, SMPTETTMetadata:TimelineMetadata):void

Parameters

document:CaptioningDocument
 
SMPTETTMetadata:TimelineMetadata

addLoadTraitListeners()method 
protected function addLoadTraitListeners(trait:SMPTETTLoadTrait):void

Parameters

trait:SMPTETTLoadTrait

addMetaDataTimelineMarkers()method 
protected function addMetaDataTimelineMarkers():void

addToParallelElement()method 
protected function addToParallelElement(parallelElement:ParallelElement, p_captioningMediaElement:CaptioningMediaElement):void

Parameters

parallelElement:ParallelElement
 
p_captioningMediaElement:CaptioningMediaElement

createLoadTrait()method 
protected function createLoadTrait(smptettLoader:SMPTETTLoader, urlResource:URLResource):SMPTETTLoadTrait

Parameters

smptettLoader:SMPTETTLoader
 
urlResource:URLResource

Returns
SMPTETTLoadTrait
flagCaptionElementAsDisplayed()method 
protected function flagCaptionElementAsDisplayed(captionElement:CaptionElement):void

Parameters

captionElement:CaptionElement

getOrCreateTimelineMetaData()method 
protected function getOrCreateTimelineMetaData():TimelineMetadata

Returns
TimelineMetadata
onLoadStateChange_Error()method 
protected function onLoadStateChange_Error(event:LoadEvent):void

Parameters

event:LoadEvent

pauseMediaPlayerDuringLoadCaptions()method 
protected function pauseMediaPlayerDuringLoadCaptions():void

regionSpriteAddMediaElement()method 
protected function regionSpriteAddMediaElement(document:CaptioningDocument, i:uint, p_captioningMediaElement:CaptioningMediaElement):void

Parameters

document:CaptioningDocument
 
i:uint
 
p_captioningMediaElement:CaptioningMediaElement

updateEndTimetoMediaDuration()method 
protected function updateEndTimetoMediaDuration(smptettLoader:SMPTETTLoader):void

Parameters

smptettLoader:SMPTETTLoader

Constant Detail
DEBUGConstant
public static const DEBUG:Boolean = false

MEDIA_ERROR_INVALID_PROXIED_ELEMENTConstant 
public static const MEDIA_ERROR_INVALID_PROXIED_ELEMENT:int = 2201

Constant for the MediaError that is triggered when the proxiedElement is invalid (e.g. doesn't have the captioning metadata).