Skip to content

Commit

Permalink
fix: use getSettings() to get actual dimensions for mobile (#560)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidliu authored Jul 22, 2024
1 parent 9fad8c6 commit 76973a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/participant/local.dart
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ class LocalParticipant extends Participant<LocalTrackPublication> {
// 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();
Expand Down

0 comments on commit 76973a3

Please sign in to comment.