Skip to content

Commit

Permalink
make the fix iOS specific
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasIO committed Oct 23, 2023
1 parent 26a2b21 commit 39b9a22
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/room/track/LocalTrack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { getBrowser } from '../../utils/browserParser';
import DeviceManager from '../DeviceManager';
import { DeviceUnsupportedError, TrackInvalidError } from '../errors';
import { TrackEvent } from '../events';
import { Mutex, compareVersions, isMobile, isSafari, sleep } from '../utils';
import { Mutex, compareVersions, isMobile, sleep } from '../utils';
import { Track, attachToElement, detachTrack } from './Track';
import type { VideoCodec } from './options';
import type { TrackProcessor } from './processor/types';
Expand Down Expand Up @@ -163,8 +163,8 @@ export default abstract class LocalTrack extends Track {
throw new Error('cannot get dimensions for audio tracks');
}

if (isSafari()) {
// Safari reports wrong initial resolution on iOS.
if (getBrowser()?.os === 'iOS') {
// browsers report wrong initial resolution on iOS.
// when slightly delaying the call to .getSettings(), the correct resolution is being reported
await sleep(10);
}
Expand Down

0 comments on commit 39b9a22

Please sign in to comment.