Skip to content

Commit

Permalink
fix: fix speaker switching behavior for android.
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudwebrtc committed Oct 16, 2024
1 parent 519b25b commit 4c6129a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions example/lib/widgets/controls.dart
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ class _ControlsWidgetState extends State<ControlsWidget> {
else
PopupMenuButton<MediaDevice>(
icon: const Icon(Icons.settings_voice),
offset: Offset(0, -90),
offset: const Offset(0, -90),
itemBuilder: (BuildContext context) {
return [
PopupMenuItem<MediaDevice>(
Expand Down Expand Up @@ -355,7 +355,7 @@ class _ControlsWidgetState extends State<ControlsWidget> {
icon: const Icon(Icons.mic_off),
tooltip: 'un-mute audio',
),
if (!lkPlatformIs(PlatformType.iOS))
if (!lkPlatformIsMobile())
PopupMenuButton<MediaDevice>(
icon: const Icon(Icons.volume_up),
itemBuilder: (BuildContext context) {
Expand Down Expand Up @@ -393,7 +393,7 @@ class _ControlsWidgetState extends State<ControlsWidget> {
];
},
),
if (!kIsWeb && lkPlatformIs(PlatformType.iOS))
if (!kIsWeb && lkPlatformIsMobile())
IconButton(
disabledColor: Colors.grey,
onPressed: Hardware.instance.canSwitchSpeakerphone
Expand Down

0 comments on commit 4c6129a

Please sign in to comment.