Usage
The Spect browser API is built for interviewer sites that want to run interviews fairly. It provides full window blocking, satellite phone streams, display and process inspection, and more. Everything is available on window.Spect.
Local ports
Blocking Window API
Blocks the whole window. While blocking is active, the candidate cannot switch tabs with Ctrl+Tab or switch applications with Alt+Tab, and most other keyboard shortcuts are suppressed too. It also pushes back floating windows, such as AI cheating assistants.
await window.Spect.blockwindow()
// { success: true, blockMode: true }Unblocking Window API
Releases the window after blocking has been applied.
await window.Spect.unblockwindow()
// { success: true, blockMode: false }isBlocked API
Returns whether the window is currently blocked. Use it to check the live state of the lockdown.
const blocked = await window.Spect.isBlocked()
// falseSatellite APIs
Satellite lets the candidate scan a QR code shown by the Spect browser with the Spect Satellite app. The QR code contains the local IP and port, and after connecting the candidate can share live video from their phone camera with the browser.
openQRCodeModal()
Opens the QR code modal.
await window.Spect.satellite.openQRCodeModal()closeQRCodeModal()
Closes the QR code modal once the candidate has scanned it.
await window.Spect.satellite.closeQRCodeModal()getLiveStream()
Returns the ID of the live video element for the stream coming from the phone.
const videoId = await window.Spect.satellite.getLiveStream()
const video = document.getElementById(videoId)
const stream = video.captureStream()
console.log(stream.getVideoTracks())Multiple Monitor Detection API
Returns the number of external monitors connected, excluding the primary display.
const externalDisplays = await window.Spect.getExternalDisplayCount()
// 1