Media

Media

new Media(aRequest, callback)

The MediaDisplayObject constructor
Parameters:
Name Type Argument Description
aRequest String | Array The request needs to accomplish the requirements of AssetRequest
callback Function <optional>
A callback to be called when your movie has loaded (only called if you passed a `aRequest`). The callback will be called with it's first argument signifying an error. So, if the first argument is `null` you can assume the movie was loaded successfully.
Properties:
Name Type Description
__supportedAttributes__ __list__ List of supported attribute names. In addition to the property names listed for DisplayObject, these are the attribute names you can pass to the attr() method. Note that this property is not available in your code, it's just here for documentation purposes.
Properties
Name Type Description
source string The source of the media.
volume string The volume of the media (between 0 and 1 inclusive)

Extends

Methods

bindAssetCallback(callback) → {this}

Registers events for a callback function which'll be triggered for both `error` and `load` events (i.e. node-style callback, `function(err, data) {}`)
Parameters:
Name Type Description
callback Function The function to be triggered upon `load` or `error`
Inherited From:
Returns:
Type
this