Resolves the target window via resolveWindowSource, exposes orientation
angles as observables, and integrates with the iOS permission flow via
createPermissionAware.
Whether the device has real orientation sensor hardware. isSupported only checks API availability — desktop browsers expose the API but fire events with all-null values when no hardware exists. hasRealData$ becomes true on the first event where any of alpha/beta/gamma is non-null.
isAbsolute$
ReadonlyObservable<boolean>
Whether the orientation data is absolute (relative to the Earth’s coordinate frame)
alpha$
ReadonlyObservable<number | null>
Rotation around the z-axis in degrees (0–360)
beta$
ReadonlyObservable<number | null>
Rotation around the x-axis in degrees (-180–180)
gamma$
ReadonlyObservable<number | null>
Rotation around the y-axis in degrees (-90–90)
isSupported$
ReadonlyObservable<boolean>
-
permissionState$
ReadonlyObservable<PermissionState>
Current permission state. "unsupported" = API not available in this environment. Never undefined.
permissionGranted$
ReadonlyObservable<boolean>
true only when permissionState$ is "granted"
needsPermission$
ReadonlyObservable<boolean>
true when permissionState$ is "prompt" or "denied". "unsupported" → false.
ensurePermission
() => Promise<void>
Request permission. No-op if unsupported or already granted. If requestPermission throws, the error is propagated (state unchanged).