# Embed Player

The **Async Embed Player** lets you embed a customizable audio player into any webpage. Choose a voice, tailor the design, whitelist your domains, and generate a ready-to-use embed script.

---
## Overview

Use the embed player when you want to:

* Play audio generated by Async on your own website.
* Let users listen to content using your selected AI voice.
* Customize the player's design to fit your brand.
* Restrict usage to trusted domains via whitelisting.

Once configured, Async generates a script snippet you can paste directly into your site.

---

## 1. Select an AI Voice

Choose any voice from your **Voice Library**. The selected voice is applied across all embed players running on your whitelisted domains.

Updating the voice in the console instantly updates the player—no need to change your embed code.

---

## 2. Customize Player Design

You can control the appearance of the player using the customization panel.

![Screenshot 2025-11-27 at 17.39.16.png](https://api.apidog.com/api/v1/projects/909580/resources/366695/image-preview)



Choose a custom accent color, shape, style and theme of your player.
All changes are reflected instantly in the preview.

---

## 3. Add Whitelisted Domains

Before generating the embed code, you must add at least one allowed domain.

The **whitelist** ensures secure and controlled usage:

* Only whitelisted domains can host the embed player.
* Prevents unauthorized embedding.
* Ensures consistent performance and content integrity.

Click **Add URL** to save each domain.

---

## 4. Generate Embed Code

After adding at least one domain, click **Generate embed code**.

Async will generate a lightweight `<script>` snippet you can paste into your website.

### Example

```html
<script src="https://async.com/developer/assets/embed-player.js"></script>
<embed-player user-id="" color="" shape-type="" style-type="" theme=""></embed-player>
```  

(Your snippet will include your settings and parameters.)

---

## 5. Embed in Your Website

Paste the snippet into:

* HTML pages
* Webflow / Wix / Framer / Squarespace embeds
* Blog platforms like Ghost
* Markdown/HTML blocks inside CMS editors

The player will automatically appear and use your chosen customization settings.

---

## Troubleshooting

### Player does not load

* Ensure the domain is added to your whitelist.
* Check that the script snippet is copied exactly as generated.
* Verify there are no ad blockers or CSP rules blocking external scripts.

### Wrong voice playing

* The embed player always uses the voice selected in the console.
* After changing the voice, refresh the page.
* No need to regenerate embed code.

### Styling not applied

* Ensure your snippet includes the correct `data-color`, `data-theme`, and other attributes.
* Clear browser cache and reload.

---

## Security Notes

* Embed player only works on whitelisted domains.
* The script is sandboxed and cannot access cookies or private user information.
* API communication is done via secure HTTPS connections.
* If a domain is removed from the whitelist, the player immediately stops working on that domain.

---

