com.bramosystems.oss.player.core.client.ui
Class WinMediaPlayer

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Composite
              extended by com.bramosystems.oss.player.core.client.AbstractMediaPlayer
                  extended by com.bramosystems.oss.player.core.client.ui.WinMediaPlayer
All Implemented Interfaces:
PlaylistSupport, HasMediaMessageHandlers, HasMediaProgressHandlers, HasMediaStateHandlers, HasPlayStateHandlers, com.google.gwt.event.dom.client.HasKeyDownHandlers, com.google.gwt.event.dom.client.HasKeyPressHandlers, com.google.gwt.event.dom.client.HasKeyUpHandlers, com.google.gwt.event.dom.client.HasMouseDownHandlers, com.google.gwt.event.dom.client.HasMouseMoveHandlers, com.google.gwt.event.dom.client.HasMouseUpHandlers, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.IsWidget

public class WinMediaPlayer
extends AbstractMediaPlayer
implements PlaylistSupport

Widget to embed Windows Media Player™ plugin.

Usage Example

 SimplePanel panel = new SimplePanel();   // create panel to hold the player
 Widget player = null;
 try {
      // create the player
      player = new WinMediaPlayer("www.example.com/mediafile.wma");
 } catch(LoadException e) {
      // catch loading exception and alert user
      Window.alert("An error occured while loading");
 } catch(PluginVersionException e) {
      // catch plugin version exception and alert user, possibly providing a link
      // to the plugin download page.
      player = new HTML(".. some nice message telling the user to download plugin first ..");
 } catch(PluginNotFoundException e) {
      // catch PluginNotFoundException and tell user to download plugin, possibly providing
      // a link to the plugin download page.
      player = new HTML(".. another kind of message telling the user to download plugin..");
 }

 panel.setWidget(player); // add player to panel.
 

Embedding in non-IE browsers

As of version 1.2, this widget requires the Windows Media Player plugin for Firefox in non-IE browsers. The plugin provides javascript support for the underlying Windows Media Player™. However, this requirement can be suppressed if the need is simply to embed Windows Media Player™ without any programmatic access. In this case, all method calls are ignored.

Author:
Sikirulai Braheem

Nested Class Summary
static class WinMediaPlayer.EmbedMode
          An enum of embed modes of the WinMediaPlayer widget.
static class WinMediaPlayer.MediaAccessRights
          An enum of Library Access levels of the Windows Media Player™ plugin.
static class WinMediaPlayer.UIMode
          An enum of user interface modes of the Windows Media Player™ plugin.
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
WinMediaPlayer(java.lang.String mediaURL)
          Constructs WinMediaPlayer to automatically playback media located at mediaURL using the default height of 50px and width of 100%.
WinMediaPlayer(java.lang.String mediaURL, boolean autoplay)
          Constructs WinMediaPlayer to playback media located at mediaURL using the default height of 50px and width of 100%.
WinMediaPlayer(java.lang.String mediaURL, boolean autoplay, java.lang.String height, java.lang.String width)
          Constructs WinMediaPlayer with the specified height and width to playback media located at mediaURL.
WinMediaPlayer(java.lang.String mediaURL, boolean autoplay, java.lang.String height, java.lang.String width, WinMediaPlayer.EmbedMode embedMode)
          Constructs WinMediaPlayer with the specified height and width to playback media located at mediaURL.
 
Method Summary
 void addToPlaylist(java.util.List<MRL> mediaLocators)
          Adds the media locators to the players' playlist.
 void addToPlaylist(MRL mediaLocator)
          Adds the media locator to the players' playlist.
 void addToPlaylist(java.lang.String... mediaURLs)
          Adds the media at the specified URLs to the players' playlist.
 void addToPlaylist(java.lang.String mediaURL)
          Adds the media at the specified URL to the players' playlist.
 void clearPlaylist()
          Removes all entries in the players' playlist
 int getLoopCount()
          Returns the number of times this player repeats playback before stopping.
 WinMediaPlayer.MediaAccessRights getMediaAccessRights()
          Retrieves the current media library access rights of the player
 long getMediaDuration()
          Returns the duration of the loaded media in milliseconds.
 int getPlaylistSize()
          Returns the number of entries in the playlist
 double getPlayPosition()
          Gets the current position in the media that is being played.
 double getRate()
          Returns the current playback rate
 RepeatMode getRepeatMode()
          Returns the current playback repeat mode
 WinMediaPlayer.UIMode getUIMode()
          Retrieves the current UI mode of the player
 int getVideoHeight()
          Returns the height of the current media
 int getVideoWidth()
          Returns the width of the current media
 double getVolume()
          Gets the volume ranging from 0 (silent) to 1 (full volume).
 boolean isControllerVisible()
          Checks whether the player controls are visible.
 boolean isResizeToVideoSize()
          Checks if player is set to adjust its size to match the dimensions of a video.
 boolean isShuffleEnabled()
          Checks if this player is in shuffle mode.
 void loadMedia(java.lang.String mediaURL)
          Loads the media at the specified URL into the player.
protected  void onLoad()
          Overridden to register player for plugin DOM events
protected  void onUnload()
          Overridden to release resources
 void pauseMedia()
          Pause the media playback
 void play(int index)
          Play playlist entry at the specified index
 void playMedia()
          Plays the media loaded into the player.
 void playNext()
          Plays the next item in the playlist
 void playPrevious()
          Plays the previous item in the playlist
 void removeFromPlaylist(int index)
          Removes the entry at the specified index from the players' playlist.
<T extends ConfigValue>
void
setConfigParameter(ConfigParameter param, T value)
          Sets the specified player parameter to the specified value IF AND ONLY IF the parameter is applicable on the player
 void setControllerVisible(boolean show)
          Displays or hides the player controls.
 void setLoopCount(int loop)
          Sets the number of times the current media file should repeat playback before stopping.
 void setMediaAccessRights(WinMediaPlayer.MediaAccessRights accessRights)
          Sets the media library access rights level of the player.
 void setPlayPosition(double position)
          Sets the playback position of the current media
 void setRate(double rate)
          Sets the playback rate.
 void setRepeatMode(RepeatMode mode)
          Puts the player in the specified repeat mode.
 void setResizeToVideoSize(boolean resize)
          If the current media is a video, sets the player to adjust its size to match the dimensions of the video
 void setShuffleEnabled(boolean enable)
          Enables or disables players' shuffle mode.
 void setUIMode(WinMediaPlayer.UIMode uiMode)
          Sets the UI mode of the player
 void setVolume(double volume)
          Sets the volume.
 void showLogger(boolean enable)
          Displays or hides the players' logger widget.
 void stopMedia()
          Stops the media playback.
 
Methods inherited from class com.bramosystems.oss.player.core.client.AbstractMediaPlayer
addDebugHandler, addKeyDownHandler, addKeyPressHandler, addKeyUpHandler, addLoadingProgressHandler, addMediaInfoHandler, addMouseDownHandler, addMouseMoveHandler, addMouseUpHandler, addPlayerStateHandler, addPlayStateHandler, addToPlayerReadyCommandQueue, fireDebug, fireError, fireLoadingProgress, fireMediaInfoAvailable, firePlayerStateEvent, firePlayStateEvent, getWidgetFactory, isPlayerOnPage, removeFromPlayerReadyCommandQueue, setConfigParameter, setConfigParameter
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
getWidget, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

WinMediaPlayer

public WinMediaPlayer(java.lang.String mediaURL,
                      boolean autoplay,
                      java.lang.String height,
                      java.lang.String width,
                      WinMediaPlayer.EmbedMode embedMode)
               throws LoadException,
                      PluginNotFoundException,
                      PluginVersionException
Constructs WinMediaPlayer with the specified height and width to playback media located at mediaURL. Media playback begins automatically if autoplay is true.

The embedMode parameter is provided to permit using the widget without any other programmatic access.

height and width are specified as CSS units. A value of null for height or width puts the player in embedded mode. When in embedded mode, the player is made invisible on the page and media state events are propagated to registered listeners only. This is desired especially when used with custom sound controls. For custom video control, specify valid CSS values for height and width but hide the player controls with setControllerVisible(false).

Parameters:
mediaURL - the URL of the media to playback
autoplay - true to start playing automatically, false otherwise
height - the height of the player
width - the width of the player.
embedMode - the embed mode of the widget
Throws:
LoadException - if an error occurs while loading the media.
PluginVersionException - if the required Windows Media Player plugin version is not installed on the client.
PluginNotFoundException - if the Windows Media Player plugin is not installed on the client.
Since:
1.2
See Also:
WinMediaPlayer.EmbedMode

WinMediaPlayer

public WinMediaPlayer(java.lang.String mediaURL,
                      boolean autoplay,
                      java.lang.String height,
                      java.lang.String width)
               throws LoadException,
                      PluginNotFoundException,
                      PluginVersionException
Constructs WinMediaPlayer with the specified height and width to playback media located at mediaURL. Media playback begins automatically if autoplay is true.

height and width are specified as CSS units. A value of null for height or width puts the player in embedded mode. When in embedded mode, the player is made invisible on the page and media state events are propagated to registered listeners only. This is desired especially when used with custom sound controls. For custom video control, specify valid CSS values for height and width but hide the player controls with setControllerVisible(false).

This is the same as calling WinMediaPlayer(mediaURL, true, "50px", "100%", EmbedMode.PROGRAMMABLE)

Parameters:
mediaURL - the URL of the media to playback
autoplay - true to start playing automatically, false otherwise
height - the height of the player
width - the width of the player.
Throws:
LoadException - if an error occurs while loading the media.
PluginVersionException - if the required Windows Media Player plugin version is not installed on the client.
PluginNotFoundException - if the Windows Media Player plugin is not installed on the client.

WinMediaPlayer

public WinMediaPlayer(java.lang.String mediaURL)
               throws LoadException,
                      PluginNotFoundException,
                      PluginVersionException
Constructs WinMediaPlayer to automatically playback media located at mediaURL using the default height of 50px and width of 100%.

This is the same as calling WinMediaPlayer(mediaURL, true, "50px", "100%")

Parameters:
mediaURL - the URL of the media to playback
Throws:
LoadException - if an error occurs while loading the media.
PluginVersionException - if the required Windows Media Player plugin version is not installed on the client.
PluginNotFoundException - if the Windows Media Player plugin is not installed on the client.

WinMediaPlayer

public WinMediaPlayer(java.lang.String mediaURL,
                      boolean autoplay)
               throws LoadException,
                      PluginNotFoundException,
                      PluginVersionException
Constructs WinMediaPlayer to playback media located at mediaURL using the default height of 50px and width of 100%. Media playback begins automatically if autoplay is true.

This is the same as calling WinMediaPlayer(mediaURL, autoplay, "50px", "100%")

Parameters:
mediaURL - the URL of the media to playback
autoplay - true to start playing automatically, false otherwise
Throws:
LoadException - if an error occurs while loading the media.
PluginVersionException - if the required Windows Media Player plugin version is not installed on the client.
PluginNotFoundException - if the Windows Media Player plugin is not installed on the client.
Method Detail

onLoad

protected final void onLoad()
Overridden to register player for plugin DOM events

Overrides:
onLoad in class com.google.gwt.user.client.ui.Widget

onUnload

protected void onUnload()
Overridden to release resources

Overrides:
onUnload in class com.google.gwt.user.client.ui.Widget

loadMedia

public void loadMedia(java.lang.String mediaURL)
               throws LoadException
Description copied from class: AbstractMediaPlayer
Loads the media at the specified URL into the player.

In respect of the same domain policy of some plugins, the URL should point to a destination on the same domain where the application is hosted.

Specified by:
loadMedia in class AbstractMediaPlayer
Parameters:
mediaURL - the URL of the media to load into the player.
Throws:
LoadException - if an error occurs while loading the media

playMedia

public void playMedia()
               throws PlayException
Description copied from class: AbstractMediaPlayer
Plays the media loaded into the player.

Specified by:
playMedia in class AbstractMediaPlayer
Throws:
PlayException - if an error occurs during media playback.

stopMedia

public void stopMedia()
Description copied from class: AbstractMediaPlayer
Stops the media playback.

Specified by:
stopMedia in class AbstractMediaPlayer

pauseMedia

public void pauseMedia()
Description copied from class: AbstractMediaPlayer
Pause the media playback

Specified by:
pauseMedia in class AbstractMediaPlayer

getMediaDuration

public long getMediaDuration()
Description copied from class: AbstractMediaPlayer
Returns the duration of the loaded media in milliseconds. An IllegalStateException is thrown is the player is not available

Specified by:
getMediaDuration in class AbstractMediaPlayer
Returns:
the duration of the loaded media in milliseconds.

getPlayPosition

public double getPlayPosition()
Description copied from class: AbstractMediaPlayer
Gets the current position in the media that is being played.

Specified by:
getPlayPosition in class AbstractMediaPlayer
Returns:
the current position of the media being played.

setPlayPosition

public void setPlayPosition(double position)
Description copied from class: AbstractMediaPlayer
Sets the playback position of the current media

Specified by:
setPlayPosition in class AbstractMediaPlayer
Parameters:
position - the new position from where to start playback

getVolume

public double getVolume()
Description copied from class: AbstractMediaPlayer
Gets the volume ranging from 0 (silent) to 1 (full volume).

Specified by:
getVolume in class AbstractMediaPlayer
Returns:
volume.

setVolume

public void setVolume(double volume)
Description copied from class: AbstractMediaPlayer
Sets the volume.

Specified by:
setVolume in class AbstractMediaPlayer
Parameters:
volume - 0 (silent) to 1 (full volume).

showLogger

public void showLogger(boolean enable)
Description copied from class: AbstractMediaPlayer
Displays or hides the players' logger widget. The logger widget logs debug messages which can be useful during development.

Overrides:
showLogger in class AbstractMediaPlayer
Parameters:
enable - true to make the logger widget visible, false otherwise.
See Also:
Logger

setControllerVisible

public void setControllerVisible(boolean show)
Displays or hides the player controls.

Overrides:
setControllerVisible in class AbstractMediaPlayer
Parameters:
show - true to make the player controls visible, false otherwise.

isControllerVisible

public boolean isControllerVisible()
Checks whether the player controls are visible.

Overrides:
isControllerVisible in class AbstractMediaPlayer
Returns:
true if player controls are visible, false otherwise.

getLoopCount

public int getLoopCount()
Returns the number of times this player repeats playback before stopping.

Overrides:
getLoopCount in class AbstractMediaPlayer
Returns:
the number of times this player will repeat playback before stopping.

setLoopCount

public void setLoopCount(int loop)
Sets the number of times the current media file should repeat playback before stopping.

As of version 1.0, if this player is not available on the panel, this method call is added to the command-queue for later execution.

Overrides:
setLoopCount in class AbstractMediaPlayer
Parameters:
loop - number of times to repeat playback. A negative value makes playback repeat forever!.

getVideoHeight

public int getVideoHeight()
Description copied from class: AbstractMediaPlayer
Returns the height of the current media

Overrides:
getVideoHeight in class AbstractMediaPlayer
Returns:
the height in pixels

getVideoWidth

public int getVideoWidth()
Description copied from class: AbstractMediaPlayer
Returns the width of the current media

Overrides:
getVideoWidth in class AbstractMediaPlayer
Returns:
the width in pixels

setResizeToVideoSize

public void setResizeToVideoSize(boolean resize)
Description copied from class: AbstractMediaPlayer
If the current media is a video, sets the player to adjust its size to match the dimensions of the video

Overrides:
setResizeToVideoSize in class AbstractMediaPlayer
Parameters:
resize - true if player should adjust its size, false otherwise

isResizeToVideoSize

public boolean isResizeToVideoSize()
Description copied from class: AbstractMediaPlayer
Checks if player is set to adjust its size to match the dimensions of a video.

Overrides:
isResizeToVideoSize in class AbstractMediaPlayer
Returns:
true if player adjusts its size, false otherwise

getMediaAccessRights

public WinMediaPlayer.MediaAccessRights getMediaAccessRights()
Retrieves the current media library access rights of the player

Returns:
current media access rights
Since:
1.0

setMediaAccessRights

public void setMediaAccessRights(WinMediaPlayer.MediaAccessRights accessRights)
Sets the media library access rights level of the player.

If the player is not attached to a player, this call is scheduled for execution when the underlying plugin is initialized.

Note: The request succeeds IF AND ONLY IF the user grants this permission.

Note: This operation ALWAYS FAIL on browsers using the Windows Media Player plugin for Firefox.

Parameters:
accessRights - access level
Since:
1.0

setUIMode

public void setUIMode(WinMediaPlayer.UIMode uiMode)
Sets the UI mode of the player

If the player is not attached to a player, this call is scheduled for execution when the underlying plugin is initialized.

Note - Google Chrome 3: This method fails! As of version 1.1 use setConfigParameter(ConfigParameter, ConfigValue) instead.

Parameters:
uiMode - the UI mode to set
Since:
1.0

getUIMode

public WinMediaPlayer.UIMode getUIMode()
Retrieves the current UI mode of the player

Returns:
current UI mode
Since:
1.0

setConfigParameter

public <T extends ConfigValue> void setConfigParameter(ConfigParameter param,
                                                       T value)
Description copied from class: AbstractMediaPlayer
Sets the specified player parameter to the specified value IF AND ONLY IF the parameter is applicable on the player

Note: The parameter-value pairs are applied as HTML param tags on the underlying player plugin, therefore this method should be called before adding this player to a panel otherwise the method call will have no effect.

Overriding in a subclass

This method should be called first by any subclass that overrides it. This implementation checks if the specified value is a valid type for the specified parameter.

Overrides:
setConfigParameter in class AbstractMediaPlayer
Type Parameters:
T - the paramter value type
Parameters:
param - the configuration parameter
value - the parameter value

setRate

public void setRate(double rate)
Description copied from class: AbstractMediaPlayer
Sets the playback rate.

If this player is not available on the panel, this method call is added to the command-queue for later execution.

Overrides:
setRate in class AbstractMediaPlayer
Parameters:
rate - the playback rate. A rate of 1 implies normal playback rate, fractional values are slow motion, and values greater than one are fast-forward

getRate

public double getRate()
Description copied from class: AbstractMediaPlayer
Returns the current playback rate

Overrides:
getRate in class AbstractMediaPlayer
Returns:
the playback rate
See Also:
AbstractMediaPlayer.setRate(double)

setShuffleEnabled

public void setShuffleEnabled(boolean enable)
Description copied from interface: PlaylistSupport
Enables or disables players' shuffle mode.

Specified by:
setShuffleEnabled in interface PlaylistSupport
Parameters:
enable - true to enable shuffle, false otherwise

isShuffleEnabled

public boolean isShuffleEnabled()
Description copied from interface: PlaylistSupport
Checks if this player is in shuffle mode.

Specified by:
isShuffleEnabled in interface PlaylistSupport
Returns:
true if player is in shuffle mode, false otherwise.

addToPlaylist

public void addToPlaylist(java.lang.String mediaURL)
Description copied from interface: PlaylistSupport
Adds the media at the specified URL to the players' playlist.

In respect of the same domain policy of some plugins/browsers, the URL should point to a destination on the same domain where the application is hosted.

Specified by:
addToPlaylist in interface PlaylistSupport
Parameters:
mediaURL - the URL of the media.

addToPlaylist

public void addToPlaylist(MRL mediaLocator)
Description copied from interface: PlaylistSupport
Adds the media locator to the players' playlist.

Specified by:
addToPlaylist in interface PlaylistSupport
Parameters:
mediaLocator - specifies alternative URLs of the same media

addToPlaylist

public void addToPlaylist(java.lang.String... mediaURLs)
Description copied from interface: PlaylistSupport
Adds the media at the specified URLs to the players' playlist.

The player chooses ONLY ONE of the mediaURLs it supports.

In respect of the same domain policy of some browsers, the URLs should point to a destination on the same domain where the application is hosted.

Specified by:
addToPlaylist in interface PlaylistSupport
Parameters:
mediaURLs - the alternative URLs of the same media (probably in different formats).

addToPlaylist

public void addToPlaylist(java.util.List<MRL> mediaLocators)
Description copied from interface: PlaylistSupport
Adds the media locators to the players' playlist.

Specified by:
addToPlaylist in interface PlaylistSupport
Parameters:
mediaLocators - list of alternative URLs of the same media

removeFromPlaylist

public void removeFromPlaylist(int index)
Description copied from interface: PlaylistSupport
Removes the entry at the specified index from the players' playlist.

Specified by:
removeFromPlaylist in interface PlaylistSupport
Parameters:
index - the index of the playlist entry.

clearPlaylist

public void clearPlaylist()
Description copied from interface: PlaylistSupport
Removes all entries in the players' playlist

Specified by:
clearPlaylist in interface PlaylistSupport

playNext

public void playNext()
              throws PlayException
Description copied from interface: PlaylistSupport
Plays the next item in the playlist

Specified by:
playNext in interface PlaylistSupport
Throws:
PlayException - if there are no more entries in the playlist to be played. Especially if we've advanced to the end of the playlist. Note: A player with a negative loop count (i.e. set to play forever!) may not throw this exception

playPrevious

public void playPrevious()
                  throws PlayException
Description copied from interface: PlaylistSupport
Plays the previous item in the playlist

Specified by:
playPrevious in interface PlaylistSupport
Throws:
PlayException - if there are no more entries in the playlist to be played. Especially if we've gotten to the beginning of the playlist. Note: A player with a negative loop count (i.e. set to play forever!) may not throw this exception

play

public void play(int index)
          throws java.lang.IndexOutOfBoundsException
Description copied from interface: PlaylistSupport
Play playlist entry at the specified index

Specified by:
play in interface PlaylistSupport
Parameters:
index - number of the playlist entry
Throws:
java.lang.IndexOutOfBoundsException - if index is outside the bounds of the playlist

getPlaylistSize

public int getPlaylistSize()
Description copied from interface: PlaylistSupport
Returns the number of entries in the playlist

Specified by:
getPlaylistSize in interface PlaylistSupport
Returns:
number of entries in the playlist

getRepeatMode

public RepeatMode getRepeatMode()
Description copied from class: AbstractMediaPlayer
Returns the current playback repeat mode

Overrides:
getRepeatMode in class AbstractMediaPlayer
Returns:
repeat mode
See Also:
RepeatMode

setRepeatMode

public void setRepeatMode(RepeatMode mode)
Description copied from class: AbstractMediaPlayer
Puts the player in the specified repeat mode.

The effect of the specified mode depends on the AbstractMediaPlayer.setLoopCount(int) property as shown in the table:

Value of loopCount Value of repeatMode What it means?
Any value < 0 Sets repeatMode to RepeatMode.REPEAT_ALL Playlist is repeated continously
1 RepeatMode.REPEAT_OFF Entire playlist is played only once
RepeatMode.REPEAT_ONE The current playlist entry is repeated continously
RepeatMode.REPEAT_ALL Entire playlist is repeated continously
Any value > 1 RepeatMode.REPEAT_OFF The loopCount property is ignored, and the entire playlist is played only once
RepeatMode.REPEAT_ONE Player repeats each playlist entry for the number of times specified by loopCount and moves on the next until all entries are played and stops
RepeatMode.REPEAT_ALL Player repeats entire playlist for the number of times specified by loopCount and stops

Overrides:
setRepeatMode in class AbstractMediaPlayer
Parameters:
mode - the new repeat mode
See Also:
RepeatMode


Copyright © 2009-2011. All Rights Reserved.