Packagecom.devnet.osmf.application
Classpublic class Configuration
InheritanceConfiguration Inheritance flash.events.EventDispatcher

Language Version : ActionScript 3.0
Runtime Versions : AIR 1.0, Flash Player 10.0.0

The Configuration class loads and parses the configuration XML file. Use this class to convert XML markup to OSMF element objects at runtime. You can load the XML markup from an external source, or create the XML in ActionScript.

Example: This example shows the custom markup format the Configuration class uses.

    
    <media_playlist >
        <media layout="serial" width="768" height="428">
            <source>http://mediapm.edgesuite.net/osmf/content/test/manifest-files/dynamic_Streaming.f4m </source>
        </media>
    </media_playlist>
     
Notice that a root node holds a media node which can contain serial or parallel lists of content. The root media node can contain nested media nodes or source nodes containing media URLs.

Each media node must include one of the following layout attribute values: serial or parallel.

Each media node can optionally include the following attributes: duration, width, height, x, y, scaleMode, horizontalAlign, verticalAlign.

See also

MediaDisplay


Public Properties
 PropertyDefined By
  playlistAsXML : XML
[read-only] The playlist is the XML configuration markup loaded from ActionScript or an external resource.
Configuration
Public Methods
 MethodDefined By
  
Configuration(factory:DefaultMediaFactory)
Pass a reference to the DefaultMediaFactory while instantiating the Configuration class to allow for media level element configuration.
Configuration
  
getPlaylist(fromXML:XML = null):*
Returns the root element of the config markup formatted as an OSMF element object.
Configuration
  
load(configUrl:String):void
Loads a config file from an external source.
Configuration
Protected Methods
 MethodDefined By
  
onConfigError(event:IOErrorEvent):void
Configuration
  
onConfigLoaded(event:Event):void
Configuration
Events
 Event Summary Defined By
  Configuration
  Configuration
Property Detail
playlistAsXMLproperty
playlistAsXML:XML  [read-only]

The playlist is the XML configuration markup loaded from ActionScript or an external resource.


Implementation
    public function get playlistAsXML():XML
Constructor Detail
Configuration()Constructor
public function Configuration(factory:DefaultMediaFactory)

Pass a reference to the DefaultMediaFactory while instantiating the Configuration class to allow for media level element configuration.

Parameters
factory:DefaultMediaFactory — The DefaultMediaFactory used by the MediaDisplay class.
Method Detail
getPlaylist()method
public function getPlaylist(fromXML:XML = null):*

Returns the root element of the config markup formatted as an OSMF element object. Call this method without parameters to retrieve the configuration loaded from an external source, or pass in XML markup created at runtime.

Parameters

fromXML:XML (default = null)

Returns
* — Parallel or Serial element.
load()method 
public function load(configUrl:String):void

Loads a config file from an external source.

Parameters

configUrl:String — String representing the URL of the config XML file.

onConfigError()method 
protected function onConfigError(event:IOErrorEvent):void

Parameters

event:IOErrorEvent

onConfigLoaded()method 
protected function onConfigLoaded(event:Event):void

Parameters

event:Event

Event Detail
complete Event
Event Object Type: flash.events.Event

ioError Event  
Event Object Type: flash.events.IOErrorEvent