YoutubePlayerParams class

Defines player parameters for YoutubePlayer.

Constructors

YoutubePlayerParams({bool mute = false, String captionLanguage = 'en', bool enableCaption = true, PointerEvents pointerEvents = PointerEvents.initial, String color = 'white', bool showControls = true, bool enableKeyboard = kIsWeb, bool enableJavaScript = true, bool showFullscreenButton = false, String interfaceLanguage = 'en', bool showVideoAnnotations = true, bool loop = false, String? origin = 'https://www.youtube.com', bool playsInline = true, bool strictRelatedVideos = false, String? userAgent})
Defines player parameters for the youtube player.
const

Properties

captionLanguage String
Specifies the default language that the player will use to display captions.
final
color String
This parameter specifies the color that will be used in the player's video progress bar to highlight the amount of the video that the viewer has already seen. Valid parameter values are red and white, and, by default, the player uses the color red in the video progress bar.
final
enableCaption bool
Setting the parameter's value to true causes closed captions to be shown by default, even if the user has turned captions off.
final
enableJavaScript bool
Setting the parameter's value to true enables the player to be controlled via IFrame or JavaScript Player API calls.
final
enableKeyboard bool
Setting the parameter's value to true causes the player to not respond to keyboard controls.
final
hashCode int
The hash code for this object.
no setterinherited
interfaceLanguage String
Sets the player's interface language. The parameter value is an ISO 639-1 two-letter language code or a fully specified locale.
final
loop bool
In the case of a single video player, a setting of true causes the player to play the initial video again and again.
final
mute bool
Mutes the player.
final
origin String?
This parameter provides an extra security measure for the IFrame API and is only supported for IFrame embeds.
final
playsInline bool
This parameter controls whether videos play inline or fullscreen in an HTML5 player on iOS.
final
pointerEvents PointerEvents
Defines whether or not the player reacts to pointer events.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showControls bool
This parameter indicates whether the video player controls are displayed.
final
showFullscreenButton bool
Setting this parameter to false prevents the fullscreen button from displaying in the player.
final
showVideoAnnotations bool
Setting the parameter's value to true causes video annotations to be shown by default, whereas setting to false causes video annotations to not be shown by default.
final
strictRelatedVideos bool
Enabling this will ensure that related videos will come from the same channel as the video that was just played.
final
userAgent String?
The user agent for the player.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() String
The serialized JSON representation of the YoutubePlayerParams.
toMap() Map<String, dynamic>
Creates Map representation of YoutubePlayerParams.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited