Skip to content

fix: expose isSupportedBrowser() utility #1859

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

oliverlaz
Copy link
Member

@oliverlaz oliverlaz commented Jul 21, 2025

💡 Overview

Exposes a utility function that integrators can use to determine whether the current client browser is officially supported by our SDK.

import { Browsers } from '@stream-io/video-<sdk>`

const isSupported = await Browsers.isSupportedBrowser();
if (!isSupported) {
  console.log('This browser isn't supported.');
}

🎫 Ticket: https://linear.app/stream/issue/XYZ-123
📑 Docs: https://github.com/GetStream/docs-content/pull/472

@oliverlaz oliverlaz requested review from myandrienko and Copilot July 21, 2025 13:56
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR exposes a new utility function isSupportedBrowser() that allows integrators to check if the current browser is officially supported by the Stream Video SDK. The function checks for Chrome, Edge, Firefox, and Safari with specific minimum version requirements.

Key changes include:

  • Enhanced browser version detection using the User-Agent Client Hints API
  • Added new isSupportedBrowser() function with version-based support validation
  • Comprehensive test coverage for the new functionality

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/client/src/helpers/client-details.ts Enhanced to collect full version list from User-Agent Client Hints API for more accurate browser version detection
packages/client/src/helpers/browsers.ts Added new isSupportedBrowser() function that validates browser support based on name and minimum version requirements
packages/client/src/helpers/tests/browsers.test.ts Added comprehensive test suite covering all browser detection functions including edge cases and version validation

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.

1 participant