Skip to content

Commit 20ab63f

Browse files
committed
chore: Hint to use MediaElement.setSinkId instead on browsers that don't implement selectAudioOutput.
1 parent 3f67360 commit 20ab63f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/src/mediadevices_impl.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'dart:async';
22
import 'dart:html' as html;
3+
import 'dart:html_common';
34
import 'dart:js' as js;
45
import 'dart:js_util' as jsutil;
56
import 'package:webrtc_interface/webrtc_interface.dart';
@@ -160,7 +161,7 @@ class MediaDevicesWeb extends MediaDevices {
160161
throw UnimplementedError('selectAudioOutput is missing');
161162
}
162163
} catch (e) {
163-
throw 'Unable to selectAudioOutput: ${e.toString()}';
164+
throw 'Unable to selectAudioOutput: ${e.toString()}, Please try to use MediaElement.setSinkId instead.';
164165
}
165166
}
166167

@@ -187,5 +188,6 @@ class MediaDevicesWeb extends MediaDevices {
187188
} catch (e) {
188189
throw 'Unable to get ondevicechange: ${e.toString()}';
189190
}
191+
return null;
190192
}
191193
}

0 commit comments

Comments
 (0)