How to use the SmartVideo tag
For a full overview of using SmartVideo outside WordPress — installation snippets, platform-specific steps, and the SmartVideo tag — see the primary guide: Using SmartVideo on non-WordPress platforms.
If you do not have the SmartVideo script installed in your site’s header, venture over to Install SmartVideo on another CMS in our Help Center and choose the platform your site is built on. Once you’ve installed the script, head back to this page to learn about our SmartVideo tag.
If you do have our script installed in your site’s header, keep reading to learn how to use the SmartVideo tag.
If you aren’t using our WordPress plugin, the SmartVideo tag is how you place the SmartVideo player on your pages yourself.
When you should use it:
-
You don’t have our plugin for WordPress installed
-
You want to place a SmartVideo player yourself by giving it a video’s URL (a direct file link, a YouTube embed link, or a Vimeo link) instead of having SmartVideo replace an embed that’s already on your page
How to use it:
The script you installed in your site’s header includes everything the SmartVideo player needs. The SmartVideo tag places that player on your page. An example of what the SmartVideo player looks like in live demo form can be seen at swarmify.com. To use the player, insert the following HTML wherever you want your videos to appear:
<smartvideo src="https://your-video.example.com/file.mp4"
width="1280" height="720"
class="swarm-fluid" controls>
</smartvideo>
Wherever our script sees a SmartVideo tag, it replaces it with the SmartVideo player. On phones and tablets you’ll see a floating frosted-glass control bar with large 44-pixel touch targets; on narrow players, less-used controls (mute, captions, speed, picture-in-picture) tuck into a three-dot overflow menu so the bar stays uncluttered.
Please note: YouTube conversion is best-effort — YouTube’s download restrictions mean the fetch can fail, so some videos convert and some don’t. For playback you can rely on, download the file and upload it to your SmartVideo library. If you still use YouTube as the original video source location, check these two items:
-
If your videos are set to “private,” change them to “unlisted” instead. This ensures Swarmify can see the file to begin fetching and processing.
-
Make sure you are using the correct URL type. The source URL from YouTube must be the embed link. For example:
| Good: | https://www.youtube.com/embed/wBp0Rb-ZJak |
| Bad: |
https://www.youtube.com/watch?v=wBp0Rb-ZJak
(this links to the page, and not the video itself, so it won’t work) |
If you are not using YouTube or Vimeo, SmartVideo supports importing from (tutorials linked):
-
and even pCloud
For help configuring the SmartVideo tag for your site’s needs, visit our SmartVideo tag options article. To match the player’s accent color (and the new frosted-glass tint) to your brand, see Customize player color.
Thanks for being a Swarmify subscriber! 🐝
Keywords: add smart video tags, add smartvideo tags, adding a smartvideo, adding a smart video