-
Notifications
You must be signed in to change notification settings - Fork 60
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
Covert BrowserDetection to TS #69
base: master
Are you sure you want to change the base?
Conversation
Remove BrowserCapabilities class since lib-jitsi-meet no longer uses it.
* @returns {boolean|undefined} - Returns true if the current version is | ||
* greater than the passed version and false otherwise. Returns undefined if | ||
* the current browser version is unknown. | ||
*/ | ||
isVersionGreaterThan(version) { | ||
isVersionGreaterThan(version: number): boolean | undefined { |
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.
Let's make this return a boolean always. If the version is not available, return false.
* @returns {boolean|undefined} - Returns true if the current version is | ||
* lower than the passed version and false otherwise. Returns undefined if | ||
* the current browser version is unknown. | ||
*/ | ||
isVersionLessThan(version) { | ||
isVersionLessThan(version: number): boolean | undefined { |
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.
Ditto.
* @returns {boolean|undefined} - Returns true if the current version is | ||
* equal to the passed version and false otherwise. Returns undefined if | ||
* the current browser version is unknown. | ||
* A loose-equality operator is used here so that it matches the sub-versions as well. | ||
*/ | ||
isVersionEqualTo(version) { | ||
isVersionEqualTo(version: number): boolean | undefined { |
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.
Ditto.
* @returns {boolean|undefined} - Returns true if the current version is | ||
* greater than the passed version and false otherwise. Returns undefined if | ||
* the current engine version is unknown. | ||
*/ | ||
isEngineVersionGreaterThan(version) { | ||
isEngineVersionGreaterThan(version: number): boolean | undefined { |
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.
Ditto.
* @returns {boolean|undefined} - Returns true if the current version is | ||
* lower than the passed version and false otherwise. Returns undefined if | ||
* the current engine version is unknown. | ||
*/ | ||
isEngineVersionLessThan(version) { | ||
isEngineVersionLessThan(version: number): boolean | undefined { |
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.
Ditto.
* @returns {boolean|undefined} - Returns true if the current version is | ||
* equal to the passed version and false otherwise. Returns undefined if | ||
* the current engine version is unknown. | ||
* A loose-equality operator is used here so that it matches the sub-versions as well. | ||
*/ | ||
isEngineVersionEqualTo(version) { | ||
isEngineVersionEqualTo(version: number): boolean | undefined { |
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.
Ditto.
@@ -0,0 +1,36 @@ | |||
|
|||
// TODO: Maybe fix the values to 'Chrome', 'Internet Explorer', etc. Currently |
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.
I guess we can drop this TODO?
* Maps the names of the browsers from ua-parser to the internal names defined in | ||
* ./browsers.js | ||
*/ | ||
export const PARSER_TO_JITSI_NAME: { [key: string]: Browser } = { |
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.
How do we parse Chromium engine browsers like Edge or Brave?
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "@jitsi/js-utils", | |||
"version": "2.2.1", | |||
"version": "2.2.2", |
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.
The auto-publisher ran because you used your master branch. Can you back out the version change?
Remove BrowserCapabilities class since lib-jitsi-meet no longer uses it.