fi.hut.tml.xsmiles.dom
Interface MediaElement

All Known Implementing Classes:
ObjectElementImpl

public interface MediaElement

Interface for elements that refer to some outside media, like image, audio or video

Since:
Mar 23, 2004
Version:
$Revision: 5024 $, $Date: 2004-04-23 13:52:44 +0300 (Fri, 23 Apr 2004) $
Author:
tjjalava

Field Summary
static int PAUSED
          Status code for paused media
static int PLAYING
          Status code for playing media
static int STOPPED
          Status code for stopped media
 
Method Summary
 void addMediaListener(MediaListener listener)
          Adds a new listener for the media
 int getStatus()
          Returns the current status of the media
 boolean isStatic()
          Static elements have no defined duration.
 void pause()
          Pauses the media
 void play()
          Starts playing the media
 void prefetch()
          Prefetches the media
 void removeMediaListener(MediaListener listener)
          Removes a certain listener
 void setActive(boolean active)
          Sets this element active or inactive
 void stop()
          Stops the media
 

Field Detail

PLAYING

public static final int PLAYING
Status code for playing media

See Also:
Constant Field Values

STOPPED

public static final int STOPPED
Status code for stopped media

See Also:
Constant Field Values

PAUSED

public static final int PAUSED
Status code for paused media

See Also:
Constant Field Values
Method Detail

setActive

public void setActive(boolean active)
Sets this element active or inactive

Parameters:
active -

play

public void play()
          throws java.lang.Exception
Starts playing the media

Throws:
java.lang.Exception

stop

public void stop()
Stops the media


pause

public void pause()
Pauses the media


addMediaListener

public void addMediaListener(MediaListener listener)
Adds a new listener for the media

Parameters:
listener -

removeMediaListener

public void removeMediaListener(MediaListener listener)
Removes a certain listener

Parameters:
listener -

getStatus

public int getStatus()
Returns the current status of the media

Returns:
the status of the media

prefetch

public void prefetch()
              throws java.lang.Exception
Prefetches the media

Throws:
java.lang.Exception

isStatic

public boolean isStatic()
Static elements have no defined duration. These include all html elements and object elements that refer to static media, like images. Non-static media include audio and video

Returns:


X-Smiles 1.2