startRecording method

  1. @override
Future<ScreenRecording> startRecording(
  1. String path
)
override

Starts recording the display into path. Throws UnsupportedBackendAction when the backend cannot record.

Implementation

@override
Future<ScreenRecording> startRecording(String path) async {
  final raw = '$path.h265';
  try {
    await hid.call({'cmd': 'recordStart', 'path': raw});
  } on DeviceHidError catch (e) {
    throw BackendFailure(e.failure.errorKind, 'recording the iPhone could not start: ${e.detail}',
        nextSteps: e.nextSteps);
  }
  return _DeviceHubRecording(hid, raw, path, run);
}