Welcome to our Help Center 👋

Basic SmartVideo tag options

How to configure the SmartVideo tag for your video needs
Written by James Christensen
Updated 2 months ago

The SmartVideo tag is a very flexible tool for your website with many possible configurations.

Want to create a fancy background video for your site? There's a configuration for that.

Want to make a video play inline on mobile devices? There's a configuration for that.

Want a video to start playing automatically? You guessed it: there's a configuration for that.

Just scroll down this list, find the options you want for a particular video, and copy and paste it on your site. Feel free to frankenstein configurations together to fit your use case. 🧟‍♂️

Poster

Designates an image to be shown until a user hits the play button. We recommend using a PNG or JPEG to be compatible with all browsers.

<smartvideo src="path/to/my/video.mp4" width="1280" height="720" 
class="swarm-fluid" poster="path/to/my/image.png" controls>
</smartvideo>

Autoplay

Tells player to begin playback automatically as soon as possible.

Pro tip: unless combined with muted, many browsers will restrict autoplay. We recommend only using autoplay in combination with muted.

<smartvideo src="path/to/my/video.mp4" width="1280" height="720" 
class="swarm-fluid" controls muted autoplay></smartvideo>

Muted

Tells player to begin playback with audio muted.

<smartvideo src="path/to/my/video.mp4" width="1280" height="720" 
class="swarm-fluid" controls muted></smartvideo>

Loop

Tells player to restart the video once it ends.

<smartvideo src="path/to/my/video.mp4" width="1280" height="720" 
class="swarm-fluid" controls loop></smartvideo>

That's it for our basic SmartVideo tag options!

If you need more advanced options, visit our advanced SmartVideo tag options article.

Keywords: auto-play  , auto play , auto-playing , add picture for video , add image for video , add image , add overlay

Did this answer your question?