1. API
  2. systemPreferences

API

Methods for interacting with system preferences in a ToDesktop application.

Remarks

This package exposes a number of methods for interacting with system preferences in a ToDesktop application.

Functions

askForMediaAccess()

Signature:

        import { systemPreferences } from "@todesktop/client-core"
systemPreferences.askForMediaAccess(type: MediaTypeCommon): Promise<boolean>;

      
Parameters
Parameter Type Description
type MediaTypeCommon

Returns:

Promise<boolean>

getMediaAccessStatus()

Signature:

        import { systemPreferences } from "@todesktop/client-core"
systemPreferences.getMediaAccessStatus(type: MediaTypeCommon | "screen"): Promise<AccessStatus>;

      
Parameters
Parameter Type Description
type MediaTypeCommon | "screen"

Returns:

Promise<AccessStatus>

Type Aliases

AccessStatus

Signature:

        export declare type AccessStatus = "not-determined" | "granted" | "denied" | "restricted" | "unknown";

      

MediaTypeCommon

Signature:

        export declare type MediaTypeCommon = "microphone" | "camera";

      
Type Alias Description
AccessStatus
MediaTypeCommon

Previous <- screen