public interface PlayerProviderFactory
Note: Classes that implement this interface should be annotated with PlayerProvider
to be recognized during compilation
Modifier and Type | Method and Description |
---|---|
PluginInfo |
getDetectedPluginInfo(String playerName)
Returns the information of the plugin required by the specified
playerName that is currently installed AND enabled on the browser |
PluginVersion |
getDetectedPluginVersion(String playerName)
Returns the version of the plugin required by the specified
playerName that is currently
installed AND enabled on the browser |
Set<String> |
getPermittedMediaProtocols(String playerName,
PluginVersion version)
Returns the set of media URL protocols that can be used with the
specified player.
|
Set<String> |
getPermittedMimeTypes(String playerName,
PluginVersion version)
Returns the set of media file extensions that can be used with the
specified player.
|
AbstractMediaPlayer |
getPlayer(String playerName,
String mediaURL,
boolean autoplay)
Returns the player with the specified
playerName . |
AbstractMediaPlayer |
getPlayer(String playerName,
String mediaURL,
boolean autoplay,
String height,
String width)
Returns the player with the specified
playerName . |
PlayerElement |
getPlayerElement(String playerName,
String playerId,
String mediaURL,
boolean autoplay,
HashMap<String,String> params)
Returns the DOM element structure for the specified
playerName . |
void |
init(ConfigurationContext context)
Initializes the provider with the specified configuration context
|
void init(ConfigurationContext context)
PlayerElement getPlayerElement(String playerName, String playerId, String mediaURL, boolean autoplay, HashMap<String,String> params)
playerName
. The DOM element structure
will be inserted into the page when required.
Implementation classes should throw IllegalArgumentException
if the playerName
is not supported by the factory
playerName
- the name of the required playerplayerId
- the HTML element id/name
that should be used for the playermediaURL
- the first URL of the media to be loaded by the playerautoplay
- true
if playback should start immediately, false
otherwiseparams
- other HTML parameters that should be associated with the DOM elementplayerName
IllegalArgumentException
- if playerName
does not exist in this factoryPluginVersion getDetectedPluginVersion(String playerName) throws PluginNotFoundException
playerName
that is currently
installed AND enabled on the browser
The detection methods in the PlayerUtil
class may be used by implementation classes if applicable.
Implementation classes should throw IllegalArgumentException
if the playerName
is not supported by the factory
playerName
- the name of the playerPluginNotFoundException
- if the required plugin is not installed AND enabledIllegalArgumentException
- if playerName
does not exist in this factoryPluginInfo getDetectedPluginInfo(String playerName) throws PluginNotFoundException
playerName
that is currently installed AND enabled on the browser
The detection methods in the PlayerUtil
class may be used by
implementation classes if applicable.
Implementation classes should throw IllegalArgumentException
if the playerName
is not supported by the factory
playerName
- the name of the playerPluginNotFoundException
- if the required plugin is not installed AND enabledIllegalArgumentException
- if playerName
does not exist in this factoryAbstractMediaPlayer getPlayer(String playerName, String mediaURL, boolean autoplay, String height, String width) throws PluginNotFoundException, PluginVersionException
playerName
.
Implementation classes should throw IllegalArgumentException
if the playerName
is not supported by the factory
playerName
- the player namemediaURL
- the URL of the media to playbackautoplay
- true
to start playing automatically, false
otherwiseheight
- the height of the playerwidth
- the width of the player.PluginVersionException
- if the required plugin version is not installed on the client.PluginNotFoundException
- if the required plugin is not installed on the client.IllegalArgumentException
- if playerName
does not exist in this factoryAbstractMediaPlayer getPlayer(String playerName, String mediaURL, boolean autoplay) throws PluginNotFoundException, PluginVersionException
playerName
.
Implementation classes should throw IllegalArgumentException
if the playerName
is not supported by the factory
playerName
- mediaURL
- the URL of the media to playbackautoplay
- true
to start playing automatically,
false
otherwisePluginVersionException
- if the required plugin version is not
installed on the client.PluginNotFoundException
- if the required plugin is not installed
on the client.IllegalArgumentException
- if playerName
does not exist in
this factorySet<String> getPermittedMimeTypes(String playerName, PluginVersion version)
playerName
- the player nameversion
- the plugin versionIllegalArgumentException
- if playerName
does not exist in
this factorySet<String> getPermittedMediaProtocols(String playerName, PluginVersion version)
playerName
- the player nameversion
- the plugin versionIllegalArgumentException
- if playerName
does not exist in
this factoryCopyright © 2009-2013. All Rights Reserved.