fi.hut.tml.xsmiles.mlfc.smil.viewer.havi.media
Class HaviMedia

java.lang.Object
  extended byfi.hut.tml.xsmiles.mlfc.smil.viewer.havi.media.HaviMedia
Direct Known Subclasses:
ImageMedia, TextMedia

public abstract class HaviMedia
extends java.lang.Object

This is the interface for binary media. The methods should be called in the following order:

  1. setUrl(url to media)
  2. setContainer(myContainer) [not necessary for audio]
  3. setBounds(0,0, 100, 100)
  4. addMediaListener(listener) [optional]
  5. prefetch()
  6. play()
  7. pause() [optional]
  8. play()
  9. close()


Constructor Summary
HaviMedia()
           
 
Method Summary
 void abort()
           
 void setMLFCListener(MLFCListener listener)
          All traffic to the browser, such as ComponentFactory, etc goes through this listener.
abstract  void setUrl(java.lang.String URL)
           
 void setUrl(java.net.URL url)
          Sets the URL for this media.
 void showControls(boolean visible)
          Requests the media player to display a control panel for media.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HaviMedia

public HaviMedia()
Method Detail

showControls

public void showControls(boolean visible)
Requests the media player to display a control panel for media. For audio and video, these can be a volume/play/stop controls, for images, these can be zoom controls etc. The controls are GUI dependent, generated through ComponentFactory.

Parameters:
visible - true=Display controls, false=don't display controls.

setUrl

public abstract void setUrl(java.lang.String URL)

setUrl

public void setUrl(java.net.URL url)
Sets the URL for this media. This method will only set the URL for the media. To actually download the data, prefetch() or play() should be called.

Parameters:
url - URL for media

abort

public void abort()

setMLFCListener

public void setMLFCListener(MLFCListener listener)
All traffic to the browser, such as ComponentFactory, etc goes through this listener. If no listener supplied media players should still function with some basic level.

Parameters:
listener - The MLFCListener supplied by the browser
See Also:
MLFCListener


X-Smiles 1.2