Add hardware api for camera, audio input/output selection. (#147)

* chore: Add hardware api for device settings dialog, camera preview, audio input/output selection.

* update.

* update flutter-webrtc.

* chore: add popupmenu for audio/video selection.

* chore: Improve menu tooltip text.

* Removed hardware settings dialog, added it to experimental branch.

* remove unused code.

* Respond to device changes.

* fixed `flutter analyze`.

* update.

* bump verion to v1.1.1.
This commit is contained in:
CloudWebRTC
2022-08-24 12:41:11 +08:00
committed by GitHub
parent c1445677f5
commit 1d621501f7
12 changed files with 300 additions and 18 deletions
+12
View File
@@ -81,4 +81,16 @@ extension LocalVideoTrackExt on LocalVideoTrack {
options.copyWith(cameraPosition: position),
);
}
Future<void> switchCamera(String deviceId) async {
final options = currentOptions;
if (options is! CameraCaptureOptions) {
logger.warning('Not a camera track');
return;
}
await restartTrack(
options.copyWith(deviceId: deviceId),
);
}
}