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)
| Name | Form | Model | Messages | Args |
|---|---|---|---|---|
Geolocation | bundle | { status, coords, lastError } | Located, Denied, Failed | none |
mediaDevices({ name, create? }) | bundle factory | { status, devices, lastError } | Scan, DevicesChanged, Refreshed { devices }, Denied, Failed | none |
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() | Commands | Entered, Exited, Failed | ||
fullscreenChanges() | entry | Changed { active } |