getVideoInputDevice method
Implementation
@override
Future<IoDevice?> getVideoInputDevice() async {
try {
final source = _jsPublisher.getVideoSource();
final mediaTrack = source?.track;
if (mediaTrack == null) {
return null;
}
return IoDevice(
id: source!.deviceId!,
label: mediaTrack.label,
type: IoDeviceType.videoInput,
);
} catch (e) {
debugPrint('Error getting video input device for publisher: $e');
return null;
}
}