Read the main SDK getting started guide first — the loader script and
Proview.init() are shared by every module and are loaded once per page.1. Declare the module
AddProview.playback() to the modules array on Proview.init(). The dsn and credential declared at the top level are inherited — you do not repeat them.
2. Create a player
Proview.playback.init() creates one player instance. Call it once per session you want to play back.
init(). In a component framework, call it from the effect that runs after render, not during it.
3. Unmount the player
Callunmount() to take the player back out of its root element.
.on(), so listeners need no separate cleanup.
The instance is finished once you unmount it — do not reuse the handle. To play another recording, call Proview.playback.init() again.
In a component framework, unmount from the cleanup path that pairs with wherever you called init():
Authentication
Playback requires a credential. It will not mount without one — the default strategy is not sufficient. Pass a token strategy ascredential on Proview.init(). Authentication is handled by the auth module, which loads automatically — you do not declare it in modules.
Where the token comes from. Talview provides the token API as part of your integration — the endpoint and the request format for generating a playback token scoped to a specific session. Contact Talview if you have not received these details.
Why the token is required
The DSN identifies the project, not the viewer. It tells Talview which project a request belongs to — not who is asking or what they are allowed to see. Playback serves back recorded session material. Without a token, playback cannot know who is viewing or which recordings they should see. The generated token is how the viewer is authenticated and their access to the session material is confirmed.Handling tokens safely
- Request the token from your backend, not the browser. Your server calls the Talview token endpoint and passes the result to the page. Keeping that call server-side keeps the endpoint’s own credential out of the browser.
- Do your own authorization check first. Talview issues the token; deciding whether this viewer should see this recording is your application’s job.
- Treat it like a session credential. Keep it out of URLs, logs, and analytics payloads. Never ship a shared long-lived token to the browser.
Proview.playback.init Options
Pass a configuration object when invoking Proview.playback.init(). Each field is required unless noted otherwise.
uuid– Identifier of the session (for example,session-123) you want to play back.root– CSS selector for the element the player mounts into whentargetis"embed"— for example'#playback-root'. Only ID selectors are supported today, but the value must still be a valid selector, so the leading#is required. The element must exist before you callinit(). Not used whentargetis"popout"or"newtab".target(optional) – Where the playback opens. Defaults to"embed". Accepted values:"embed"– renders the player inside the current page, mounted intoroot. Usewrapperto control the in-page layout."popout"– opens the player in a separate popup browser window."newtab"– opens the player in a new browser tab.
wrapper(optional) – In-page layout for an embedded player. Only applies whentargetis"embed"; it is ignored for"popout"and"newtab". Defaults to"inline". Accepted values:"inline"– mounts in the normal document flow insideroot."sidepanel"– slides in as a panel from the side of the viewport."modal"– opens as a centered overlay dialog.
player_config(optional) – Object grouping the player’s sizing options:width(optional) – Width of the player. Accepts a CSS length string ("800px","90%","80vh") or a number, which is treated as pixels. Its effect depends ontarget/wrapper— see Dimensions. Ignored whentargetis"newtab".height(optional) – Height of the player. Same value format aswidth. Ignored forwrapper: "sidepanel"(a side panel always spans the full viewport height) and whentargetis"newtab". See Dimensions.
session_config(optional) – Object grouping view options for the playback session:report(optional, boolean) – Controls whether the session report is shown on mount. Defaults totrue. Whenfalse, the report is skipped and the player opens directly on the playback dashboard; the report is then unreachable (there is no “Back to Report” button).
Placement: target vs wrapper
target and wrapper control two independent things:
targetdecides where the player opens — inside the current page ("embed"), in a popup window ("popout"), or in a new tab ("newtab").wrapperdecides the in-page layout of an embedded player ("inline","sidepanel", or"modal"), and therefore only has an effect whentargetis"embed".
"iframe" value on either field. An embedded "modal", for example, is a modal dialog whose contents are the player iframe.
Dimensions
width and height (both under player_config) set the size of the player. Both are optional; when omitted the SDK falls back to sensible defaults for the chosen placement (auto-resizing to content or fitting the viewport). What each value controls depends on target and wrapper:
Notes:
- A number is treated as pixels (
player_config.width: 800≡player_config.width: "800px"). popoutopens a real browser window viawindow.open, whose size can only be expressed in pixels. Percentage or viewport units ("90%","80vh") are ignored forpopoutand fall back to the default window size — pass pixel values instead.
Events
Subscribe to player events with.on(event, handler) on the instance returned by Proview.playback.init(). Handlers are released when you unmount the player, so they need no separate cleanup.
Errors
Playback raises its own error codes rather than the SDK-wide ones.PlaybackError
Extends the standard SDK error object — see Error Reference → The error object for code, type, and message. Playback adds two fields:
Error codes
Recording lifecycle
Credential
Mount
Handling errors
Examples
Open directly on the playback dashboard
Skips the report and opens the playback dashboard on mount. The report is not reachable.Embed with custom dimensions
Sizes the embedded player viaplayer_config.

