CameraDeviceInfo class
Represents information about a video input device (camera).
- This class extends DeviceInfo and provides metadata about a camera device available on the system. Instances of this class are returned by VideoSDK.getCameras().
Example
List<CameraDeviceInfo>? cameras = await VideoSDK.getCameras();
if (cameras != null && cameras.isNotEmpty) {
for (final camera in cameras) {
print('Camera: ${camera.label} (${camera.deviceId})');
}
// Switch to a different camera
final CameraDeviceInfo deviceToSwitch = cameras.firstWhere(
(cam) => cam.deviceId != VideoSDK.getSelectedVideoDevice()?.deviceId,
);
await room.changeCam(deviceId: deviceToSwitch.deviceId);
}
- Inheritance
-
- Object
- MediaDeviceInfo
- DeviceInfo
- CameraDeviceInfo
Constructors
- CameraDeviceInfo({required String deviceId, String? groupId, String? kind, required String label, FacingMode? facingMode})
-
Describes a camera by its
deviceId.
Properties
- deviceId → String
-
Platform-assigned identifier for the device.
finalinherited
- facingMode → FacingMode?
-
Which way the camera faces, or
nullwhen the platform does not say.final - groupId → String?
-
Groups devices that belong to the same physical hardware — a headset's
microphone and speaker share a
groupId. Null where the platform does not report one.finalinherited - kind → String?
-
audioinput,audiooutputorvideoinput.finalinherited - label → String
-
Human-readable name, as reported by the platform.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited