feat(base): add WebRTC availability detection (#16608)

* feat(base/environment) add WebRTC availability detection

* feat(base/unsupported-browser) switch to JitsiMeetJS WebRTC detection

* fix(static/webrtcUnsupported) remove links
This commit is contained in:
eastmancr
2025-11-03 14:25:10 -06:00
committed by GitHub
parent fdf95444e9
commit 012c9fb329
2 changed files with 26 additions and 2 deletions

View File

@@ -1,5 +1,7 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import JitsiMeetJS from '../../base/lib-jitsi-meet';
/** /**
* React component representing unsupported browser page. * React component representing unsupported browser page.
* *
@@ -8,12 +10,17 @@ import React, { Component } from 'react';
class DefaultUnsupportedDesktopBrowser extends Component { class DefaultUnsupportedDesktopBrowser extends Component {
/** /**
* Redirects to the static recommended browsers page that is also used for IE. * Redirects to the static recommended browsers page or the WebRTC unsupported page.
* IE and other browsers without WebRTC support will show the WebRTC unsupported page.
* *
* @returns {void} * @returns {void}
*/ */
override componentDidMount() { override componentDidMount() {
window.location.pathname = 'static/recommendedBrowsers.html'; if (!JitsiMeetJS.isWebRtcSupported()) {
window.location.pathname = 'static/webrtcUnsupported.html';
} else {
window.location.pathname = 'static/recommendedBrowsers.html';
}
} }
/** /**

View File

@@ -0,0 +1,17 @@
<html>
<head>
<!--#include virtual="/base.html" -->
<link rel="stylesheet" href="css/all.css"/>
<!--#include virtual="/title.html" -->
</head>
<body>
<div class = 'unsupported-desktop-browser'>
<h2 class = 'unsupported-desktop-browser__title'>
WebRTC is not available in your browser
</h2>
<p class ='unsupported-desktop-browser__description'>
It looks like your browser does not support WebRTC. Please enable it or try another browser.
</p>
</div>
</body>
</html>