PlayerAPI
Attributes
Markup attributes available on the custom element
JS embed only
Attributes are set on the <vturb-smartplayer> tag itself, so they exist only on the custom element embed. The iframe cannot read attributes from your page — see Element vs iframe.
Prop
Type
fluid
Makes the player fill its container instead of sizing itself from the video.
<!-- fills the container -->
<vturb-smartplayer id="vid-PLAYER_ID" fluid style="width: 100%; height: 100%;">
</vturb-smartplayer>
<!-- or constrained by an aspect ratio -->
<vturb-smartplayer id="vid-PLAYER_ID" fluid style="width: 100%; aspect-ratio: 16 / 9;">
</vturb-smartplayer>
Avoid combining fluid with a fixed container height when the player has headlines or
calls-to-action. Those are part of the player's total height, so a fixed height either crops the
video or pushes the CTAs out of view. Constrain the width and let aspect-ratio do the rest.
pauseonetouch
Pauses the video when the viewer taps the player, without having to surface the controls first.
<vturb-smartplayer id="vid-PLAYER_ID" pauseonetouch></vturb-smartplayer>
Mobile only — on desktop the click already reaches the controls.