onDeviceChanged property

void Function(String deviceId, TXMediaDeviceType type, TXMediaDeviceState state) onDeviceChanged
final

The Status of a Local Device Changed (for Desktop OS Only)

The SDK returns this callback when a local device (camera, mic, or speaker) is connected or disconnected.

  • Parameters:
    • deviceId:
      • Device ID.
    • deviceType:
      • Device type.
        • 0: Microphone
        • 1: Speaker
        • 2: Camera
    • state:
      • Device status.
        • 0: Connected
        • 1: Disconnected
        • 2: Started

Implementation

final void Function(String deviceId, TXMediaDeviceType type, TXMediaDeviceState state) onDeviceChanged;