com.bramosystems.oss.player.youtube.client
Class PlayerParameters

java.lang.Object
  extended by com.bramosystems.oss.player.youtube.client.PlayerParameters

public class PlayerParameters
extends Object

Holds the parameters of the YouTube player

Since:
1.1
Author:
Sikirulai Braheem

Nested Class Summary
static class PlayerParameters.AutoHideMode
          An enum of autohide parameters for YouTubePlayer
 
Constructor Summary
PlayerParameters()
           
 
Method Summary
 PlayerParameters.AutoHideMode getAutoHide()
          Returns the autohide mode of the player
 String getPlayerAPIId()
          Gets the player identification value used internally by the YouTube player
 String getPrimaryBorderColor()
          Deprecated. Will be removed in a future version
 String getSecondaryBorderColor()
          Deprecated. Will be removed in a future version
 int getStartTime()
          Gets the time at which the player starts playback
 boolean isAutoplay()
          Checks if the initial video will autoplay when loaded
 boolean isEnhancedGenieMenuEnabled()
          Deprecated. Will be removed in a future version
 boolean isFullScreenEnabled()
          Checks if the fullscreen button is enabled
 boolean isHDEnabled()
          Deprecated. Will be removed in a future version
 boolean isJSApiEnabled()
          Checks if the Javascript API is enabled
 boolean isKeyboardControlsEnabled()
          Checks if keyboard controls are enabled
 boolean isLoadRelatedVideos()
          Checks if player is set to load related videos
 boolean isLoopEnabled()
          Checks if player is set to repeat playback
 boolean isModestBranding()
          Returns the status of the YouTube logo on the control bar
 boolean isShowBorder()
          Checks if the showing of player's borders is enabled
 boolean isShowControls()
          Returns the status of the video player controls
 boolean isShowSearchBox()
          Deprecated. Will be removed in a future version
 boolean isShowVideoAnnotations()
          Checks if video annotations are shown by default
 boolean isShowVideoInformation()
          Checks if the display of video information is enabled
 void setAutoHide(PlayerParameters.AutoHideMode autoHide)
          Sets the autohide mode of the player
 void setAutoplay(boolean autoplay)
          Sets whether or not the initial video will autoplay when the player loads.
 void setEnhancedGenieMenuEnabled(boolean enable)
          Deprecated. Will be removed in a future version
 void setFullScreenEnabled(boolean enable)
          Enables or disables the player's fullscreen button
 void setHDEnabled(boolean enable)
          Deprecated. Will be removed in a future version
 void setJSApiEnabled(boolean enable)
          Enables or disables the player's Javascript API
 void setKeyboardControlsEnabled(boolean enable)
          Enables or disables keyboard controls
 void setLoadRelatedVideos(boolean loadRelatedVideos)
          Sets whether the player should load related videos once playback of the initial video starts.
 void setLoopEnabled(boolean loop)
          Sets player to repeat video playback again and again.
 void setModestBranding(boolean modestBranding)
          Shows or hides the YouTube logo on the control bar
 void setPlayerAPIId(String playerAPIId)
          Sets the player identification value used internally by the YouTube player.
 void setPrimaryBorderColor(String color)
          Deprecated. Will be removed in a future version
 void setSecondaryBorderColor(String color)
          Deprecated. Will be removed in a future version
 void setShowControls(boolean showControls)
          Shows or hides the video player controls
 void setStartTime(int startTime)
          Sets the time at which the player begins video playback.
 void showBorder(boolean show)
          Enables or disables the player's borders
 void showSearchBox(boolean show)
          Deprecated. Will be removed in a future version
 void showVideoAnnotations(boolean show)
          Enables or disables showing video annotations by default.
 void showVideoInformation(boolean show)
          Enables or disables the display of information like the video title and rating before the video starts playing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlayerParameters

public PlayerParameters()
Method Detail

isAutoplay

public boolean isAutoplay()
Checks if the initial video will autoplay when loaded

Returns:
true if autoplay is active, false otherwise

setAutoplay

public void setAutoplay(boolean autoplay)
Sets whether or not the initial video will autoplay when the player loads.

Parameters:
autoplay - true to autoplay, false otherwise

getPrimaryBorderColor

public String getPrimaryBorderColor()
Deprecated. Will be removed in a future version

Returns the players primary border color.

Returns:
color in hexadecimal format

setPrimaryBorderColor

public void setPrimaryBorderColor(String color)
Deprecated. Will be removed in a future version

Sets the players primary border color.

Parameters:
color - an RGB value in hexadecimal format

getSecondaryBorderColor

public String getSecondaryBorderColor()
Deprecated. Will be removed in a future version

Returns the players secondary border color and control bar background color.

Returns:
color in hexadecimal format

setSecondaryBorderColor

public void setSecondaryBorderColor(String color)
Deprecated. Will be removed in a future version

Sets the players video control bar background color and secondary border color.

Parameters:
color - an RGB value in hexadecimal format

isKeyboardControlsEnabled

public boolean isKeyboardControlsEnabled()
Checks if keyboard controls are enabled

Returns:
true if enabled, false otherwise

setKeyboardControlsEnabled

public void setKeyboardControlsEnabled(boolean enable)
Enables or disables keyboard controls

Parameters:
enable - true to enable keyboard controls, false otherwise

isEnhancedGenieMenuEnabled

public boolean isEnhancedGenieMenuEnabled()
Deprecated. Will be removed in a future version

Checks if the "Enhanced Genie Menu" is enabled.

Returns:
true is genie menu is enabled, false otherwise
See Also:
setEnhancedGenieMenuEnabled(boolean)

setEnhancedGenieMenuEnabled

public void setEnhancedGenieMenuEnabled(boolean enable)
Deprecated. Will be removed in a future version

Enables or disables the "Enhanced Genie Menu". If enabled, the genie menu (if present) appears when the user's mouse enters the video display area, as opposed to only appearing when the menu button is pressed

Parameters:
enable - true to enable genie menu, false otherwise

isJSApiEnabled

public boolean isJSApiEnabled()
Checks if the Javascript API is enabled

Returns:
true if enabled, false otherwise

setJSApiEnabled

public void setJSApiEnabled(boolean enable)
Enables or disables the player's Javascript API

Parameters:
enable - true to enable the Javascript API, false otherwise

isFullScreenEnabled

public boolean isFullScreenEnabled()
Checks if the fullscreen button is enabled

Returns:
true if enabled, false otherwise

setFullScreenEnabled

public void setFullScreenEnabled(boolean enable)
Enables or disables the player's fullscreen button

Parameters:
enable - true to enable the fullscreen, false otherwise

isHDEnabled

public boolean isHDEnabled()
Deprecated. Will be removed in a future version

Checks if HD playback is enabled

Returns:
true if enabled, false otherwise.

setHDEnabled

public void setHDEnabled(boolean enable)
Deprecated. Will be removed in a future version

Enables or disables HD playback. Note: This method has no effect if an HD version of the current video is not available.

Parameters:
enable - true to enable HD playback, false otherwise

isShowVideoAnnotations

public boolean isShowVideoAnnotations()
Checks if video annotations are shown by default

Returns:
true if annotations are shown by default, false otherwise

showVideoAnnotations

public void showVideoAnnotations(boolean show)
Enables or disables showing video annotations by default.

Parameters:
show - true to show annotations, false otherwise

isLoadRelatedVideos

public boolean isLoadRelatedVideos()
Checks if player is set to load related videos

Returns:
true if related videos are loaded, false otherwise

setLoadRelatedVideos

public void setLoadRelatedVideos(boolean loadRelatedVideos)
Sets whether the player should load related videos once playback of the initial video starts.

Parameters:
loadRelatedVideos - true to load related videos, false otherwise

isLoopEnabled

public boolean isLoopEnabled()
Checks if player is set to repeat playback

Returns:
true if playback is set to repeat, false otherwise

setLoopEnabled

public void setLoopEnabled(boolean loop)
Sets player to repeat video playback again and again.

Parameters:
loop - true to repeat playback, false otherwise

isShowBorder

public boolean isShowBorder()
Checks if the showing of player's borders is enabled

Returns:
true if player's borders is set to show, false otherwise

showBorder

public void showBorder(boolean show)
Enables or disables the player's borders

Parameters:
show - true to show the player's borders, false otherwise

isShowVideoInformation

public boolean isShowVideoInformation()
Checks if the display of video information is enabled

Returns:
true if display of video information is enabled, false otherwise

showVideoInformation

public void showVideoInformation(boolean show)
Enables or disables the display of information like the video title and rating before the video starts playing.

Parameters:
show - true if video information should show, false otherwise

isShowSearchBox

public boolean isShowSearchBox()
Deprecated. Will be removed in a future version

Returns the display status of the search box.

Returns:
true if the search box is enabled, false otherwise.

showSearchBox

public void showSearchBox(boolean show)
Deprecated. Will be removed in a future version

Shows or hides the search box from displaying when the video is minimized.

Note that if setLoadRelatedVideos(boolean) is false, then the search box will also be disabled.

Parameters:
show - true to show the search box, false otherwise.

getStartTime

public int getStartTime()
Gets the time at which the player starts playback

Returns:
time (in seconds) at which the player starts playback

setStartTime

public void setStartTime(int startTime)
Sets the time at which the player begins video playback.

Parameters:
startTime - time to begin playback (in seconds)

getPlayerAPIId

public String getPlayerAPIId()
Gets the player identification value used internally by the YouTube player

Returns:
the player ID

setPlayerAPIId

public void setPlayerAPIId(String playerAPIId)
Sets the player identification value used internally by the YouTube player.

Parameters:
playerAPIId - player ID

getAutoHide

public PlayerParameters.AutoHideMode getAutoHide()
Returns the autohide mode of the player

Returns:
the autohide mode
Since:
1.3

setAutoHide

public void setAutoHide(PlayerParameters.AutoHideMode autoHide)
Sets the autohide mode of the player

Parameters:
autoHide - the autohide mode
Since:
1.3

isShowControls

public boolean isShowControls()
Returns the status of the video player controls

Returns:
true if video player controls is visible, false otherwise
Since:
1.3

setShowControls

public void setShowControls(boolean showControls)
Shows or hides the video player controls

Parameters:
showControls - true to show video player controls and false otherwise
Since:
1.3

isModestBranding

public boolean isModestBranding()
Returns the status of the YouTube logo on the control bar

Returns:
true if YouTube logo is not showed on control bar, false otherwise
Since:
1.3

setModestBranding

public void setModestBranding(boolean modestBranding)
Shows or hides the YouTube logo on the control bar

Parameters:
modestBranding - true to show video player controls and false otherwise
Since:
1.3


Copyright © 2009-2011. All Rights Reserved.