-
Notifications
You must be signed in to change notification settings - Fork 216
Support screen pixel density for react native #651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: af19cb8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -20,3 +20,8 @@ export type DataPublishOptions = { | |||
/** the topic under which the message gets published */ | |||
topic?: string; | |||
}; | |||
|
|||
export type LiveKitReactNativeInfo = { | |||
platform: 'ios' | 'android' | 'windows' | 'macos' | 'web' | 'native'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of curiosity: does RN support all these platforms and what does native
stand for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently there is support for all of these platforms, though we only support ios/android.
The typing here is from RN's platform types, though doesn't seem like anything actually uses native
; it just happens to be added to the type and left there.
src/room/utils.ts
Outdated
} | ||
|
||
return undefined; | ||
} | ||
|
||
export function getDevicePixelRatio(): number { | ||
if (!isReactNative()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we're not calling getDevicePixelRatio
in "dangerous" paths right now, but adding a isWeb()
check additionally wouldn't hurt either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! this makes also the RN global handling a lot cleaner :)
No description provided.