Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jallamsetty1
Copy link
Member

Remove BrowserCapabilities class since lib-jitsi-meet no longer uses it.

jallamsetty1 and others added 2 commits July 30, 2024 16:00
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 {
Copy link
Member

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 {
Copy link
Member

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 {
Copy link
Member

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 {
Copy link
Member

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 {
Copy link
Member

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 {
Copy link
Member

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
Copy link
Member

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 } = {
Copy link
Member

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",
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants