Constructor
new MediaContent(type, fileopt)
MediaContent constructor
Name | Type | Attributes | Description |
---|---|---|---|
type | string | The type of media. Valid values are: | |
file | string | <optional> | Optional parameter indicating the media file name |
- Source
Members
absLocation :module:AWT.Point
Places the video window at a specific location.
- Source
absLocationFrom :string
When module:media/MediaContent.MediaContent#absLocation
is not null
, this field indicates from where to
measure its coordinates. Valid values are: BOX
, WINDOW
or FRAME
.
- string
- Source
autoStart :boolean
When true
, the media will automatically start playing when the associated ActiveBox
become active.
- boolean
- Source
catchMouseEvents :boolean
true
when the video window must catch mouse clicks.
- boolean
- Source
externalParams :string
Optional parameters passed to external calls
- string
- Source
file :string
Media file name
- string
- Source
free :boolean
When true
, the video plays out of the cell, centered on the activity window.
- boolean
- Source
from :number
Special setting used to play only a fragment of media. -1
means not used (plays full
length, from the beginning)
- number
- Source
length :number
When type
is RECORD_AUDIO
, this member stores the maximum length of the recorded
sound, in seconds.
- number
- Source
level :number
The priority level is important when different medias want to play together. Objects with
highest priority level can mute lower ones.
- number
- Source
loop :boolean
Whether to repeat the media in loop, or just one time.
- boolean
- Source
recBuffer :number
When type
is RECORD_AUDIO
, this member stores the buffer ID where the recording
will be stored.
- number
- Source
stretch :boolean
Whether to stretch or not the video size to fit the cell space.
- boolean
- Source
to :number
Special setting used to play only a fragment of media. -1
means not used (plays to the end
of the media)
- number
- Source
type :string
The type of media. Valid values are: UNKNOWN
, PLAY_AUDIO
, PLAY_VIDEO
,PLAY_MIDI
, PLAY_CDAUDIO
, RECORD_AUDIO
, PLAY_RECORDED_AUDIO
, RUN_CLIC_ACTIVITY
,RUN_CLIC_PACKAGE
, RUN_EXTERNAL
, URL
, EXIT
and RETURN
- string
- Source
(static) ICONS :object
Collection of icon external:HTMLImageElement
objects
- object
- Source
Methods
getAttributes() → {object}
Gets a object with the basic attributes needed to rebuild this instance excluding functions,
parent references, constants and also attributes retaining the default value.
The resulting object is commonly usued to serialize elements in JSON format.
- Source
- The resulting object, with minimal attrributes
- Type:
- object
getDescription() → {string}
Gets a string representing this media content, useful for checking if two different elements
are equivalent.
- Source
- Type:
- string
getIcon() → {external:HTMLImageElement}
Returns an image to be used as icon for representing this media content.
- Source
isEquivalent(mc) → {boolean}
Compares this object with another MediaContent.
Name | Type | Description |
---|---|---|
mc | module:media/MediaContent. | The Media Content to compare against to. |
- Source
true
when both objects are equivalent.
- Type:
- boolean
setAttributes(data) → {module:media/MediaContent.MediaContent}
Reads the properties of this MediaContent from a data object
Name | Type | Description |
---|---|---|
data | object | The data object to be parsed |
- Source
setProperties($xml)
Loads the MediaContent settings from a specific JQuery XML element
Name | Type | Description |
---|---|---|
$xml | external:jQuery |
- Source
toString() → {string}
Returns a simplified description of this media content. Useful for accessibility methods.
- Source
- Type:
- string