Primitives / Device

foldkit-primitives/device

What the hardware reported last: a position, the cameras and microphones, a live stream, the state of a permission, whether the page is fullscreen. Denial is a status the Model holds, so a view can say so, and a transient failure keeps the last good data beside its error. (source)

NameFormModelMessagesArgs
Geolocationbundle{ status, coords, lastError }Located, Denied, Failednone
mediaDevices({ name, create? })bundle factory{ status, devices, lastError }Scan, DevicesChanged, Refreshed { devices }, Denied, Failednone
mediaStream({ name, request? })bundle factory{ status, lastError }Started, Stopped, Live, Ended, Denied, Failed{ audio, video }
permissions({ name, create? })bundle factory{ states, lastError }Snapshot, Changed, Cleared, Failed{ names }
enterFullscreen(element), exitFullscreen()CommandsEntered, Exited, Failed
fullscreenChanges()entryChanged { active }