import React, { Component } from 'react'; /** * The list of all browsers supported by the application. */ const SUPPORTED_BROWSERS = [ { link: 'http://google.com/chrome', name: 'chrome', title: 'Chrome 44+' }, { link: 'http://www.chromium.org/', name: 'chromium', title: 'Chromium 44+' }, { link: 'http://www.getfirefox.com/', name: 'firefox', title: 'Firefox and Iceweasel 40+' }, { link: 'http://www.opera.com', name: 'opera', title: 'Opera 32+' }, { link: 'https://temasys.atlassian.net/wiki/display/TWPP/WebRTC+Plugins', name: 'ie', plugin: 'Temasys 0.8.854+', title: 'IE' }, { link: 'https://temasys.atlassian.net/wiki/display/TWPP/WebRTC+Plugins', name: 'safari', plugin: 'Temasys 0.8.854+', title: 'Safari' } ]; /** * React component representing unsupported browser page. * * @class UnsupportedDesktopBrowser */ export default class UnsupportedDesktopBrowser extends Component { /** * Renders the component. * * @returns {ReactElement} */ render() { const ns = 'unsupported-desktop-browser'; return (

This application is currently only supported by

{ this._renderSupportedBrowsers() }
); } /** * Renders a specific browser supported by the application. * * @param {Object} browser - The (information about the) browser supported * by the application to render. * @private * @returns {ReactElement} */ _renderSupportedBrowser(browser) { const { link, name, plugin, title } = browser; const ns = 'supported-browser'; // Browsers which do not support WebRTC could support the application // with the Temasys plugin. const pluginElement = plugin ?

{ plugin }

: null; return (
{ title } { pluginElement }
DOWNLOAD
); } /** * Renders the list of browsers supported by the application. * * @private * @returns {ReactElement} */ _renderSupportedBrowsers() { return (
{ SUPPORTED_BROWSERS.map(this._renderSupportedBrowser) }
); } }