Interface CaptureResult

Bytes captured by the host, as capturePhoto() / captureAudio() return them. bytes is a transferable ArrayBuffer — write it to a space, decode it, upload it. You never receive a MediaStream or a MediaStreamTrack, and that is not an omission: a track cannot be transferred into an app frame at all (DataCloneError), and the frame's opaque origin cannot open a device itself (getUserMedia throws SecurityError: Invalid security origin).

interface CaptureResult {
    bytes: ArrayBuffer;
    durationMs: number;
    mimeType: string;
}

Properties

bytes: ArrayBuffer
durationMs: number

How long the device was open, in ms.

mimeType: string

e.g. image/jpeg, audio/webm. Chosen by the HOST, not by you.