YoutubePlayerParams class

Defines player parameters for YoutubePlayer.

Constructors

YoutubePlayerParams({bool autoPlay = true, bool mute = false, String captionLanguage = 'en', bool enableCaption = true, String color = 'white', bool showControls = true, bool enableKeyboard = kIsWeb, bool enableJavaScript = true, Duration? endAt, bool showFullscreenButton = false, String interfaceLanguage = 'en', bool showVideoAnnotations = true, bool loop = false, String origin = 'https://www.youtube.com', List<String> playlist = const [], bool playsInline = true, bool strictRelatedVideos = false, Duration startAt = Duration.zero, bool desktopMode = false, bool privacyEnhanced = false, bool useHybridComposition = true})
Defines player parameters for YoutubePlayer.
const

Properties

autoPlay bool
Specifies whether the initial video will automatically start to play when the player loads.
final
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
desktopMode bool
Enabling desktop mode.
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
endAt Duration?
This parameter specifies the time, measured in seconds from the start of the video, when the player should stop playing the video.
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
playlist List<String>
This parameter specifies a list of video IDs to play.
final
playsInline bool
This parameter controls whether videos play inline or fullscreen in an HTML5 player on iOS.
final
privacyEnhanced bool
Enables privacy enhanced embedding mode.
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
startAt Duration
This parameter causes the player to begin playing the video at the given number of seconds from the start of the video.
final
strictRelatedVideos bool
Enabling this will ensure that related videos will come from the same channel as the video that was just played.
final
useHybridComposition bool
Set to true to enable Flutter's new Hybrid Composition. The default value is true. Hybrid Composition is supported starting with Flutter v1.20+.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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