mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 03:12:29 +00:00
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:
@@ -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';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
17
static/webrtcUnsupported.html
Normal file
17
static/webrtcUnsupported.html
Normal 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>
|
||||||
Reference in New Issue
Block a user