Setup & Installation

Does SmartVideo work on a Wix site?

Updated October 5, 2026

Yes, you can add a SmartVideo player through Wix’s Embed HTML element. Put both the SmartVideo loader script and the video tag inside the same embed. Wix HTML embeds run in a separate iframe, so a loader installed only in the site’s head cannot reach a video tag inside that embed.

Site-wide Custom Code is a separate option for auto-converting eligible existing videos. Neither method guarantees that every Wix video element will work with SmartVideo; test playback on your published site.

Add a SmartVideo player with Embed HTML

For a reliable source, upload your video file to the SmartVideo Library and copy its SmartVideo tag. YouTube conversion is best-effort; if your content is on YouTube, use your own copy of the file and upload it to the Library instead.

Follow Wix’s current HTML embed instructions:

  1. In the Wix Editor, click Add Elements, then Embed Code, then Popular Embeds.
  2. Choose Embed HTML and click the embed on your page.
  3. Click Enter Code. Under Add your code here, paste both your SmartVideo loader snippet and your video tag, as shown below.
  4. Click Apply, then size the embed to fit your video. Check the layout on desktop and mobile; Wix’s iframe container does not automatically resize to its content.
  5. Publish your changes and test the video on the live page.
<script data-cfasync="false">
    var swarmoptions = {
        swarmcdnkey: "YOUR_SWARM_CDN_KEY",
        iframeReplacement: "iframe",
        autoreplace: {
            youtube: true
        }
    };
</script>
<script async data-cfasync="false" src="https://assets.swarmcdn.com/swarmcdn.js"></script>

<smartvideo src="https://your-video.example.com/file.mp4"
            width="1280" height="720"
            class="swarm-fluid" controls>
</smartvideo>

Replace YOUR_SWARM_CDN_KEY with the Swarm CDN Key shown at the top of your dashboard. Replace the example video tag with the one copied from your Library, or replace its src with your own public video-file URL. A public source URL must return the video bytes without a login and remain accessible for as long as you embed the video; do not use expiring or signed URLs.

You do not need a second copy of the loader in the site’s head for this HTML embed. SmartVideo does not issue a standalone iframe URL or direct video-file link; use the complete script-and-tag embed, not Wix’s Embed a site URL field.

Install site-wide Custom Code for existing videos

Wix’s Custom Code instructions require a published site with a connected domain. Use a Wix plan that supports connecting a domain.

  1. Open the Configuration tab in your Swarmify dashboard, configure your settings, and copy the loader snippet.
  2. In your Wix site’s dashboard, open Settings, then Custom Code under Development & integrations.
  3. Click + Add Custom Code, paste the snippet, and name it SmartVideo.
  4. Under Add Code to Pages, choose All pages or Choose specific pages. For all pages, choose to load the code on each page your visitor opens, rather than only once per visit.
  5. Under Place Code in, choose Head, then click Apply.
  6. Test the published pages, including navigation between pages and video playback.

If the page also has YouTube embeds, check that they still play after you install the snippet. If any go blank, turn off Replace YouTube & Vimeo embeds in the Configuration tab of your dashboard, copy the updated snippet, and reinstall it. This also turns off automatic Vimeo conversion. To keep Vimeo conversion while leaving a YouTube embed alone, add class="swarm-exclude" to that YouTube iframe wherever you control its embed code.

The loader can auto-convert eligible Vimeo embeds it can access. Password-protected and Only me Vimeo videos do not import. A video inside a separate Wix HTML embed needs its own loader in that embed.

For standard HTML video elements and background videos, SmartVideo can optimize delivery without replacing the existing player when the corresponding setting and plan support it. Background-video optimization is included on Growth and Pro. Do not assume that uploading a file to Wix or adding a Wix video widget makes it eligible; verify the published result.

If the player does not load

Wix reports that its December 2025 frontend-security changes can block some third-party code, including dashboard custom code and embedded code. If the player does not load, email support@swarmify.com or use our support widget with the published page URL and whether you used Embed HTML or site-wide Custom Code.

Evaluating SmartVideo for Wix? See the Wix video hosting overview.

Get SmartVideo live on your site

Set it up on WordPress, Shopify, Squarespace, or any platform in a few minutes.

14-day free trial · Card required, no charge until day 15