Project Outline
«
SmilText JS

Class cwi.smilText.Time.Playable

Defined in: cwi.smilText.Time.js.

Constructor Summary
new cwi.smilText.Time.Playable () Define the Playable interface.
Method Summary
addEventListener(eventType, callback) Add a callback function as a listener of an event.
removeEventListener(eventType, callback) Remove a callback function as an event listener.
fireEvent(eventType) Fire an event and notify all associated listeners.
getTime() Return the current time (in milliseconds).
setTime(t) Set the current time.
play() Play the Playable Object.
isPlaying() Return true whether the Playable Object is playing.
pause() Pause the Playable Object.
isPaused() Return true whether the Playable Object is paused.
stop() Stop the Playable Object.
isStopped() Return true whether the Playable Object is stopped.
seekTo(t) Perform the seek operation to a given time moment.
setExternalClock(flag) Setup the timing source.
Constructor Detail
new cwi.smilText.Time.Playable()
Define the Playable interface.

Author: Rodrigo Laiola Guimaraes.

									
									
									
										
										
										
										
										
										
										
					
								
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
getTime() : integer
Return the current time (in milliseconds).

										
									
Returns:
{integer}
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).
play()
Play the Playable Object.

										
									
isPlaying() : boolean
Return true whether the Playable Object is playing. Otherwise, false.

										
									
Returns:
{boolean}
pause()
Pause the Playable Object.

										
									
isPaused() : boolean
Return true whether the Playable Object is paused. Otherwise, false.

										
									
Returns:
{boolean}
stop()
Stop the Playable Object.

										
									
isStopped() : boolean
Return true whether the Playable Object is stopped. Otherwise, false.

										
									
Returns:
{boolean}
seekTo(t)
Perform the seek operation to a given time moment. The current time is also updated.

										
									
Parameters:
{integer} t the desired time instant (in milliseconds).
setExternalClock(flag)
Setup the timing source.

										
									
Parameters:
{string} flag true if an external clock source will be used. In this case, the setTime method must be called by the external clock. Otherwise, false. And an internal clock will be used.
Documentation generated by JsDoc Toolkit 2.3.2 on Mon Nov 09 2009 18:20:42 GMT+0100 (CET)