Integrate Speakup Article Player in your website
Step 1: Add the Player Script​
To get started, you'll need to add a script to your webpage.
Copy and Paste the Script Below into the <head> or <body> section of your webpage before the start of your article:
<script
id="speakup-player-script"
src="https://cdn.speakup.ai/loader.speakup.min.js"
data-lang="en"
data-layout="boxed-small"
data-theme="default"
data-site="your-site-id"
async
></script>
Step 2: Add the Player Container and the Style​
Place the following container code right before the article text begins:
<style>
#speakup-player { margin: 15px 0 !important; max-width: none !important; min-height: 130px !important; } #speakup-player:not(#speakup-player:has(.speakup-container))::after { align-items: center; background-color: #fff; border-radius: 4px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12); font-family: sans-serif; content: 'Loading...'; display: flex !important; font-size: 13px; font-weight: 700; line-height: 1; justify-content: center; max-width: 750px; margin: 0 auto; min-height: 130px; text-transform: uppercase; } #speakup-player:not(#speakup-player:has(.speakup-container)) { display: block; } @media (prefers-color-scheme: dark) { #speakup-player:not(#speakup-player:has(.speakup-container))::after { color: #fff; background-color: #000; } }
</style>
<div id="speakup-player"></div>
The provided CSS is made so your website won't suffer of layout shifting, causing a issue in Core Web Vitals metrics misuration (CLS).
Infinite scroll websites
If your site loads multiple articles on the same page, see Infinite Scroll Integration for recommended implementation options.
Customization Options​
All the options listed below have to be prefixed with data-* as per the HTML standard.
Required Parameters​
| Parameter | Description | Allowed Values |
|---|---|---|
layout | Show the original or boxed version of Speakup Article Player | original, boxed-small |
theme | Set the theme of Speakup Article Player | default, black-white |
lang | Set the language of Speakup Article Player | See Available Languages |
site | Site ID assigned to the website for Speakup Article Player | Value from API or CMS |
Optional Parameters​
| Parameter | Description | Allowed Values | Default |
|---|---|---|---|
podcast | Show a specific podcast regardless of the page URL | Value from API or CMS | - |
playlist | Show a specific playlist built by CMS | Value from CMS | - |
showplaylist | Force or not the playlist to be displayed | "true", "false" | CMS value |
prm | Mark content as "premium" for paywall logic. See Paywall Guide | "true", "false" | "false" |
subscriber | Authorize user/browser to play premium content. See Paywall Guide | "true", "false" | "false" |
adv | Force advertising on/off compared to CMS setting | "true", "false" | CMS value |
hide | Hide player but leave content-making functions active | "true", "false" | - |
listen-label | Label shown when waiting for first play click | Max 30 characters | "Listen to this article now..." |
loading-delay | Delay player loading by milliseconds | Numeric value | 0 |
defer-on-scroll | Load player only after user scrolls | "true", "false" | "false" |
Available Languages​
| Language | data-lang Value |
|---|---|
| Albanian | sq |
| Arabic | ar |
| Chinese | zh |
| English | en |
| French | fr |
| German | de |
| Greek | gr |
| Hebrew | he |
| Hungarian | hu |
| Italian | it |
| Japanese | ja |
| Polish | pl |
| Portuguese | pt |
| Romanian | ro |
| Russian | ru |
| Spanish | es |
| Thai | th |
| Turkish | tr |
Complete Example​
Here's a complete example integrating the Speakup Article player:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>My Article</title>
<!-- Speakup Article Player Script -->
<script
id="speakup-player-script"
src="https://cdn.speakup.ai/loader.speakup.min.js"
data-lang="en"
data-layout="boxed-small"
data-theme="default"
data-site="your-site-id"
async
></script>
</head>
<body>
<article>
<h1>Article Title</h1>
<!-- Player Container with CLS-prevention styles -->
<style>
#speakup-player {
margin: 15px 0 !important;
max-width: none !important;
min-height: 130px !important;
}
</style>
<div id="speakup-player"></div>
<p>Your article content starts here...</p>
</article>
</body>
</html>
Need Help?​
If you have any doubts, do not hesitate to contact us at support@audioboost.com.