Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

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

eastmancr012c9fb3298d
diff --git a/react/features/unsupported-browser/components/DefaultUnsupportedDesktopBrowser.tsx b/react/features/unsupported-browser/components/DefaultUnsupportedDesktopBrowser.tsx
index 772504a1f3..a8bd743da3 100644
--- a/react/features/unsupported-browser/components/DefaultUnsupportedDesktopBrowser.tsx
+++ b/react/features/unsupported-browser/components/DefaultUnsupportedDesktopBrowser.tsx
@@ -1,5 +1,7 @@
import React, { Component } from 'react';
+import JitsiMeetJS from '../../base/lib-jitsi-meet';
+
/**
* React component representing unsupported browser page.
*
@@ -8,12 +10,17 @@ import React, { Component } from 'react';
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}
*/
override componentDidMount() {
- window.location.pathname = 'static/recommendedBrowsers.html';
+ if (!JitsiMeetJS.isWebRtcSupported()) {
+ window.location.pathname = 'static/webrtcUnsupported.html';
+ } else {
+ window.location.pathname = 'static/recommendedBrowsers.html';
+ }
}
/**
diff --git a/static/webrtcUnsupported.html b/static/webrtcUnsupported.html
new file mode 100644
index 0000000000..2e54dd1a1c
--- /dev/null
+++ b/static/webrtcUnsupported.html
@@ -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>