Skip to content

Commit

Permalink
fixed isZoomSupported method on android
Browse files Browse the repository at this point in the history
  • Loading branch information
Decoder07 committed Aug 26, 2024
1 parent cd269e4 commit f363975
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,11 @@ class _LocalPeerBottomSheetState extends State<LocalPeerBottomSheet> {
horizontalTitleGap: 2,
onTap: () async {
Navigator.pop(context);
HMSCameraControls.setZoom(zoomValue: 2);
bool isZoomSupported =
await HMSCameraControls.isZoomSupported();
if (isZoomSupported) {
HMSCameraControls.setZoom(zoomValue: 2);
}
},
contentPadding: EdgeInsets.zero,
leading: SvgPicture.asset(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class HMSCameraControlsAction {
hmssdk.getLocalPeer()?.let { localPeer ->
localPeer.videoTrack?.let { localVideoTrack ->
localVideoTrack.getCameraControl()?.let { cameraControl ->
HMSResultExtension.toDictionary(true, cameraControl.isZoomSupported())
result.success(HMSResultExtension.toDictionary(true, cameraControl.isZoomSupported()))
return
}
}
Expand Down

0 comments on commit f363975

Please sign in to comment.