Skip to content

Attributes

All attributes are observed: changing them at runtime updates the player, and only the part affected is redrawn. Every attribute is also a property in camelCase (color-primary → player.colorPrimary).

AttributeDefaultDescription
src—Video URL. Also the fallback for responsive-src.
src-webm / src-mp4 / src-ogg—Same video in several formats; the browser picks. Take priority over src.
responsive-src—JSON array [{"maxWidth":640,"src":"…","label":"360p"}, …, {"src":"…"}]. See Quality.
poster—Poster image URL.
preloadnonenone, metadata or auto.
autoplayoffStarts by itself, muted if the browser blocks sound.
mutedoffStarts muted.
loopoffLoops the video.
aspect-ratio16:9Any W:H or W/H. Invalid values fall back to 16:9.
AttributeDefaultDescription
controls-visibletruefalse disables the control bar.
controls-hide-on-hoverfalsetrue hides the controls while the mouse is over the player.
hide-on-play-delay0Seconds without activity before the controls fade out during playback. 0 = never.
volume-hide-delay1Seconds the volume slider stays visible after opening or last use. 0 = only while hovering.
pause-offscreenoffPauses the video when the player scrolls out of view. pause-offscreen="resume" also plays it again when it comes back. Not while in fullscreen or Picture-in-Picture.
show-stop-buttonoffShows the stop button.
hide-play-buttonoffHides the large centre play button.
hide-fullscreen-buttonoffHides the fullscreen button.
AttributeDefaultDescription
thumbnails—URL of a WebVTT thumbnails file, auto (generated, every device) or none (time only). Without it, thumbnails are generated on devices with a mouse. See Seek preview.
AttributeDefaultDescription
play-btn-sizemdsm, md or lg.
play-btn-colorrgba(255,255,255,0.9)Background color of the centre button.
play-btn-icon—Image URL, or inline SVG / icon-font markup (sanitised).
AttributeDefaultDescription
color-primary#aaaAccent color.
color-overlayrgba(0,0,0,0.95)Modal background.
color-controlsrgba(0,0,0,0.7)Control bar and menu background.

These can also be set from CSS. See CSS variables & parts.

AttributeDefaultDescription
modal-enabledtruefalse disables the modal.
modal-title—Title. Allows br, b, strong, i, em, span, small.
modal-description—Body text, same tags as the title.
modal-description-colorrgba(255,255,255,0.7)Description color.
modal-cta-textJoin NowButton text (alone it also enables the modal).
modal-cta-url#Button link. Only http, https, mailto and tel.
modal-delay0Second at which playback pauses and the modal opens. 0 = on pause.
cta-bg-colorcolor-primaryButton background.
cta-text-color#000Button text color.
cta-hover-bg-color#fffButton background on hover.
cta-hover-text-color#000Button text color on hover.
AttributeDefaultDescription
error-titleVideo ErrorTitle of the error screen.
error-retry-textRetryRetry button text.
AttributeDefaultDescription
playback-rate1Initial speed.
show-playback-rateoffShows the speed menu.
qualities—JSON array [{"label":"720p","src":"…"}]. Shows the quality menu.
captions-src—WebVTT captions URL.
captions-labelSubtitlesCaptions track label.
captions-defaultoffShows captions from the start.
enable-pipoffPicture-in-Picture button (where supported).
enable-chromecastoffCast button (needs the Cast SDK).