Twilio-video.js: Will you ever add official support for Brave?

Created on 28 May 2020  路  8Comments  路  Source: twilio/twilio-video.js

  • [x] I have verified that the issue occurs with the latest twilio-video.js release and is not marked as a known issue in the CHANGELOG.md.
  • [x] I reviewed the Common Issues and open GitHub issues and verified that this report represents a potentially new issue.
  • [x] I verified that the Quickstart application works in my environment.
  • [x] I am not sharing any Personally Identifiable Information (PII)
    or sensitive account information (API keys, credentials, etc.) when reporting this issue.

Code to reproduce the issue:

Expected behavior:

The SDK works in Brave so isSupported should return true

Actual behavior:

isSupported returns false

Software versions:

  • [x] Browser(s):
    image

  • [x] Operating System: MacOS

  • [x] twilio-video.js: 2.4.0
  • [x] Third-party libraries (e.g., Angular, React, etc.): React

Most helpful comment

@mattdodge not sure how relevant this is with the latest version - but we just wrapped the isSupported with some custom logic for chrome based browsers like brave.

We added a new library detect-browser yarn add detect-browser

Here's our new isSupportedCustom function that we use.

import Video from 'twilio-video';

const isSupportedCustom = () => {
  if (Video.isSupported) {
    return true;
  } else {
    // check if its a chrome based browser like brave
    const { detect } = require('detect-browser');
    const browser = detect();
    if (browser && browser.name === 'chrome') return true;
  }
  return false;
};

All 8 comments

https://github.com/twilio/twilio-video.js/blob/face39fdfaf35f45231a8b78d444952fc16b636f/lib/util/support.js

function isSupported() {
  const browser = guessBrowser();
  const rebrandedChrome = rebrandedChromeBrowser(browser);
  return !!browser
    && isGetUserMediaSupported()
    && isRTCPeerConnectionSupported()
    && (!rebrandedChrome || SUPPORTED_CHROME_BASED_BROWSERS.includes(rebrandedChrome))
    && !isNonChromiumEdge(browser);
}

The && (!rebrandedChrome || SUPPORTED_CHROME_BASED_BROWSERS.includes(rebrandedChrome)) is what is evaluated false.

I would suggest adding brave to the SUPPORTED_CHROME_BASED_BROWSERS

Incredible, this needs fixed as soon as possible. And what about Opera?

I'll leave my original comments, but digging deeper into the codebase I see not supporting Brave was a conscious choice.

Do you plan to ever have official support for brave? Is it currently safe to use? As far as I'm aware, they currently support all the needed API's

Hi @RusseII ,

isSupported will return true only on browsers for which we do extensive testing on. You are still free to use the SDK on Brave since it supports WebRTC, but we will not prioritize any issues specific to Brave at this point. Explicit QE support for Brave is not in our roadmap at this point.

Having said that, since Brave is Chromium based, you should be able to use the SDK without major issues.

Thanks,

Manjesh Malavalli
JSDK Team

We just tried to update from 2.3.0 and ran into this issue. We want to continue supporting brave, but we'll now need to rewrite our code that uses isSupported to do our own check. It would be nice if there was more granularity from twilio on this, like the ability to easily import the functions that do the lower level checks, a way to check for official twilio support vs feature detection for browser libraries, or a way to customize the list of supported renamed chrome browsers.

This change is blocking us from an easy upgrade path to get the new connection features of 2.5.0 馃槥

@manjeshbhargav how would one use the SDK with Brave? The values for supported seem hard-coded in there. Or would we need to run the SDK from source?

@mattdodge not sure how relevant this is with the latest version - but we just wrapped the isSupported with some custom logic for chrome based browsers like brave.

We added a new library detect-browser yarn add detect-browser

Here's our new isSupportedCustom function that we use.

import Video from 'twilio-video';

const isSupportedCustom = () => {
  if (Video.isSupported) {
    return true;
  } else {
    // check if its a chrome based browser like brave
    const { detect } = require('detect-browser');
    const browser = detect();
    if (browser && browser.name === 'chrome') return true;
  }
  return false;
};

Ah, great snippet, thanks for sharing that!

Was this page helpful?
0 / 5 - 0 ratings