From 4d29997ada8959e6cec3b3a2e512306e2fa9299d Mon Sep 17 00:00:00 2001 From: davidliu Date: Mon, 22 Jul 2024 15:42:27 +0900 Subject: [PATCH] fix: use getSettings() to get actual dimensions for mobile --- lib/src/participant/local.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/participant/local.dart b/lib/src/participant/local.dart index 32965977..66a27713 100644 --- a/lib/src/participant/local.dart +++ b/lib/src/participant/local.dart @@ -178,8 +178,8 @@ class LocalParticipant extends Participant { // use constraints passed to getUserMedia by default VideoDimensions dimensions = track.currentOptions.params.dimensions; - if (kIsWeb) { - // getSettings() is only implemented for Web + if (kIsWeb || lkPlatformIsMobile()) { + // getSettings() is only implemented for Web & Mobile try { // try to use getSettings for more accurate resolution final settings = track.mediaStreamTrack.getSettings();