SmartVideo tag configuration options for advanced users
If you haven't checked out our Basic SmartVideo tag options article, you should do so, as >95% of use cases are addressed by the options shared on that page. However, if you're an advanced user with a unique configuration need that is not met in that article, keep reading!
If you choose to use YouTube as the original video source location, be aware of two important items below.
- 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 format. The source URL from YouTube/Vimeo must be the embed link.
Correct URL format:
Incorrect URL format:
- YouTube: https://www.youtube.com/watch?v=wBp0Rb-ZJak (this links to the page, and not the video itself, so it won't work)
- Vimeo: https://vimeo.com/448062899
<smartvideo src="https://www.youtube.com/embed/wBp0Rb-ZJak"**If you are not using YouTube or Vimeo, SmartVideo supports WordPress Media Library, Amazon S3, Google Cloud Storage, Wasabi, Dropbox, Google Drive, and even pCloud as the original file source location we are able to pull a copy from.
width="1280" height="720" class="swarm-fluid"
You might have noticed that controls is included in every SmartVideo tag. That's because, in the majority of cases, controls are desired so that a user is able to alter playback. To remove controls from the player, simply remove controls from the tag.
Pro tip: if you remove controls, make sure to set the video to autoplay (and muted to make sure autoplay works). If you don't, the user will have no way of beginning video playback.
class="swarm-fluid" muted autoplay>
Play video inline
Safari on iOS forces videos to go fullscreen. Use playsinline to tell Safari not to. Please note: when auto-playing a video, enabling Plays Inline is essential for proper playback in IOS/Safari
Make player unresponsive (fixed dimensions)
Removing class="swarm-fluid" tells the player to maintain height and width no matter what changes are made to the size of the browser window.
width="1280" height="720" controls>
That's it for our advanced SmartVideo tag options!