Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
MM-12505: remove all things WebRTC (#1907)
Browse files Browse the repository at this point in the history
  • Loading branch information
lieut-data committed Oct 25, 2018
1 parent 657ee2e commit a70d06c
Show file tree
Hide file tree
Showing 66 changed files with 241 additions and 6,624 deletions.
52 changes: 4 additions & 48 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ modification, are permitted provided that the following conditions are met:
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of highlight.js nor the names of its contributors
may be used to endorse or promote products derived from this software
* Neither the name of highlight.js nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
Expand Down Expand Up @@ -909,7 +909,7 @@ Common code (API client, Redux stores, logic, utility functions) for building a

* LICENSE: Apache-2.0

Copyright 2015-present Mattermost, Inc.
Copyright 2015-present Mattermost, Inc.

Apache License
Version 2.0, January 2004
Expand Down Expand Up @@ -2165,7 +2165,7 @@ exhaustive, and do not form part of our licenses.
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More_considerations
for the public:
for the public:
wiki.creativecommons.org/Considerations_for_licensees

=======================================================================
Expand Down Expand Up @@ -2545,50 +2545,6 @@ SOFTWARE.

---

## webrtc-adapter

This product contains 'webrtc-adapter' by GitHub user "webrtcHacks".

A shim to insulate apps from WebRTC spec changes and browser prefix differences

* HOMEPAGE:
* https://github.com/webrtchacks/adapter#readme

* LICENSE: BSD-3-Clause

Copyright (c) 2014, The WebRTC project authors. All rights reserved.
Copyright (c) 2018, The adapter.js project authors. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

* Neither the name of Google nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

---

## whatwg-fetch

This product contains 'whatwg-fetch' by GitHub.
Expand Down
19 changes: 0 additions & 19 deletions actions/views/webrtc.js

This file was deleted.

38 changes: 0 additions & 38 deletions actions/webrtc_actions.jsx

This file was deleted.

11 changes: 0 additions & 11 deletions actions/websocket_actions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ import {ActionTypes, Constants, AnnouncementBarMessages, Preferences, SocketEven
import {fromAutoResponder} from 'utils/post_utils';
import {getSiteURL} from 'utils/url.jsx';

import * as WebrtcActions from './webrtc_actions.jsx';

const dispatch = store.dispatch;
const getState = store.getState;

Expand Down Expand Up @@ -302,10 +300,6 @@ function handleEvent(msg) {
handleHelloEvent(msg);
break;

case SocketEvents.WEBRTC:
handleWebrtc(msg);
break;

case SocketEvents.REACTION_ADDED:
handleReactionAddedEvent(msg);
break;
Expand Down Expand Up @@ -710,11 +704,6 @@ function handleHelloEvent(msg) {
setServerVersion(msg.data.server_version)(dispatch, getState);
}

function handleWebrtc(msg) {
const data = msg.data;
return WebrtcActions.handle(data);
}

function handleReactionAddedEvent(msg) {
const reaction = JSON.parse(msg.data.reaction);

Expand Down
8 changes: 0 additions & 8 deletions components/admin_console/admin_console.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -379,14 +379,6 @@ export default class AdminConsole extends React.Component {
schema: AdminDefinition.settings.integrations.custom_integrations.schema,
}}
/>
<SCRoute
path={`${props.match.url}/webrtc`}
component={SchemaAdminSettings}
extraProps={{
...extraProps,
schema: AdminDefinition.settings.integrations.webrtc.schema,
}}
/>
<SCRoute
path={`${props.match.url}/external`}
component={SchemaAdminSettings}
Expand Down
105 changes: 1 addition & 104 deletions components/admin_console/admin_definition.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2154,109 +2154,6 @@ export default {
],
},
},
webrtc: {
schema: {
id: 'WebrtcSettings',
name: t('admin.integrations.webrtc'),
name_default: 'Mattermost WebRTC (Beta)',
settings: [
{
type: Constants.SettingsTypes.TYPE_BOOL,
key: 'WebrtcSettings.Enable',
label: t('admin.webrtc.enableTitle'),
label_default: 'Enable Mattermost WebRTC: ',
help_text: t('admin.webrtc.enableDescription'),
help_text_default: 'When true, Mattermost allows making **one-on-one** video calls. WebRTC calls are available on Chrome, Firefox and Mattermost Desktop Apps.',
help_text_markdown: true,
},
{
type: Constants.SettingsTypes.TYPE_TEXT,
key: 'WebrtcSettings.GatewayWebsocketUrl',
label: t('admin.webrtc.gatewayWebsocketUrlTitle'),
label_default: 'Gateway WebSocket URL:',
placeholder: t('admin.webrtc.gatewayWebsocketUrlExample'),
placeholder_default: 'E.g.: "wss:https://webrtc.mattermost.com:8189"',
help_text: t('admin.webrtc.gatewayWebsocketUrlDescription'),
help_text_default: 'Enter wss:https://<mattermost-webrtc-gateway-url>:<port>. Make sure you use WS or WSS in your URL depending on your server configuration.\n' +
'This is the WebSocket used to signal and establish communication between the peers.',
isDisabled: needsUtils.stateValueFalse('WebrtcSettings.Enable'),
},
{
type: Constants.SettingsTypes.TYPE_TEXT,
key: 'WebrtcSettings.GatewayAdminUrl',
label: t('admin.webrtc.gatewayAdminUrlTitle'),
label_default: 'Gateway Admin URL:',
placeholder: t('admin.webrtc.gatewayAdminUrlExample'),
placeholder_default: 'E.g.: "https://webrtc.mattermost.com:7089/admin"',
help_text: t('admin.webrtc.gatewayAdminUrlDescription'),
help_text_default: 'Enter https://<mattermost-webrtc-gateway-url>:<port>/admin. Make sure you use HTTP or HTTPS in your URL depending on your server configuration.\n' +
'Mattermost WebRTC uses this URL to obtain valid tokens for each peer to establish the connection.',
isDisabled: needsUtils.stateValueFalse('WebrtcSettings.Enable'),
},
{
type: Constants.SettingsTypes.TYPE_TEXT,
key: 'WebrtcSettings.GatewayAdminSecret',
label: t('admin.webrtc.gatewayAdminSecretTitle'),
label_default: 'Gateway Admin Secret:',
placeholder: t('admin.webrtc.gatewayAdminSecretExample'),
placeholder_default: 'E.g.: "PVRzWNN1Tg6szn7IQWvhpAvLByScWxdy"',
help_text: t('admin.webrtc.gatewayAdminSecretDescription'),
help_text_default: 'Enter your admin secret password to access the Gateway Admin URL.',
isDisabled: needsUtils.stateValueFalse('WebrtcSettings.Enable'),
},
{
type: Constants.SettingsTypes.TYPE_TEXT,
key: 'WebrtcSettings.StunURI',
label: t('admin.webrtc.stunUriTitle'),
label_default: 'STUN URI:',
placeholder: t('admin.webrtc.stunUriExample'),
placeholder_default: 'E.g.: "stun:webrtc.mattermost.com:5349"',
help_text: t('admin.webrtc.stunUriDescription'),
help_text_default: 'Enter your STUN URI as stun:<your-stun-url>:<port>. STUN is a standardized network protocol to allow an end host to assist devices to access its public IP address if it is located behind a NAT.',
isDisabled: needsUtils.stateValueFalse('WebrtcSettings.Enable'),
},
{
type: Constants.SettingsTypes.TYPE_TEXT,
key: 'WebrtcSettings.TurnURI',
label: t('admin.webrtc.turnUriTitle'),
label_default: 'TURN URI:',
placeholder: t('admin.webrtc.turnUriExample'),
placeholder_default: 'E.g.: "turn:webrtc.mattermost.com:5349"',
help_text: t('admin.webrtc.turnUriDescription'),
help_text_default: 'Enter your TURN URI as turn:<your-turn-url>:<port>. TURN is a standardized network protocol to allow an end host to assist devices to establish a connection by using a relay public IP address if it is located behind a symmetric NAT.',
isDisabled: needsUtils.stateValueFalse('WebrtcSettings.Enable'),
},
{
type: Constants.SettingsTypes.TYPE_TEXT,
key: 'WebrtcSettings.TurnUsername',
label: t('admin.webrtc.turnUsernameTitle'),
label_default: 'TURN Username:',
placeholder: t('admin.webrtc.turnUsernameExample'),
placeholder_default: 'E.g.: "myusername"',
help_text: t('admin.webrtc.turnUsernameDescription'),
help_text_default: 'Enter your TURN Server Username.',
isDisabled: needsUtils.or(
needsUtils.stateValueFalse('WebrtcSettings.Enable'),
needsUtils.stateValueFalse('WebrtcSettings.TurnURI'),
),
},
{
type: Constants.SettingsTypes.TYPE_TEXT,
key: 'WebrtcSettings.TurnSharedKey',
label: t('admin.webrtc.turnSharedKeyTitle'),
label_default: 'TURN Shared Key:',
placeholder: t('admin.webrtc.turnSharedKeyExample'),
placeholder_default: 'E.g.: "bXdkOWQxc3d0Ynk3emY5ZmsxZ3NtazRjaWg="',
help_text: t('admin.webrtc.turnSharedKeyDescription'),
help_text_default: 'Enter your TURN Server Shared Key. This is used to created dynamic passwords to establish the connection. Each password is valid for a short period of time.',
isDisabled: needsUtils.or(
needsUtils.stateValueFalse('WebrtcSettings.Enable'),
needsUtils.stateValueFalse('WebrtcSettings.TurnURI'),
),
},
],
},
},
external: {
schema: {
id: 'ExternalServiceSettings',
Expand Down Expand Up @@ -2945,7 +2842,7 @@ export default {
placeholder: t('admin.service.internalConnectionsEx'),
placeholder_default: 'webhooks.internal.example.com 127.0.0.1 10.0.16.0/28',
help_text: t('admin.service.internalConnectionsDesc'),
help_text_default: 'In testing environments, such as when developing integrations locally on a development machine, use this setting to specify domains, IP addresses, or CIDR notations to allow internal connections. Separate two or more domains with spaces. **Not recommended for use in production**, since this can allow a user to extract confidential data from your server or internal network.\n \nBy default, user-supplied URLs such as those used for Open Graph metadata, webhooks, or slash commands will not be allowed to connect to reserved IP addresses including loopback or link-local addresses used for internal networks. Push notification, OAuth 2.0 and WebRTC server URLs are trusted and not affected by this setting.',
help_text_default: 'In testing environments, such as when developing integrations locally on a development machine, use this setting to specify domains, IP addresses, or CIDR notations to allow internal connections. Separate two or more domains with spaces. **Not recommended for use in production**, since this can allow a user to extract confidential data from your server or internal network.\n \nBy default, user-supplied URLs such as those used for Open Graph metadata, webhooks, or slash commands will not be allowed to connect to reserved IP addresses including loopback or link-local addresses used for internal networks. Push notification and OAuth 2.0 server URLs are trusted and not affected by this setting.',
help_text_markdown: true,
},
],
Expand Down
13 changes: 0 additions & 13 deletions components/admin_console/admin_sidebar/admin_sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,18 +265,6 @@ export default class AdminSidebar extends React.Component {
);
}

const webrtcSettings = (
<AdminSidebarSection
name='webrtc'
title={
<FormattedMessage
id='admin.sidebar.webrtc'
defaultMessage='WebRTC (Beta)'
/>
}
/>
);

let elasticSearchSettings = null;
if (this.props.license.IsLicensed === 'true' && this.props.license.Elasticsearch === 'true') {
elasticSearchSettings = (
Expand Down Expand Up @@ -639,7 +627,6 @@ export default class AdminSidebar extends React.Component {
/>
}
/>
{webrtcSettings}
<AdminSidebarSection
name='external'
title={
Expand Down
Loading

0 comments on commit a70d06c

Please sign in to comment.