public class PlayerParameters extends Object
Modifier and Type | Class and Description |
---|---|
static class |
PlayerParameters.AutoHideMode
An enum of autohide parameters for YouTubePlayer
|
Constructor and Description |
---|
PlayerParameters() |
Modifier and Type | Method and Description |
---|---|
PlayerParameters.AutoHideMode |
getAutoHide()
Returns the
autohide mode of the player |
int |
getAutoplay() |
int |
getClosedCaptionPolicy() |
int |
getDisableKeyboardControls() |
int |
getEnableJsApi() |
int |
getFullScreen() |
int |
getIvLoadPolicy() |
int |
getLoadRelatedVideos() |
int |
getLoop() |
int |
getModestBranding() |
String |
getOrigin()
Returns the domain URL of the page hosting the YouTube player widget
|
String |
getPlayerAPIId()
Gets the player identification value used internally by the YouTube player
|
int |
getShowControls() |
int |
getShowInfo() |
int |
getStartTime()
Gets the time at which the player starts playback
|
boolean |
isAutoplay()
Checks if the initial video will autoplay when loaded
|
boolean |
isFullScreenEnabled()
Checks if the fullscreen button is enabled
|
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 |
isShowControls()
Returns the status of the video player controls
|
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 |
setFullScreenEnabled(boolean enable)
Enables or disables the player's fullscreen button
|
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 |
setOrigin(String origin)
Sets the domain URL of the page hosting the YouTube player widget
|
void |
setPlayerAPIId(String playerAPIId)
Sets the player identification value used internally by the YouTube player.
|
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 |
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.
|
public boolean isAutoplay()
true
if autoplay is active, false
otherwisepublic void setAutoplay(boolean autoplay)
autoplay
- true
to autoplay, false
otherwisepublic boolean isKeyboardControlsEnabled()
true
if enabled, false
otherwisepublic void setKeyboardControlsEnabled(boolean enable)
enable
- true
to enable keyboard controls, false
otherwisepublic boolean isJSApiEnabled()
true
if enabled, false
otherwisepublic void setJSApiEnabled(boolean enable)
enable
- true
to enable the Javascript API, false
otherwisepublic boolean isFullScreenEnabled()
true
if enabled, false
otherwisepublic void setFullScreenEnabled(boolean enable)
enable
- true
to enable the fullscreen, false
otherwisepublic boolean isShowVideoAnnotations()
true
if annotations are shown by default, false
otherwisepublic void showVideoAnnotations(boolean show)
show
- true
to show annotations, false
otherwisepublic boolean isLoadRelatedVideos()
true
if related videos are loaded, false
otherwisepublic void setLoadRelatedVideos(boolean loadRelatedVideos)
loadRelatedVideos
- true
to load related videos, false
otherwisepublic boolean isLoopEnabled()
true
if playback is set to repeat, false
otherwisepublic void setLoopEnabled(boolean loop)
loop
- true
to repeat playback, false
otherwisepublic boolean isShowVideoInformation()
true
if display of video information is enabled, false
otherwisepublic void showVideoInformation(boolean show)
show
- true
if video information should show, false
otherwisepublic int getStartTime()
public void setStartTime(int startTime)
startTime
- time to begin playback (in seconds)public String getPlayerAPIId()
public void setPlayerAPIId(String playerAPIId)
playerAPIId
- player IDpublic PlayerParameters.AutoHideMode getAutoHide()
autohide
mode of the playerpublic void setAutoHide(PlayerParameters.AutoHideMode autoHide)
autohide
mode of the playerautoHide
- the autohide modepublic boolean isShowControls()
false
otherwisepublic void setShowControls(boolean showControls)
showControls
- true
to show video player controls and false
otherwisepublic boolean isModestBranding()
false
otherwisepublic void setModestBranding(boolean modestBranding)
modestBranding
- true
to show video player controls and false
otherwisepublic void setOrigin(String origin)
origin
- the domain URLpublic String getOrigin()
public int getLoadRelatedVideos()
public int getAutoplay()
public int getLoop()
public int getEnableJsApi()
public int getDisableKeyboardControls()
public int getFullScreen()
public int getShowInfo()
public int getIvLoadPolicy()
public int getClosedCaptionPolicy()
public int getShowControls()
public int getModestBranding()
Copyright © 2009-2013. All Rights Reserved.