pauseCameraForHandoff method

Future<bool> pauseCameraForHandoff()

Releases the LiveKit camera so the native camera UI can use it. Returns whether the camera was active, so the caller can restore it.

Implementation

Future<bool> pauseCameraForHandoff() async {
  final wasEnabled = participant.isCameraEnabled();
  if (wasEnabled) {
    await participant.setCameraEnabled(false);
    notifyListeners();
  }
  return wasEnabled;
}