Skip to content

Commit

Permalink
chore: Hint to use MediaElement.setSinkId instead on browsers that do…
Browse files Browse the repository at this point in the history
…n't implement selectAudioOutput.
  • Loading branch information
cloudwebrtc committed Aug 4, 2022
1 parent 3f67360 commit 20ab63f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/src/mediadevices_impl.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'dart:async';
import 'dart:html' as html;
import 'dart:html_common';
import 'dart:js' as js;
import 'dart:js_util' as jsutil;
import 'package:webrtc_interface/webrtc_interface.dart';
Expand Down Expand Up @@ -160,7 +161,7 @@ class MediaDevicesWeb extends MediaDevices {
throw UnimplementedError('selectAudioOutput is missing');
}
} catch (e) {
throw 'Unable to selectAudioOutput: ${e.toString()}';
throw 'Unable to selectAudioOutput: ${e.toString()}, Please try to use MediaElement.setSinkId instead.';
}
}

Expand All @@ -187,5 +188,6 @@ class MediaDevicesWeb extends MediaDevices {
} catch (e) {
throw 'Unable to get ondevicechange: ${e.toString()}';
}
return null;
}
}

0 comments on commit 20ab63f

Please sign in to comment.