com.bramosystems.oss.player.script.client
Class AbstractExportProvider

java.lang.Object
  extended by com.bramosystems.oss.player.script.client.AbstractExportProvider

public class AbstractExportProvider
extends Object

Abstract implementation for providers of the player and seekbar widgets exported as Javascript objects.

All methods in the class throw UnsupportedOperationException by default. Subclasses should override and implement as required.

Since:
1.3
Author:
Sikirulai Braheem

Constructor Summary
AbstractExportProvider()
           
 
Method Summary
 com.google.gwt.user.client.ui.Widget getMissingPluginVersionWidget(Plugin plugin, PluginVersion requiredVersion)
          Called to retrieve the widget that may be used when the required version of a plugin is not found.
 com.google.gwt.user.client.ui.Widget getMissingPluginWidget(Plugin plugin)
          Called to retrieve the widget that may be used when the required plugin is not found.
 AbstractMediaPlayer getPlayer(String playerProvider, String playerName, String mediaURL, boolean autoplay, String width, String height, HashMap<String,String> options)
          Called to retrieve the player implementation that is exported as Javascript object.
 MediaSeekBar getSeekBar(int height, HashMap<String,String> options)
          Called to retrieve the seek bar implementation that is exported as Javascript object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractExportProvider

public AbstractExportProvider()
Method Detail

getPlayer

public AbstractMediaPlayer getPlayer(String playerProvider,
                                     String playerName,
                                     String mediaURL,
                                     boolean autoplay,
                                     String width,
                                     String height,
                                     HashMap<String,String> options)
                              throws LoadException,
                                     PluginNotFoundException,
                                     PluginVersionException
Called to retrieve the player implementation that is exported as Javascript object.

Parameters:
playerProvider - the provider of the player
playerName - the name of the player
mediaURL - the URL of the media file
autoplay - true to start playback automatically, false otherwise
width - the width of the player (in CSS units)
height - the height of the player (in CSS units)
options - user-defined options supplied during Javascript-object creation
Returns:
a suitable player implementation
Throws:
LoadException - if an error occurs while loading the media.
PluginNotFoundException - if the required plugin is not found
PluginVersionException - if the required plugin version is missing

getSeekBar

public MediaSeekBar getSeekBar(int height,
                               HashMap<String,String> options)
Called to retrieve the seek bar implementation that is exported as Javascript object.

Parameters:
height - the height of the seek bar (in pixels)
options - user-defined options supplied during Javascript-object creation.
Returns:
seek bar implementation to be exported as Javascript object

getMissingPluginWidget

public com.google.gwt.user.client.ui.Widget getMissingPluginWidget(Plugin plugin)
Called to retrieve the widget that may be used when the required plugin is not found.

Parameters:
plugin - the required plugin
Returns:
the widget used when required plugin is missing

getMissingPluginVersionWidget

public com.google.gwt.user.client.ui.Widget getMissingPluginVersionWidget(Plugin plugin,
                                                                          PluginVersion requiredVersion)
Called to retrieve the widget that may be used when the required version of a plugin is not found.

Parameters:
plugin - the required plugin
requiredVersion - the required plugin version
Returns:
the widget used when required plugin version is missing


Copyright © 2009-2011. All Rights Reserved.