Packagecom.akamai.osmf.media
Classpublic class AkamaiMediaResourceResolver
InheritanceAkamaiMediaResourceResolver Inheritance flash.events.EventDispatcher

A class that can take a media resource, inspect it, determine the type of media referenced, and attach Akamai metadata to the resource.



Public Methods
 MethodDefined By
  
resolve(resource:MediaResourceBase, timeout:Number):void
An asynchronous method to determine the resource type and set the proper metadata on the resource.
AkamaiMediaResourceResolver
Events
 Event Summary Defined By
  Dispatched when the resolve method has completed.AkamaiMediaResourceResolver
  Dispatched when the resolve method has failed.AkamaiMediaResourceResolver
  Dispatched when the resolve method has timed out.AkamaiMediaResourceResolver
Method Detail
resolve()method
public function resolve(resource:MediaResourceBase, timeout:Number):void

An asynchronous method to determine the resource type and set the proper metadata on the resource. Dispatches an event of type AkamaiMediaResourceResolverEvent when complete. This event will contain the modified resource, since sometimes the resource supplied is not a playable media type. For example, in the case of an FMS SMIL file as a resource, the resource supplied in the complete event will be a DynamicStreamingResource that can be played.

Parameters

resource:MediaResourceBase — The resource to inspect. Must be a class that extends MediaResourceBase.
 
timeout:Number (default = NaN) — The timeout period in milliseconds. If the method cannot resolve the resource within this period of time a timeout event will be dispatched.

Event Detail
complete Event
Event Object Type: com.akamai.osmf.events.AkamaiMediaResourceResolverEvent
AkamaiMediaResourceResolverEvent.type property = com.akamai.osmf.events.AkamaiMediaResourceResolverEvent.RESOLVE_RESOURCE_COMPLETE

Dispatched when the resolve method has completed. The resource in the event contains the proper Akamai metadata to allow it to be recognized by the AkamaiAdvancedStreamingPlugin and may be modified from the original. For example, in the case of an FMS Multi-bitrate SMIL, the resource in the event will be a DynamicStreamingResource ready to be played.

The AkamaiMediaResourceResolverEvent.RESOLVE_RESOURCE_COMPLETE constant defines the value of the type property of the event object for a complete event.
error Event  
Event Object Type: com.akamai.osmf.events.AkamaiMediaResourceResolverEvent
AkamaiMediaResourceResolverEvent.type property = com.akamai.osmf.events.AkamaiMediaResourceResolverEvent.RESOLVE_RESOURCE_ERROR

Dispatched when the resolve method has failed. The event contains an error message.

The AkamaiMediaResourceResolverEvent.RESOLVE_RESOURCE_ERROR constant defines the value of the type property of the event object for an error event.
timeout Event  
Event Object Type: com.akamai.osmf.events.AkamaiMediaResourceResolverEvent
AkamaiMediaResourceResolverEvent.type property = com.akamai.osmf.events.AkamaiMediaResourceResolverEvent.RESOLVE_RESOURCE_TIMEOUT

Dispatched when the resolve method has timed out.

The AkamaiMediaResourceResolverEvent.RESOLVE_RESOURCE_TIMEOUT constant defines the value of the type property of the event object for a timeout event.