Client-side Proview SDK migration: v7 → v8 · Script:
https://sdk.tlv.cx/session/init.jsOfficial v8 docs: Getting Started · Full API Reference · Session PlaybackThis guide covers migration-specific changes and before/after code only. Refer to the official docs links above for complete API reference, parameter defaults, and current examples.Breaking changes
All changes below require code modification. Severity indicates what breaks without the fix.🔴 Critical — the integration will not load without these
Script URL has changed. Update the loader on every page that runs proctoring.ProctorClient3 → Proview. window.ProctorClient3 no longer exists. All method calls move under Proview.session.*.
proctor_token → dsn. v7 used a per-session proctor_token UUID. v8 uses a project-level Data Source Name (DSN). Contact Talview support to provision your DSN.
Initialization pattern changed: command queue → proviewOnLoad callback. v7 used a command queue (window.tv). v8 requires window.proviewOnLoad to be defined before the script tag; the Proview global is available inside the callback.
🟠 High — behavioral breakage
Session start is now a Promise, not a callback.initCallback(err, uuid) is removed. session.start() returns a Promise that resolves with a SessionOutput.
ProctorClient3.on('log:event:type:16', cb)). v8 has no client-side alert events. All monitoring happens server-side and is delivered as structured incidents to your registered webhook endpoint. The only suspension signal visible client-side is the Suspend hook. See Webhooks overview.
Error handling is now global, not per-init. Register Proview.onError(handler) once before calling session.init(). The per-init errorCallback is removed.
networkDisconnectionCallback is removed. Use the NetworkStatusChanged hook. The callback receives an object { status: 'online' | 'offline' }, not a string.
rating_callback_url flat payload is replaced by a typed, versioned JSON envelope. See Webhooks overview and Subscribing to webhooks.
🟡 Medium & Low — parameter renames and removals
All renamed and removed parameters are listed in the Parameter reference table below.Before you start
- DSN — Contact Talview to provision DSNs for staging and production. Treat it as a secret; never commit it or expose it in source maps.
- Workflow step identifiers — Session type is no longer passed in code; it is dashboard-configured. Confirm your
workflow_step.identifierUUIDs with Talview before writing code. - Webhook endpoint — Provide your HTTPS endpoint URL to Talview support; they configure which event types are delivered. The endpoint must accept
POST, respondHTTP 200within 10 seconds, and be publicly reachable.
SDK migration
Script loading
Definewindow.proviewOnLoad before the script tag. The Proview global is available inside the callback.
Initialization
Stop and complete
Pause and resume
Session hooks
Proview.session.on(eventName, callback) replaces v7’s numeric alert IDs. session.on() returns an unsubscribe function, or use session.off(eventName, namedCallback) to remove a specific listener.
Session states
SessionOutput.state (and the state field in hook payloads) uses the SDK SessionState enum. These are the same eight uppercase values documented in Configuration.
Webhook
payload.status is a separate, server-side vocabulary — CREATED, IN_PROGRESS, PAUSED, SUSPENDED, STOPPED, COMPLETED, TERMINATED. It is delivered in webhook events and is not the same set as the SDK state above (for example, server-side IN_PROGRESS corresponds to the SDK’s MONITORING_IN_PROGRESS). Don’t map the two one-to-one. See Webhooks overview.Parameter reference: v7 → v8 changes
For the full
session.init() options and the attendee, workflow_step, and SessionOutput object shapes, see Configuration and Types.Rollout checklist
Code changes- Script URL updated to
https://sdk.tlv.cx/session/init.js -
window.proviewOnLoad = async function () { ... }defined before the script tag - All
ProctorClient3.*calls replaced withProview.session.* -
Proview.onError(handler)registered beforesession.init() -
session.init()return value checked:const success = await Proview.session.init(...); if (!success) return; -
session.on()listeners use the event names from the Session hooks table -
NetworkStatusChangedhandler reads{ status }(object, not a string) -
pause()andresume()calls pass a non-empty reason string -
attendee.first_name/attendee.last_nameused (notname) - Webhook handler updated for the v8 envelope format
- Session / incident storage updated for v8 fields (
uuid,integrity,score) - Session playback updated to
Proview.session.playback({ dsn, uuid, root })
- Full lifecycle:
init()→start()→complete()→ webhook received - Session and incident webhook payloads received and stored correctly
-
Suspendhook fires and is handled -
NetworkStatusChangedpayload handled as a{ status }object - Pause / resume tested end-to-end with non-empty reason strings
- Session playback loads
- Error handler fires on an invalid DSN
- Browser console: no CSP violations, no 404s from the old domain
- DSN swapped to the production value
- CSP updated in production (including
'unsafe-inline'directives) - Webhook endpoint registered for production with Talview support
Troubleshooting
`Proview` is undefined on page load
`Proview` is undefined on page load
proviewOnLoad was not defined before the script tag, or the SDK script failed to load. Ensure window.proviewOnLoad = async function () {...} is in a <script> block immediately before the <script async src="..."> tag. Check the network tab for a 404 or CSP block on sdk.tlv.cx.CSP violation on sdk.tlv.cx
CSP violation on sdk.tlv.cx
Add
https://sdk.tlv.cx to script-src (with 'unsafe-inline') and to img-src. Add https://*.talview.com and wss://*.talview.com to connect-src. Keep https://cdn.proview.io in your v7 directives until all in-flight v7 sessions have ended, then remove it.session.init() resolves false
session.init() resolves false
The DSN is invalid or belongs to the wrong environment (for example, a staging DSN used in production), or a required field is missing. Check
Proview.onError() output for the specific error code, and verify the DSN with your Talview account team.session.pause() rejects: 'Pause reason is required'
session.pause() rejects: 'Pause reason is required'
The
reason argument is empty or whitespace. Pass a non-empty string: session.pause('Scheduled break').Webhooks not arriving at my endpoint
Webhooks not arriving at my endpoint
Confirm the endpoint is registered with Talview support, returns
HTTP 200 within 10 seconds, and is publicly reachable over HTTPS. Webhooks may be retried, so implement idempotent upsert logic keyed on payload.uuid with an updated_at guard.sdk.tlv.cx.
