Class cwi.smilText.Time.Playable
Defined in: cwi.smilText.Time.js.
Constructor Summary
Method Summary
Constructor Detail
Method Detail
addEventListener(eventType, callback)
Add a callback function as a listener of an event. Listeners are notified in the event transition.
Parameters:
{integer} | eventType | The Playable event type. |
{function} | callback | THe callback function. |
See:
cwi.smilText.Time.EVENT_PLAY |
cwi.smilText.Time.EVENT_PAUSE |
cwi.smilText.Time.EVENT_STOP |
cwi.smilText.Time.EVENT_END |
removeEventListener(eventType, callback)
Remove a callback function as an event listener.
Parameters:
{integer} | eventType | The Playable event type. |
{function} | callback | THe callback function. |
See:
cwi.smilText.Time.EVENT_PLAY |
cwi.smilText.Time.EVENT_PAUSE |
cwi.smilText.Time.EVENT_STOP |
cwi.smilText.Time.EVENT_END |
fireEvent(eventType)
Fire an event and notify all associated listeners.
Parameters:
{integer} | eventType | The Playable event to be fired. |
See:
cwi.smilText.Time.EVENT_PLAY |
cwi.smilText.Time.EVENT_PAUSE |
cwi.smilText.Time.EVENT_STOP |
cwi.smilText.Time.EVENT_END |
setTime(t)
Set the current time. The seekTo method will be called whether the new time
is before the current time.
Parameters:
{integer} | t | the new time (in milliseconds). |
isPlaying()
: boolean
Return true whether the Playable Object is playing. Otherwise, false.
Returns:
{boolean} |
isPaused()
: boolean
Return true whether the Playable Object is paused. Otherwise, false.
Returns:
{boolean} |
isStopped()
: boolean
Return true whether the Playable Object is stopped. Otherwise, false.
Returns:
{boolean} |