For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
GuidesReferenceClick-to-Call
GuidesReferenceClick-to-Call
  • Core
    • Overview
  • Entities
    • SignalWire
    • Address
    • Participant
    • ClientPreferences
    • SelfCapabilities
    • SelfParticipant
    • User
    • WebRTCCall
      • AddressHistory<TAddress>
      • AudioConstraintsEvent
      • AuthenticateContext
      • Call
      • CallAddress
      • CallCapabilitiesState
      • CallDiagnosticSummary
      • CallError
      • CallNetworkIssue
      • CallNetworkMetrics
      • CallOptions
      • CallParticipant
      • CallSelfParticipant
      • CallState
      • ConstraintFallbackEvent
      • CredentialNoRefreshHandlerWarning
      • CredentialProvider
      • CredentialRefreshFallbackWarning
      • DebugOptions
      • DeviceController
      • DeviceRecoveryEvent
      • DiagnosticEvent
      • DialOptions
      • Directory
      • JSONRPCErrorResponse
      • JSONRPCRequest<TParams>
      • JSONRPCSuccessResponse<TResult>
      • LayoutLayer
      • MediaDirections
      • MediaOptions
      • MediaParamsEvent
      • MemberCapabilities
      • NodeSocketAdapter
      • OnOffCapability
      • PendingRPCOptions
      • PermissionResult
      • PlatformCapabilities
      • PreflightOptions
      • PreflightResult
      • RecoveryEvent
      • SATClaims
      • SDKCredential
      • SDKLogger
      • SelectDeviceOptions
      • SessionDiagnostics
      • SessionState
      • SignalWireOptions
      • Storage
      • StoredDevicePreference
      • TextMessage<TAddress>
      • TransferOptions
      • WebRTCApiProvider
      • WebRTCMediaDevices
  • Web Components
    • Overview
    • sw-audio-level
    • sw-call-controls
    • sw-call-dialpad
    • sw-call-media
    • sw-call-provider
    • sw-call-status
    • sw-call-widget
    • sw-click-to-call
    • sw-device-selector
    • sw-directory
    • sw-local-camera
    • sw-participant-controls
    • sw-participants
    • sw-self-media
    • sw-ui-alert
    • sw-ui-background
    • sw-ui-call-layout
    • sw-ui-content-drawer
    • sw-ui-control-bar
    • sw-ui-dialpad
    • sw-ui-dropup
    • sw-ui-icon
    • sw-ui-modal
    • sw-ui-responsive-container
    • sw-ui-split-button
    • sw-ui-transcript-view
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • Properties
  • Methods
  • clearDeviceState()
  • deviceInfoToConstraints()
  • disableAudioInput()
  • disableDeviceMonitoring()
  • disableVideoInput()
  • enableAudioInput()
  • enableDeviceMonitoring()
  • enableVideoInput()
  • enumerateDevices()
  • getDeviceCapabilities()
  • isValidDevice()
  • selectAudioInputDevice()
  • selectAudioOutputDevice()
  • selectVideoInputDevice()
  • setStorageManager()
EntitiesInterfaces

DeviceController

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

DeviceRecoveryEvent

Next
Built with

Interface for media device management.

Provides reactive access to available media devices, device selection, and monitoring for device changes (connect/disconnect).

Properties

audioInputDevices
MediaDeviceInfo[]Required

Current snapshot of available audio input devices. See MediaDeviceInfo.

audioInputDevices$
Observable<MediaDeviceInfo[]>Required

Observable list of available audio input (microphone) devices. See MediaDeviceInfo.

audioInputDisabled
booleanRequired

Whether audio input is currently disabled.

audioInputDisabled$
Observable<boolean>Required

Observable that emits true when audio input is disabled (receive-only).

audioOutputDevices
MediaDeviceInfo[]Required

Current snapshot of available audio output devices. See MediaDeviceInfo.

audioOutputDevices$
Observable<MediaDeviceInfo[]>Required

Observable list of available audio output (speaker) devices. See MediaDeviceInfo.

deviceRecovered$
Observable<DeviceRecoveryEvent>Required

Observable that emits when the SDK auto-switches a device due to disconnect, reconnect, or recovery. See DeviceRecoveryEvent.

errors$
Observable<Error>Required

Observable stream of errors from device enumeration and monitoring.

selectedAudioInputDevice
MediaDeviceInfo | nullRequired

Currently selected audio input device, or null if none. See MediaDeviceInfo.

selectedAudioInputDevice$
Observable<MediaDeviceInfo | null>Required

Observable of the currently selected audio input device, or null if none. See MediaDeviceInfo.

selectedAudioInputDeviceConstraints
boolean | MediaTrackConstraintsRequired

Media track constraints for the selected audio input device. Returns false when disabled. See MediaTrackConstraints.

selectedAudioOutputDevice
MediaDeviceInfo | nullRequired

Currently selected audio output device, or null if none. See MediaDeviceInfo.

selectedAudioOutputDevice$
Observable<MediaDeviceInfo | null>Required

Observable of the currently selected audio output device, or null if none. See MediaDeviceInfo.

selectedVideoInputDevice
MediaDeviceInfo | nullRequired

Currently selected video input device, or null if none. See MediaDeviceInfo.

selectedVideoInputDevice$
Observable<MediaDeviceInfo | null>Required

Observable of the currently selected video input device, or null if none. See MediaDeviceInfo.

selectedVideoInputDeviceConstraints
boolean | MediaTrackConstraintsRequired

Media track constraints for the selected video input device. Returns false when disabled. See MediaTrackConstraints.

videoInputDevices
MediaDeviceInfo[]Required

Current snapshot of available video input devices. See MediaDeviceInfo.

videoInputDevices$
Observable<MediaDeviceInfo[]>Required

Observable list of available video input (camera) devices. See MediaDeviceInfo.

videoInputDisabled
booleanRequired

Whether video input is currently disabled.

videoInputDisabled$
Observable<boolean>Required

Observable that emits true when video input is disabled (receive-only).

Methods

clearDeviceState()

1clearDeviceState(): Promise<void>

Clears all device state (history, selections, persisted prefs) and re-enumerates.

Returns

Promise<void>


deviceInfoToConstraints()

1deviceInfoToConstraints(deviceInfo): MediaTrackConstraints

Converts a MediaDeviceInfo to track constraints suitable for getUserMedia.

Parameters

deviceInfo
MediaDeviceInfo | nullRequired

The device to convert, or null for default constraints. See MediaDeviceInfo.

Returns

MediaTrackConstraints


disableAudioInput()

1disableAudioInput(): void

Disables audio input (receive-only mode). No track will be acquired.

Returns

void


disableDeviceMonitoring()

1disableDeviceMonitoring(): void

Stops monitoring for media device changes.

Returns

void


disableVideoInput()

1disableVideoInput(): void

Disables video input (receive-only mode). No track will be acquired.

Returns

void


enableAudioInput()

1enableAudioInput(): void

Re-enables audio input, restoring the last selection or auto-selecting.

Returns

void


enableDeviceMonitoring()

1enableDeviceMonitoring(): void

Starts monitoring for media device changes (connect/disconnect).

Returns

void


enableVideoInput()

1enableVideoInput(): void

Re-enables video input, restoring the last selection or auto-selecting.

Returns

void


enumerateDevices()

1enumerateDevices(): Promise<void>

Force a device re-enumeration.

Returns

Promise<void>


getDeviceCapabilities()

1getDeviceCapabilities(deviceInfo): Promise<MediaTrackCapabilities | null>

Returns the capabilities of a media device.

Parameters

deviceInfo
MediaDeviceInfoRequired

The device to query. See MediaDeviceInfo.

Returns

Promise<MediaTrackCapabilities | null>

The device capabilities, or null if unavailable.


isValidDevice()

1isValidDevice(deviceInfo): Promise<boolean>

Checks whether a device is still available and usable.

Parameters

deviceInfo
MediaDeviceInfo | nullRequired

The device to validate, or null. See MediaDeviceInfo.

Returns

Promise<boolean>

true if the device is valid and available. Returns false for null, audio output devices, or unavailable devices.


selectAudioInputDevice()

1selectAudioInputDevice(device): void

Sets the preferred audio input device for future calls.

Parameters

device
MediaDeviceInfo | nullRequired

The device to select, or null to use the system default. See MediaDeviceInfo.

Returns

void


selectAudioOutputDevice()

1selectAudioOutputDevice(device): void

Sets the preferred audio output device for future calls.

Parameters

device
MediaDeviceInfo | nullRequired

The device to select, or null to use the system default. See MediaDeviceInfo.

Returns

void


selectVideoInputDevice()

1selectVideoInputDevice(device): void

Sets the preferred video input device for future calls.

Parameters

device
MediaDeviceInfo | nullRequired

The device to select, or null to use the system default. See MediaDeviceInfo.

Returns

void


setStorageManager()

1setStorageManager(storageManager): void

Injects the storage manager for device persistence.

Parameters

storageManager
StorageManagerRequired

Optional storage manager used to persist device selections.

Returns

void