Class IFramePlayerOptions.Builder
-
- All Implemented Interfaces:
public final class IFramePlayerOptions.Builder
-
-
Constructor Summary
Constructors Constructor Description IFramePlayerOptions.Builder()
-
Method Summary
Modifier and Type Method Description final IFramePlayerOptionsbuild()final IFramePlayerOptions.Buildercontrols(Integer controls)Controls whether the web-based UI of the IFrame player is used or not. final IFramePlayerOptions.Builderautoplay(Integer controls)Controls if the video is played automatically after the player is initialized. final IFramePlayerOptions.Buildermute(Integer controls)Controls if the player will be initialized mute or not. final IFramePlayerOptions.Builderrel(Integer rel)Controls the related videos shown at the end of a video. final IFramePlayerOptions.BuilderivLoadPolicy(Integer ivLoadPolicy)Controls video annotations. final IFramePlayerOptions.BuilderlangPref(String languageCode)This parameter specifies the default language that the player will use to display captions. final IFramePlayerOptions.BuilderccLoadPolicy(Integer ccLoadPolicy)Controls video captions. final IFramePlayerOptions.Builderorigin(String origin)This parameter specifies the domain from which the player is running. final IFramePlayerOptions.Builderlist(String list)The list parameter, in conjunction with the listType parameter, identifies the content that will load in the player. final IFramePlayerOptions.BuilderlistType(String listType)Controls if the player is playing from video IDs or from playlist IDs. final IFramePlayerOptions.Builderfullscreen(Integer fs)Setting this parameter to 0 prevents the fullscreen button from displaying in the player. final IFramePlayerOptions.BuildermodestBranding(Integer modestBranding)Controls if the YouTube logo will be displayed in the control bar or not. -
-
Method Detail
-
build
final IFramePlayerOptions build()
-
controls
final IFramePlayerOptions.Builder controls(Integer controls)
Controls whether the web-based UI of the IFrame player is used or not.
- Parameters:
controls- If set to 0: web UI is not used.
-
autoplay
final IFramePlayerOptions.Builder autoplay(Integer controls)
Controls if the video is played automatically after the player is initialized.
-
mute
final IFramePlayerOptions.Builder mute(Integer controls)
Controls if the player will be initialized mute or not.
-
rel
final IFramePlayerOptions.Builder rel(Integer rel)
Controls the related videos shown at the end of a video.
- Parameters:
rel- If set to 0: related videos will come from the same channel as the video that was just played.
-
ivLoadPolicy
final IFramePlayerOptions.Builder ivLoadPolicy(Integer ivLoadPolicy)
Controls video annotations.
- Parameters:
ivLoadPolicy- if set to 1: the player will show video annotations.
-
langPref
final IFramePlayerOptions.Builder langPref(String languageCode)
This parameter specifies the default language that the player will use to display captions. If you use this parameter and also set the cc_load_policy parameter to 1, then the player will show captions in the specified language when the player loads. If you do not also set the cc_load_policy parameter, then captions will not display by default, but will display in the specified language if the user opts to turn captions on.
- Parameters:
languageCode- ISO 639-1 two-letter language code
-
ccLoadPolicy
final IFramePlayerOptions.Builder ccLoadPolicy(Integer ccLoadPolicy)
Controls video captions. It doesn't work with automatically generated captions.
- Parameters:
ccLoadPolicy- if set to 1: the player will show captions.
-
origin
final IFramePlayerOptions.Builder origin(String origin)
This parameter specifies the domain from which the player is running. Since the player in this library is not running from a website there should be no reason to change this. Using "https://www.youtube.com" (the default value) is recommended as some functions from the IFrame Player are only available when the player is running on a trusted domain.
- Parameters:
origin- your domain.
-
list
final IFramePlayerOptions.Builder list(String list)
The list parameter, in conjunction with the listType parameter, identifies the content that will load in the player. If the listType parameter value is "playlist", then the list parameter value specifies a YouTube playlist ID.
- Parameters:
list- The playlist ID to be played.
-
listType
final IFramePlayerOptions.Builder listType(String listType)
Controls if the player is playing from video IDs or from playlist IDs. If set to "playlist", you should use the "list" parameter to set the playlist ID to be played. See original documentation for more info: https://developers.google.com/youtube/player_parameters#Selecting_Content_to_Play
- Parameters:
listType- Set to "playlist" to play playlists.
-
fullscreen
final IFramePlayerOptions.Builder fullscreen(Integer fs)
Setting this parameter to 0 prevents the fullscreen button from displaying in the player. See original documentation for more info: https://developers.google.com/youtube/player_parameters#Parameters
- Parameters:
fs- if set to 1: the player fullscreen button will be show.
-
modestBranding
final IFramePlayerOptions.Builder modestBranding(Integer modestBranding)
Controls if the YouTube logo will be displayed in the control bar or not.
- Parameters:
modestBranding- If set to 1: the YouTube logo will not be displayed in the control bar.
-
-
-
-