The miniplayer
The portable DialerSeat dialer, embedded in your page with one script tag.
The miniplayer is the DialerSeat dialer in a compact panel: the lead queue, the call controls and your disposition picker. It runs in a frame on your page, signed in with a session your server creates, so your users never see a DialerSeat login.
<script src="https://dev.dialerseat.com/embed/v1.js" data-key="dpk_test_..."></script>
<div id="dialer" style="width:380px;height:640px"></div>
<script>
const dialer = DialerSeat.mount('#dialer', {
session: SESSION_TOKEN, // from POST /v1/seats/{id}/sessions
campaign: 'crm_campaign_77', // your own campaign id (optional)
leads: [
{ external_id: 'c_5501', first_name: 'Dana', phone: '+15125550142', city: 'Austin' },
],
theme: 'dark', // or 'light'
})
dialer.on('disposition', (e) => saveToCrm(e.lead.external_id, e.code, e.notes))
</script>Mount options
- session (required): the one-use token from
POST /v1/seats/{id}/sessions.It is passed in the URL fragment, which never reaches a server log. - leads: the queue to dial, in order. Each lead needs a phone;
external_idcomes back in every event so you can match it to your record. Any other plain fields are shown to the agent. - campaign: your campaign id. Campaign dial-mode exceptions apply, and it is in every webhook.
- theme: dark (default) or light.
- publishableKey: only if you did not put data-key on the script tag.
Methods
- dialer.on(type, fn) and dialer.off(type, fn). Use "*" for every event.
- dialer.setLeads(leads) replaces the queue, for example when the user picks another list in your app.
- dialer.destroy() removes the frame and its listeners.
Browser events
- ready: the dialer is signed in. Carries the seat, the environment and the dial mode.
- call: a call changed state: ringing, connected, voicemail or ended.
- disposition: the agent saved an outcome. Carries your code, label, outcome class, notes and the lead.
- queue_empty: every lead has been called.
- error: the dialer could not open, for example because the session expired or this page is not an allowed origin.
Browser events are for your interface. Write results to your database from webhooks, which are signed and retried: a browser tab can close before it tells you anything.
Allowed origins
The miniplayer only loads inside origins listed under Miniplayer in the console. The browser enforces this with a frame-ancestors header, and the dialer refuses to sign in anywhere else. Add every domain your app runs on, including staging.
Test numbers
With a test session nothing is dialled. The call plays out by the last digit of the number, and every step sends the same signed webhooks a real call does:
- Ending in 0–6: A person answers
- Ending in 7: Voicemail answers (AMD: machine)
- Ending in 8: Rings out, no answer
- Ending in 9: Busy
Open the console and press Try it under Miniplayer to watch a test dialer send your webhooks and browser events.
Live calls
A live seat dials the way any DialerSeat agent dials. The miniplayer registers the seat's own phone line in the browser. When the agent presses Call, DialerSeat rings that line first, then the lead, and connects the two the moment the lead picks up, with no dead air.
- The browser asks for the microphone the first time the agent presses Call. The line shows Line ready once it is registered.
- Answering-machine detection runs on every mode except preview. On a machine, the agent is released straight away and the next lead comes up.
- Calling hours are checked in the lead's own time zone before every dial, and numbers on your do-not-call list are never dialled. Pass state with a lead when you have it.
- Ring time follows the mode: 60 seconds for preview and power, 30 to 43 for progressive, 20 for predictive.
- Webhooks come from the carrier, not the browser:
call.endedarrives even if the agent closes the tab.