Generic HTML / CDN Embed

Add voice calls to any website using a single script tag

Quick Start

Works with any static HTML site, including Netlify, Vercel, GitHub Pages, custom servers, and static site generators (Jekyll, Hugo, Eleventy, etc.).

1

Get Your Widget Key

Sign up at mediasfu.com to get a free widget key.

2

Add the Script to Your HTML

Add this to the <head> or end of <body>:

<script src="https://cdn.mediasfu.com/widget.js"></script>
3

Add a Widget Element

Place this anywhere in your HTML where you want the widget to appear:

<mediasfu-widget
  widget-key="YOUR_WIDGET_KEY"
  widget-type="click-to-call">
</mediasfu-widget>
4

Deploy

Push your changes. The widget appears on your live site.

Complete Example

<!DOCTYPE html>
<html>
<head>
  <title>My Site with Calls</title>
</head>
<body>
  <h1>Welcome!</h1>
  <p>Talk to our team anytime.</p>

  <script src="https://cdn.mediasfu.com/widget.js"></script>
  <mediasfu-widget
    widget-key="YOUR_WIDGET_KEY"
    widget-type="click-to-call"
    button-text="Start Call">
  </mediasfu-widget>
</body>
</html>

All Widget Types

1. Click-to-Call Button

<mediasfu-widget
  widget-key="YOUR_WIDGET_KEY"
  widget-type="click-to-call"
  button-text="Call Now"
  position="bottom-right">
</mediasfu-widget>

2. AI Agent

<mediasfu-widget
  widget-key="YOUR_WIDGET_KEY"
  widget-type="ai-agent">
</mediasfu-widget>

3. Meeting Portal

<mediasfu-widget
  widget-key="YOUR_WIDGET_KEY"
  widget-type="meeting-join">
</mediasfu-widget>

4. Calls Dashboard

<mediasfu-widget
  widget-key="YOUR_WIDGET_KEY"
  widget-type="calls"
  width="400px"
  height="600px">
</mediasfu-widget>

5. Web Agent (Embedded)

<mediasfu-widget
  widget-key="YOUR_WIDGET_KEY"
  widget-type="web-agent-embed"
  width="100%"
  height="600px">
</mediasfu-widget>

6. Agent Dashboard (Full Interface)

<mediasfu-widget
  widget-key="YOUR_WIDGET_KEY"
  widget-type="web-agent-dashboard"
  width="100%"
  height="700px">
</mediasfu-widget>

Configuration Attributes

Attribute Values Example
widget-key Your MediaSFU ID wk_abc123xyz
widget-type click-to-call, ai-agent, meeting-join, calls, web-agent-embed, web-agent-dashboard click-to-call
button-text Any text Talk to Us
position bottom-right, bottom-left, top-right, top-left bottom-left
theme light, dark dark
width CSS width 100%, 400px
height CSS height 600px, auto

Static Site Generators

Jekyll / Hugo / Eleventy

Add the HTML in your template files exactly as shown above. The script will load once and work across all pages.

Netlify

Just push your HTML with the script tag. It works automatically. No build configuration needed.

Vercel / Next.js (Static Export)

If using static export, add the widget in your HTML. For dynamic Next.js, use the React wrapper instead (see our React guide).

Testing

  1. Open your site in a browser
  2. Look for the widget button or element
  3. Click it to test the connection
  4. You should hear the call connect
  5. Open browser console (F12) to check for errors

Troubleshooting

Widget not showing?

Widget key rejected?

Calls not connecting?

CORS or security errors?

Need help? Email support@mediasfu.com or visit mediasfu.com/docs. You can also fork example repositories on GitHub.