Client-side Proview SDK migration: v7 → v8 · Script:
https://sdk.tlv.cxOfficial v8 docs: Getting Started · Interfaces · Session Playback · System & Network RequirementsThis 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. See Getting Started → Load the SDK once.ProctorClient3 → Proview. window.ProctorClient3 no longer exists. All method calls move under Proview.session.*.
v7 had no
start() method — the session began on its own after tv('init', ...) and reported back through initCallback. In v8 you call Proview.session.start() yourself. v7 stop() ended the session for good, so its v8 equivalent is session.complete(), not session.stop(). See Stop and complete.proctor_token → dsn. v7 used an organization-level proctor_token, passed as the second argument to tv('init', ...). v8 uses a project-level Data Source Name (DSN), passed once to Proview.init({ dsn }), with a separate DSN per environment. Contact Talview support to provision your DSN. See Getting Started → Prerequisites.
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. See Getting Started → Initialise once per page view.
🟠 High — behavioral breakage
Session start is now an explicit call that returns a Promise, not a callback. In v7 the session started automatically aftertv('init', ...), and initCallback(err, uuid) fired once pre-checks passed and monitoring began. initCallback is removed. In v8 you call session.start(), which returns a Promise that resolves with a SessionOutput at that same point — when onboarding is complete and monitoring has begun. See Getting Started → Start the proctoring session.
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 client-side signals are the session state hooks (Suspend, Terminate, Pause, Resume, StateChange); see Session hooks. See Webhooks overview.
Error handling is now global, not per-init. Register Proview.onError(handler) once before calling Proview.init(). The per-init errorCallback is removed.
networkDisconnectionCallback is removed. Use the NetworkStatusChanged hook. The v7 callback took no arguments and was called repeatedly for as long as the candidate stayed offline. The v8 hook fires once per transition and receives an object { status: 'online' | 'offline' }, so you also learn when the connection returns.
rating_callback_url notification (session_uuid, external_id, message) is replaced by event webhooks whose body is the raw JSON of the event object, with no outer 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. See Getting Started → Prerequisites.
- Workflow step identifiers — Session type is no longer passed in code; proctoring behaviour comes from the flow configured for your project. Confirm your
workflow_step.identifiervalues (andworkflow_step.flow_uuid, if you select a flow per step) with Talview before writing code. - Webhook endpoint — Register an application and subscribe your HTTPS endpoint to the event types you need, as described in Subscribing to webhooks. The endpoint must be publicly reachable, accept
POST, and respond with a2xxstatus. - Content Security Policy — If your application enforces CSP headers, apply the policy in Getting Started → Content Security Policy.
- IT/network readiness — Have your DevOps or network team review Network Requirements to confirm firewall, domain whitelisting, and bandwidth prerequisites before rollout.
SDK migration
Script loading
Definewindow.proviewOnLoad before the script tag. The Proview global is available inside the callback. For the full v8 loader setup, see Getting Started → Load the SDK once.
Initialization
For the v8 options and which fields are required, see Getting Started → Initialise once per page view and its host checklist.Stop and complete
v7 had a singleProctorClient3.stop(finalCallback) that ended the session for good. v8 splits this in two: complete() ends the session (use this wherever you called v7 stop()), while stop() marks it STOPPED — interrupted before completion — without completing it. See Getting Started → Stop, complete, pause, and resume.
Pause and resume
Session hooks
Proview.session.on(eventName, callback) replaces v7’s ProctorClient3.on(). session.on() returns an unsubscribe function, or use session.off(eventName, namedCallback) to remove a specific listener. session.on() throws if you pass an event name it does not support.
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 Interfaces.
The session
status in webhook payloads is a separate, server-side vocabulary — CREATED, IN_PROGRESS, PAUSED, SUSPENDED, STOPPED, COMPLETED, TERMINATED. It is delivered in the session webhooks and in the session object of incident webhooks, and is not the same set as the SDK state above. Don’t map the two one-to-one. See Webhooks overview.Parameter reference: v7 to v8 changes
For the full
session.init() options and the attendee, workflow_step, and SessionOutput object shapes, see Interfaces and SDK Types.Rollout checklist
Code changes- Script URL updated to
https://sdk.tlv.cx, andProview.init({ dsn })called beforeProview.session.init() -
window.proviewOnLoad = async function () { ... }defined before the script tag - All
ProctorClient3.*calls replaced withProview.session.* - Explicit
Proview.session.start()call added, and the assessment shown only after it resolves - v7
ProctorClient3.stop()calls replaced withProview.session.complete() -
Proview.onError(handler)registered beforeProview.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 readsstatusfrom the payload object -
pause()andresume()calls pass a non-empty reason string -
first_name/last_name/emailmoved into theattendeeobject - Webhook handler updated for the v8 payload format
- Incident storage updated for v8 fields, including the nested
session(uuid,status,score) - Subscribed to the session webhooks (
session.instance.createdandsession.instance.updated) to receive session status, score and integrity, including for sessions that raise no incidents - Session playback updated to
Proview.playback.init({ uuid, root })with a token credential — see Playback
- Full lifecycle:
init()→start()→complete()→ webhook received - Session and incident webhook payloads received and stored correctly
-
Suspendhook fires and is handled -
NetworkStatusChangedhandled for bothofflineandonline - 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 subscribed for production
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
Apply the full policy from Getting Started → Content Security Policy — a partial one will let the SDK load but block Firebase and the playback iframe. Keep
https://cdn.proview.io in your v7 directives until all in-flight v7 sessions have ended, then remove it.session.init() rejects or resolves false
session.init() rejects or resolves false
session.init() rejects when a required field is missing — the top-level identifier, attendee.identifier, or workflow_step.identifier (see the host checklist). Otherwise, check that the DSN is valid and belongs to the right environment (for example, not a staging DSN used in production). 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 subscribed to the event type, returns a
2xx status, and is publicly reachable over HTTPS. Failed deliveries are retried, so implement idempotent upsert logic keyed on the payload id with an updated_at guard.sdk.tlv.cx.
