Primitives / API

foldkit-primitives/device

Functions

enterFullscreenRequests fullscreen for an element. The capability is feature-checked on the element itself (SVG and HTML elements both qualify), falling back to the legacy…
exitFullscreenLeaves fullscreen, with the same legacy fallback. Without a document API it yields Failed, not a throw.
fullscreenChangesChanged whenever fullscreen state flips, starting with the current answer. Without a document the stream is empty instead of throwing.
mediaDevicesMedia devices as a bundle factory: the enumerated device list in the Model, scanned on placement and re-scanned on every devicechange. Denial lands as…
mediaStreamA camera/mic stream as a bundle factory: one live MediaStream held in a Managed Resource while the Model asks for it. Started requests, Stopped releases;…
permissionsPermission states as a bundle factory: queried on placement, kept current by each status object's onchange. A resource holds the status objects (they cannot…

Values

Coordinates
FullscreenMessage
GeolocationGeolocation as a bundle: the device position in the Model, watched while placed. Permission denial is its own status (actionable UI); transient failures…
GeolocationMessage
GeolocationModel
LiveStreamThe live stream, for commands that attach it to an element. One assembly holds one.
MediaDevice
MediaDevicesMessage
MediaDevicesModel
MediaStreamMessage
MediaStreamModel
PermissionsMessage
PermissionsModel
PermissionState
WatchThe watched statuses, for the changes subscription. One assembly holds one.

Interfaces

MediaDevicesHandleThe slice of MediaDevices the bundle needs; satisfied by the platform object.
MediaStreamConstraintsWhich tracks mediaStream asks getUserMedia for.
MediaStreamHandleThe live stream: its tracks stop on release.
MediaTrackHandleA single media track: stopped on release.
PermissionsHandleThe slice of the Permissions API the bundle needs.
PermissionStatusHandleA queried permission status; onchange fires while watched.

Types

LiveStreamServiceThe stream service a placed camera requires.
WatchServiceThe watch service a placed Permissions bundle requires.