Versions & Installation

Loading the SDK

Without a pin, ap-entry.js loads its default version, which may not be the newest. To use features marked Needs v5, pin 5.0.0 by adding the following before loading the AutoProctor script:

<script> var apVersionNum = '5.0.0'; </script>

Then add the loader to your page:

<script src="https://cdn.autoproctor.co/ap-entry.js"></script>

ap-entry.js picks the version, adds that version's script and stylesheet to the page, and fires an event when they have loaded:

EventMeaning
apLibReadyThe SDK has loaded and window.AutoProctor is defined. Create your instance after this. detail.statusCode is 2005.
apLibLoadingFailedThe SDK couldn't be loaded (network, ad blocker, firewall). ap-entry.js then shows a browser alert and reloads the page.

Listen for them before the loader tag:

window.addEventListener('apLibReady', () => {
  // window.AutoProctor is ready: create your instance here
})

window.addEventListener('apLibLoadingFailed', () => {
  // The SDK couldn't load
})

Content Security Policy

If your test page sends a Content-Security-Policy header, it must allow what the SDK loads and calls. This policy covers every feature on these pages; start from it and remove what you don't use:

script-src  'self' https://cdn.autoproctor.co https://cdn.socratease.co 'wasm-unsafe-eval';
style-src   'self' 'unsafe-inline' https://cdn.autoproctor.co https://cdn.socratease.co https://fonts.googleapis.com;
font-src    'self' https://fonts.gstatic.com;
img-src     'self' data: blob: https://cdn.autoproctor.co https://*.s3.amazonaws.com https://*.s3.us-east-1.amazonaws.com;
media-src   'self' blob: https://*.s3.amazonaws.com https://*.s3.us-east-1.amazonaws.com;
connect-src 'self' https://www.autoproctor.co https://submit.autoproctor.co
            https://cdn.autoproctor.co https://*.s3.amazonaws.com
            https://*.lambda-url.us-east-1.on.aws https://api.ipify.org
            https://*.live-video.net wss://*.live-video.net;
frame-src   https://www.youtube.com;
worker-src  'self' blob:;
  • 'wasm-unsafe-eval' is needed for face detection, which is on by default, and for object detection.
  • connect-src covers AutoProctor's API, test submission, direct evidence uploads to cloud storage, the trust-score and impersonation services, the IP lookup used by multi-session detection, and Amazon IVS for candidate recording.
  • An inline <script> that sets apVersionNum or starts AutoProctor is blocked by a strict script-src unless you allow it with a nonce or hash, or move it into a file. A blocked pin is silent: you just get the default version.
  • If you set assetsBaseUrl, add its origin to script-src, style-src and connect-src.
  • Roll a new policy out with Content-Security-Policy-Report-Only first and check the browser console for blocked requests during a full test.

Self-hosting Assets Needs v5

The SDK downloads some heavy files (models and recording libraries) at runtime, only when the matching feature is on. To serve them from your own server, for example on a network that blocks AutoProctor's CDN, set assetsBaseUrl at the top level of proctoringOptions:

await apInst.setup({
    trackingOptions: { numHumans: true },
    assetsBaseUrl: 'https://assets.example.com/autoproctor',
})

Copy these files to the same paths under your base URL. You only need the files for features you use.

Path under assetsBaseUrlNeeded forCopy from
face-detection-tiny-blaze/vision_wasm_internal.js, vision_wasm_internal.wasm, vision_wasm_nosimd_internal.js, vision_wasm_nosimd_internal.wasm, blaze_face_short_range.tflite, tiny_face_detector_model-shard1, tiny_face_detector_model-weights_manifest.jsonFace detection, ID card face matchhttps://cdn.autoproctor.co/ext/face-detection-tiny-blaze/
phone-detection/transformers.min.js, ort-wasm-simd-threaded.asyncify.mjs, ort-wasm-simd-threaded.asyncify.wasm, config.json, preprocessor_config.json, model.onnxObject detectionhttps://cdn.autoproctor.co/ext/phone-detection/
session-rec-all.min.jsSession recordinghttps://cdn.socratease.co/session-rec-all.min.js
rrweb-player-2.0.0-alpha.18.min.js, rrweb-player-2.0.0-alpha.18.min.cssSession recording playback in the report. Only loaded from your server when .setup() with assetsBaseUrl ran on the same instance; a report page that only calls .showReport() loads it from AutoProctor's CDN.https://cdn.autoproctor.co/ext/
ivs/amazon-ivs-web-broadcast-1.40.0.jsCandidate recordinghttps://cdn.autoproctor.co/ext/ivs/

Server requirements:

  • HTTPS, with CORS allowing your test pages' origin.
  • Serve .wasm as application/wasm and .js/.mjs as text/javascript.
  • The four large object-detection files (transformers.min.js, both ort-wasm-simd-threaded.asyncify.* files and model.onnx) should be served gzip-compressed.
  • Re-copy the files whenever you change SDK version.

assetsBaseUrl only changes where these files come from. API calls and evidence uploads still go to AutoProctor, and candidate recording still streams to Amazon IVS. ap-entry.js, the SDK script and stylesheet, the report's images, Google Fonts, the how-to video and the auxiliary-device setup image still load from their usual hosts.

Browser Compatibility

AutoProctor works on all modern browsers, even on mobile phones. It runs only on secure pages (https://, or localhost while developing). For a full list of compatible devices and browsers, see our compatibility guide.