tricycle / elm-embed-youtube / Embed.Youtube.Attributes

Helper functions for Youtube Embed Attributes.

Sizing

width : Basics.Int -> Embed.Youtube.Internal.Attribute.Attribute

Set the width of the Embedded Youtube player

height : Basics.Int -> Embed.Youtube.Internal.Attribute.Attribute

Set the height of the Embedded Youtube player

Playback

autoplay : Embed.Youtube.Internal.Attribute.Attribute

Specify whether the initial video will automatically start to play when the player loads

loop : Embed.Youtube.Internal.Attribute.Attribute

This setting causes the player to play the initial video again and again.

start : Basics.Int -> Embed.Youtube.Internal.Attribute.Attribute

This causes the player to begin playing the video at the given number of seconds from the start of the video.

end : Basics.Int -> Embed.Youtube.Internal.Attribute.Attribute

This parameter specifies the time, measured in seconds from the start of the video, when the player should stop playing the video. The parameter value is a positive integer.

Note that the time is measured from the beginning of the video and not from the value of the start parameter.

mute : Embed.Youtube.Internal.Attribute.Attribute

Mute all sound

Styling

colorRed : Embed.Youtube.Internal.Attribute.Attribute

This 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.

The player uses the color red in the video progress bar.

colorWhite : Embed.Youtube.Internal.Attribute.Attribute

This 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.

The player uses the color white in the video progress bar.

modestBranding : Embed.Youtube.Internal.Attribute.Attribute

This lets you use a YouTube player that does not show a YouTube logo.

Note that a small YouTube text label will still display in the upper-right corner of a paused video when the user's mouse pointer hovers over the player.

playsInline : Embed.Youtube.Internal.Attribute.Attribute

This controls whether videos play inline or fullscreen in an HTML5 player on iOS.

hideControls : Embed.Youtube.Internal.Attribute.Attribute

Indicates whether the video player controls are displayed.

disableKeyboard : Embed.Youtube.Internal.Attribute.Attribute

Setting this causes the player to not respond to keyboard controls.

disableFullscreen : Embed.Youtube.Internal.Attribute.Attribute

Prevents the fullscreen button from displaying in the player.

disableVideoAnnotations : Embed.Youtube.Internal.Attribute.Attribute

Prevents video annotations from being shown.

Language

language : String -> Embed.Youtube.Internal.Attribute.Attribute

Sets the player's interface language

Set the parameter's value to an ISO 639-1 two-letter language code.

Closed Captions

closedCaptionsLanguagePreference : String -> Embed.Youtube.Internal.Attribute.Attribute

Specify the default language that the player will use to display captions.

Set the parameter's value to an ISO 639-1 two-letter language code.

closedCaptionsLanguageAlwaysShow : Embed.Youtube.Internal.Attribute.Attribute

Show closed captions by default, even if the user has turned captions off.

The default behavior is based on user preference.