@agilemotion/oui-react-js 1.6.4 → 1.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ApplicationManager.js +675 -1044
- package/dist/BasicApp.js +7 -27
- package/dist/BasicAppHome.js +27 -101
- package/dist/DynamicJS.js +109 -197
- package/dist/InteractionPortalApp.js +7 -27
- package/dist/InteractionPortalAppHome.js +21 -87
- package/dist/InteractionPortalApp_old.js +60 -122
- package/dist/RestUtils.js +269 -410
- package/dist/TypedValue.js +20 -26
- package/dist/Utils.js +295 -481
- package/dist/WithRouter.js +9 -17
- package/dist/assets/jss/components/authNavbarStyle.js +168 -171
- package/dist/assets/jss/components/buttonStyle.js +2 -5
- package/dist/assets/jss/components/cardAvatarStyle.js +2 -5
- package/dist/assets/jss/components/cardBodyStyle.js +2 -5
- package/dist/assets/jss/components/cardFooterStyle.js +2 -5
- package/dist/assets/jss/components/cardHeaderStyle.js +20 -17
- package/dist/assets/jss/components/cardIconStyle.js +2 -5
- package/dist/assets/jss/components/cardStyle.js +2 -5
- package/dist/assets/jss/components/cardTextStyle.js +2 -5
- package/dist/assets/jss/components/customDropdownStyle.js +171 -173
- package/dist/assets/jss/components/customInputStyle.js +5 -13
- package/dist/assets/jss/components/dropdownStyle.js +71 -74
- package/dist/assets/jss/components/footerStyle.js +14 -23
- package/dist/assets/jss/components/headerLinksStyle.js +52 -53
- package/dist/assets/jss/components/headerStyle.js +68 -73
- package/dist/assets/jss/components/navbarLinksStyle.js +81 -74
- package/dist/assets/jss/components/navbarStyle.js +79 -84
- package/dist/assets/jss/components/sidebarStyle.js +438 -441
- package/dist/assets/jss/components/typographyStyle.js +5 -13
- package/dist/assets/jss/rootStyle.js +85 -151
- package/dist/assets/jss/views/layoutStyle.js +45 -51
- package/dist/assets/jss/views/loginBasicStyle.js +2 -5
- package/dist/assets/jss/views/loginBusinessPortalStyle.js +2 -5
- package/dist/assets/jss/views/loginStyle.js +80 -87
- package/dist/components/AlertBar.js +20 -75
- package/dist/components/AlertItem.js +13 -49
- package/dist/components/AlertTemplate.js +12 -18
- package/dist/components/Button.js +41 -112
- package/dist/components/Calendar.js +99 -208
- package/dist/components/ConfirmationDialog.js +13 -54
- package/dist/components/DataGrid.js +271 -695
- package/dist/components/DataGridColumn.js +24 -74
- package/dist/components/DataGridFilter.js +107 -245
- package/dist/components/DataGridHeading.js +34 -78
- package/dist/components/Dialog.js +37 -130
- package/dist/components/DocumentTemplateDesigner.js +16 -57
- package/dist/components/DocumentTemplateDesignerComponent.js +47 -141
- package/dist/components/DocumentTemplatePlaceholderDialog.js +34 -67
- package/dist/components/DocumentViewer.js +25 -65
- package/dist/components/DocumentViewerComponent.js +13 -44
- package/dist/components/ElementResizeHandler.js +148 -200
- package/dist/components/FileThumb.js +15 -56
- package/dist/components/Graph.js +98 -203
- package/dist/components/GraphNode.js +20 -61
- package/dist/components/HtmlPanel.js +38 -105
- package/dist/components/Icon.js +174 -253
- package/dist/components/LoadingIndicator.js +4 -11
- package/dist/components/LottieIcon.js +63 -60
- package/dist/components/PopupView.js +21 -60
- package/dist/components/Portlet.js +18 -60
- package/dist/components/RegularButton.js +34 -42
- package/dist/components/SignaturePanel.js +19 -67
- package/dist/components/SocketManager.js +133 -228
- package/dist/components/StepperTitleBar.js +48 -99
- package/dist/components/TabPage.js +30 -47
- package/dist/components/TabPanel.js +35 -122
- package/dist/components/TableCellContent.js +34 -98
- package/dist/components/TemplateDesigner.js +115 -230
- package/dist/components/TemplateItemEventHandler.js +298 -481
- package/dist/components/TemplateTable.js +117 -218
- package/dist/components/TitleBar.js +15 -53
- package/dist/components/Toolbar.js +44 -110
- package/dist/components/Tooltip.js +37 -56
- package/dist/components/Tree.js +50 -143
- package/dist/components/UseIsVisible.js +5 -25
- package/dist/components/card/Card.js +35 -39
- package/dist/components/card/CardAvatar.js +21 -32
- package/dist/components/card/CardBody.js +29 -36
- package/dist/components/card/CardFooter.js +26 -35
- package/dist/components/card/CardHeader.js +29 -36
- package/dist/components/card/CardIcon.js +15 -29
- package/dist/components/card/CardText.js +15 -29
- package/dist/components/customInput/CustomInput.js +38 -40
- package/dist/components/dashboard/FoldingSideTabDashboard.js +65 -184
- package/dist/components/dashboard/SideMenuModuleDashboard.js +67 -185
- package/dist/components/dashboard/TopMenuModuleDashboard.js +22 -63
- package/dist/components/dashboard/components/Header.js +15 -52
- package/dist/components/dashboard/components/LeftDrawer.js +9 -23
- package/dist/components/dashboard/components/UserIdentity.js +4 -12
- package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +115 -155
- package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.js +344 -419
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenu.js +15 -29
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.js +405 -485
- package/dist/components/dashboard/components/portal/Timeline.js +3 -8
- package/dist/components/dashboard/components/portal/Workspace.js +4 -13
- package/dist/components/footer/Footer.js +23 -45
- package/dist/components/footer/HomeFooter.js +38 -78
- package/dist/components/form/AddressSearch.js +26 -76
- package/dist/components/form/AutoComplete.js +54 -168
- package/dist/components/form/BaseField.js +59 -189
- package/dist/components/form/Checkbox.js +11 -24
- package/dist/components/form/DatePicker.js +28 -82
- package/dist/components/form/FieldSet.js +84 -300
- package/dist/components/form/Form.js +206 -501
- package/dist/components/form/GridField.js +83 -243
- package/dist/components/form/IconField.js +10 -21
- package/dist/components/form/ImageEditor.js +98 -208
- package/dist/components/form/LabelField.js +13 -28
- package/dist/components/form/LookupField.js +36 -102
- package/dist/components/form/MultiFileUploadField.js +67 -134
- package/dist/components/form/RadioGroup.js +20 -57
- package/dist/components/form/Section.js +33 -118
- package/dist/components/form/SelectItem.js +36 -83
- package/dist/components/form/SignatureTemplateDesignerField.js +12 -26
- package/dist/components/form/Switch.js +11 -24
- package/dist/components/form/TextField.js +19 -55
- package/dist/components/form/TimePicker.js +18 -43
- package/dist/components/form/TransferList.js +76 -200
- package/dist/components/form/UploadField.js +134 -256
- package/dist/components/grid/GridContainer.js +10 -23
- package/dist/components/grid/GridItem.js +10 -23
- package/dist/components/layout/CollapsiblePanel.js +20 -59
- package/dist/components/layout/Layout.js +40 -149
- package/dist/components/layout/View.js +65 -195
- package/dist/components/layout/ViewContainer.js +13 -33
- package/dist/components/layout/ViewPort.js +14 -48
- package/dist/components/layout/Window.js +62 -135
- package/dist/components/layout/WindowViewPort.js +18 -63
- package/dist/components/media/ClosablePanel.js +9 -18
- package/dist/components/media/LobbyWaitingList.js +11 -17
- package/dist/components/media/MediaSoupHelper.js +173 -401
- package/dist/components/media/SideBarContent.js +17 -34
- package/dist/components/media/SocketRequest.js +7 -18
- package/dist/components/media/SocketResponse.js +5 -14
- package/dist/components/media/Timer.js +18 -54
- package/dist/components/media/Toolbar.js +97 -254
- package/dist/components/media/ToolbarButton.js +34 -95
- package/dist/components/media/Toolbar_bck.js +70 -186
- package/dist/components/media/Tracks.js +19 -33
- package/dist/components/media/TrainingRoom.js +121 -374
- package/dist/components/media/Transports.js +17 -29
- package/dist/components/media/VCEventManager.js +45 -116
- package/dist/components/media/VCEventType.js +82 -168
- package/dist/components/media/VCParticipantList.js +16 -51
- package/dist/components/media/VCParticipantListItem.js +44 -141
- package/dist/components/media/VCRoom.js +14 -58
- package/dist/components/media/VCRoomParticipant.js +235 -556
- package/dist/components/media/VCRoomRecorder.js +106 -204
- package/dist/components/media/VCRoomWorkspace.js +248 -584
- package/dist/components/media/Video.js +27 -112
- package/dist/components/media/VideoPlayer.js +23 -91
- package/dist/components/media/chat/ChatRoom.js +143 -361
- package/dist/components/media/chat/ChatRoomItem.js +17 -58
- package/dist/components/media/chat/ChatRoomList.js +15 -60
- package/dist/components/menu/CollapsibleMenu.js +22 -52
- package/dist/components/menu/MenuBars.js +50 -116
- package/dist/components/menu/MenuButton.js +53 -130
- package/dist/components/menu/MenuItem.js +11 -51
- package/dist/components/menu/MenuLink.js +13 -41
- package/dist/components/menu/PopupMenu.js +13 -25
- package/dist/components/navbars/AuthNavbar.js +21 -56
- package/dist/components/navbars/HomeNavbar.js +213 -290
- package/dist/components/navbars/PortalNavbar.js +26 -81
- package/dist/components/signatures/AgilitySignaturePanel.js +41 -135
- package/dist/components/signatures/AlertItem.js +14 -50
- package/dist/components/signatures/Card.js +6 -16
- package/dist/components/signatures/DocumentContainer.js +57 -165
- package/dist/components/signatures/ImageSignatureInput.js +64 -124
- package/dist/components/signatures/MenuButton.js +28 -63
- package/dist/components/signatures/Prompt.js +6 -41
- package/dist/components/signatures/ResponsiveTable.js +181 -370
- package/dist/components/signatures/SearchView.js +34 -112
- package/dist/components/signatures/SignatorySearch.js +11 -44
- package/dist/components/signatures/SignatorySearchForm.js +19 -50
- package/dist/components/signatures/SignatureInput.js +28 -91
- package/dist/components/signatures/SignatureInputProps.js +49 -144
- package/dist/components/signatures/SignatureTemplateDesigner.js +230 -430
- package/dist/components/signatures/Toolbar.js +99 -173
- package/dist/components/signatures/ViewUtils.js +207 -313
- package/dist/components/typography/Danger.js +6 -11
- package/dist/components/typography/Info.js +7 -11
- package/dist/components/typography/Link.js +6 -12
- package/dist/event/ActionHandlers.js +48 -87
- package/dist/event/Event.js +21 -25
- package/dist/event/EventListener.js +54 -48
- package/dist/event/EventType.js +18 -40
- package/dist/event/LoadDataActionHandler.js +10 -31
- package/dist/event/Observable.js +204 -396
- package/dist/event/RouteActionHandler.js +119 -171
- package/dist/event/ScriptActionHandler.js +10 -32
- package/dist/event/ServiceCallActionHandler.js +37 -64
- package/dist/event/SignalGraphActionHandler.js +9 -31
- package/dist/js/Addresses.js +23 -42
- package/dist/js/Calendar.js +41 -89
- package/dist/js/DynamicLib.js +11 -23
- package/dist/js/Media.js +80 -174
- package/dist/js/Validators.js +6 -12
- package/dist/js/Windows.js +22 -40
- package/dist/redux/store/ConfigureStore.js +12 -29
- package/dist/redux/store/DashboardStore.js +47 -120
- package/dist/redux/store/History.js +2 -5
- package/dist/redux/store/SecurityStore.js +22 -65
- package/dist/security/TokenManager.js +29 -53
- package/dist/theme-default.js +3 -8
- package/dist/view/Dashboard.js +140 -308
- package/dist/view/PortalDashboard.js +6 -13
- package/dist/view/Settings.js +3 -11
- package/dist/view/Views.js +15 -35
- package/dist/view/security/ChangePasswordBasic.js +41 -147
- package/dist/view/security/ForgotPassword.js +26 -106
- package/dist/view/security/ForgotPasswordBasic.js +22 -96
- package/dist/view/security/Login.js +29 -117
- package/dist/view/security/LoginBasic.js +28 -108
- package/dist/view/security/LoginInteractionPortal.js +28 -106
- package/dist/view/security/ResetPassword.js +25 -110
- package/dist/view/security/ResetPasswordBasic.js +39 -142
- package/dist/view/security/Security.js +14 -26
- package/package.json +25 -20
|
@@ -1,75 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = exports.VIDEO_ENCODINGS = exports.VIDEO_CONSTRAINTS = exports.VIDEO_CODEC_OPTIONS = void 0;
|
|
9
|
-
|
|
10
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
8
|
require("./VCRoomParticipant.css");
|
|
13
|
-
|
|
14
9
|
var _Utils = _interopRequireDefault(require("../../Utils"));
|
|
15
|
-
|
|
16
10
|
var _VCEventType = require("./VCEventType");
|
|
17
|
-
|
|
18
11
|
var _VCEventManager = _interopRequireDefault(require("./VCEventManager"));
|
|
19
|
-
|
|
20
12
|
var _VCRoomRecorder = _interopRequireDefault(require("./VCRoomRecorder"));
|
|
21
|
-
|
|
22
13
|
var _MediaSoupHelper = _interopRequireDefault(require("./MediaSoupHelper"));
|
|
23
|
-
|
|
24
14
|
var _Tracks = _interopRequireDefault(require("./Tracks"));
|
|
25
|
-
|
|
26
15
|
var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
|
|
27
|
-
|
|
28
16
|
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
29
|
-
|
|
30
17
|
var _icons = require("@material-ui/icons");
|
|
31
|
-
|
|
32
18
|
var _Tooltip = _interopRequireDefault(require("@material-ui/core/Tooltip"));
|
|
33
|
-
|
|
34
19
|
var _core = require("@material-ui/core");
|
|
35
|
-
|
|
36
20
|
var _SocketManager = _interopRequireDefault(require("../SocketManager"));
|
|
37
|
-
|
|
38
21
|
var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
|
|
39
|
-
|
|
40
22
|
var _ApplicationManager = _interopRequireDefault(require("../../ApplicationManager"));
|
|
23
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
24
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
25
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
26
|
+
/* eslint-disable react-hooks/exhaustive-deps */
|
|
41
27
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
45
|
-
|
|
46
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
47
|
-
|
|
48
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
49
|
-
|
|
50
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
51
|
-
|
|
52
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
53
|
-
|
|
54
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
55
|
-
|
|
56
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
57
|
-
|
|
58
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
59
|
-
|
|
60
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
61
|
-
|
|
62
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
63
|
-
|
|
64
|
-
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
65
|
-
|
|
66
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
67
|
-
|
|
68
|
-
var VIDEO_CODEC_OPTIONS = {
|
|
28
|
+
const VIDEO_CODEC_OPTIONS = exports.VIDEO_CODEC_OPTIONS = {
|
|
69
29
|
videoGoogleStartBitrate: 1000
|
|
70
30
|
};
|
|
71
|
-
exports.
|
|
72
|
-
var VIDEO_CONSTRAINTS = {
|
|
31
|
+
const VIDEO_CONSTRAINTS = exports.VIDEO_CONSTRAINTS = {
|
|
73
32
|
audio: false,
|
|
74
33
|
video: {
|
|
75
34
|
width: {
|
|
@@ -82,8 +41,7 @@ var VIDEO_CONSTRAINTS = {
|
|
|
82
41
|
}
|
|
83
42
|
}
|
|
84
43
|
};
|
|
85
|
-
exports.
|
|
86
|
-
var VIDEO_ENCODINGS = [{
|
|
44
|
+
const VIDEO_ENCODINGS = exports.VIDEO_ENCODINGS = [{
|
|
87
45
|
rid: 'r0',
|
|
88
46
|
maxBitrate: 20000,
|
|
89
47
|
//scaleResolutionDownBy: 10.0,
|
|
@@ -97,180 +55,113 @@ var VIDEO_ENCODINGS = [{
|
|
|
97
55
|
maxBitrate: 450000,
|
|
98
56
|
scalabilityMode: 'S1T3'
|
|
99
57
|
}];
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
var _React$useState13 = _react.default.useState([]),
|
|
134
|
-
_React$useState14 = _slicedToArray(_React$useState13, 1),
|
|
135
|
-
failedProducersDueToNullTransport = _React$useState14[0];
|
|
136
|
-
|
|
137
|
-
var _React$useState15 = _react.default.useState([]),
|
|
138
|
-
_React$useState16 = _slicedToArray(_React$useState15, 2),
|
|
139
|
-
audioDevices = _React$useState16[0],
|
|
140
|
-
setAudioDevices = _React$useState16[1];
|
|
141
|
-
|
|
142
|
-
var _React$useState17 = _react.default.useState(null),
|
|
143
|
-
_React$useState18 = _slicedToArray(_React$useState17, 2),
|
|
144
|
-
selectedAudioDevice = _React$useState18[0],
|
|
145
|
-
setSelectedAudioDevice = _React$useState18[1];
|
|
146
|
-
|
|
147
|
-
var _React$useState19 = _react.default.useState(new Map()),
|
|
148
|
-
_React$useState20 = _slicedToArray(_React$useState19, 1),
|
|
149
|
-
consumers = _React$useState20[0];
|
|
150
|
-
|
|
151
|
-
var _React$useState21 = _react.default.useState(0),
|
|
152
|
-
_React$useState22 = _slicedToArray(_React$useState21, 2),
|
|
153
|
-
soundLevel = _React$useState22[0],
|
|
154
|
-
setSoundLevel = _React$useState22[1];
|
|
155
|
-
|
|
156
|
-
var _useState = (0, _react.useState)({}),
|
|
157
|
-
_useState2 = _slicedToArray(_useState, 1),
|
|
158
|
-
eventHandler = _useState2[0];
|
|
159
|
-
|
|
160
|
-
var videoRef = (0, _react.useRef)();
|
|
161
|
-
var videoStream = (0, _react.useRef)();
|
|
162
|
-
var audioRef = (0, _react.useRef)();
|
|
163
|
-
var tracks = (0, _react.useRef)(new _Tracks.default());
|
|
164
|
-
var soundLevelCounter = (0, _react.useRef)(0);
|
|
165
|
-
var showVideo = true;
|
|
166
|
-
var consumerTransport = props.consumerTransport,
|
|
167
|
-
device = props.device,
|
|
168
|
-
participants = props.participants;
|
|
169
|
-
var numberOfInViewParticipants = props.numberOfInViewParticipants;
|
|
170
|
-
|
|
171
|
-
var _useState3 = (0, _react.useState)(null),
|
|
172
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
173
|
-
anchorEl = _useState4[0],
|
|
174
|
-
setAnchorEl = _useState4[1];
|
|
175
|
-
|
|
176
|
-
var openMoreActions = Boolean(anchorEl);
|
|
177
|
-
|
|
178
|
-
var _useState5 = (0, _react.useState)(null),
|
|
179
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
180
|
-
downloadUrl = _useState6[0],
|
|
181
|
-
setDownloadUrl = _useState6[1];
|
|
182
|
-
|
|
183
|
-
var handler = function handler() {
|
|
58
|
+
const location = window.location.protocol + '//' + window.location.hostname;
|
|
59
|
+
const VCRoomParticipant = props => {
|
|
60
|
+
const [handRaised, setHandRaised] = _react.default.useState(false);
|
|
61
|
+
const [videoMuted, setVideoMuted] = _react.default.useState(props.videoMuted);
|
|
62
|
+
const [audioMuted, setAudioMuted] = _react.default.useState(props.audioMuted);
|
|
63
|
+
const [producerTransport, setProducerTransport] = _react.default.useState(props.producerTransport);
|
|
64
|
+
const [videoRefresher, setVideoRefresher] = _react.default.useState(false);
|
|
65
|
+
const [producers] = _react.default.useState(new Map());
|
|
66
|
+
const [failedProducersDueToNullTransport] = _react.default.useState([]);
|
|
67
|
+
const [audioDevices, setAudioDevices] = _react.default.useState([]);
|
|
68
|
+
const [selectedAudioDevice, setSelectedAudioDevice] = _react.default.useState(null);
|
|
69
|
+
const [consumers] = _react.default.useState(new Map());
|
|
70
|
+
const [soundLevel, setSoundLevel] = _react.default.useState(0);
|
|
71
|
+
const [eventHandler] = (0, _react.useState)({});
|
|
72
|
+
const videoRef = (0, _react.useRef)();
|
|
73
|
+
const videoStream = (0, _react.useRef)();
|
|
74
|
+
const audioRef = (0, _react.useRef)();
|
|
75
|
+
const tracks = (0, _react.useRef)(new _Tracks.default());
|
|
76
|
+
const soundLevelCounter = (0, _react.useRef)(0);
|
|
77
|
+
const showVideo = true;
|
|
78
|
+
const {
|
|
79
|
+
consumerTransport,
|
|
80
|
+
device,
|
|
81
|
+
participants
|
|
82
|
+
} = props;
|
|
83
|
+
const {
|
|
84
|
+
numberOfInViewParticipants
|
|
85
|
+
} = props;
|
|
86
|
+
const [anchorEl, setAnchorEl] = (0, _react.useState)(null);
|
|
87
|
+
const openMoreActions = Boolean(anchorEl);
|
|
88
|
+
const [downloadUrl, setDownloadUrl] = (0, _react.useState)(null);
|
|
89
|
+
const handler = () => {
|
|
184
90
|
return {
|
|
185
91
|
get id() {
|
|
186
92
|
return 'meeting-participant-' + props.data.userId;
|
|
187
93
|
},
|
|
188
|
-
|
|
189
|
-
on: function on(eventType, be) {
|
|
94
|
+
on: (eventType, be) => {
|
|
190
95
|
switch (eventType) {
|
|
191
96
|
case _VCEventType.VCEventType.AUDIO_VISUAL_SETTINGS_CHANGED:
|
|
192
97
|
onAVSettingsChange(be.payload ? be.payload : be);
|
|
193
98
|
break;
|
|
194
|
-
|
|
195
99
|
case _VCEventType.VCEventType.RAISE_HAND:
|
|
196
100
|
onRaiseHand(be.payload);
|
|
197
101
|
break;
|
|
198
|
-
|
|
199
102
|
case _VCEventType.VCEventType.LOWER_HAND:
|
|
200
103
|
onLowerHand(be.payload);
|
|
201
104
|
break;
|
|
202
|
-
|
|
203
105
|
case _VCEventType.VCEventType.NEW_PRODUCERS:
|
|
204
106
|
onNewProducers(be.payload);
|
|
205
107
|
break;
|
|
206
|
-
|
|
207
108
|
case _VCEventType.VCEventType.CONSUMER_CLOSED:
|
|
208
109
|
if (consumers.has(be.payload.consumerId)) {
|
|
209
110
|
removeConsumer(be.payload.consumerId, be.payload.kind);
|
|
210
111
|
}
|
|
211
|
-
|
|
212
112
|
break;
|
|
213
113
|
}
|
|
214
114
|
}
|
|
215
115
|
};
|
|
216
116
|
};
|
|
217
|
-
|
|
218
|
-
var handleClickDevicesIcon = function handleClickDevicesIcon(event) {
|
|
117
|
+
const handleClickDevicesIcon = event => {
|
|
219
118
|
setAnchorEl(event.currentTarget);
|
|
220
119
|
};
|
|
221
|
-
|
|
222
|
-
var changeAudioDevice = function changeAudioDevice(device) {
|
|
120
|
+
const changeAudioDevice = device => {
|
|
223
121
|
setSelectedAudioDevice(device);
|
|
224
122
|
};
|
|
225
|
-
|
|
226
|
-
var onRaiseHand = function onRaiseHand(payload) {
|
|
123
|
+
const onRaiseHand = payload => {
|
|
227
124
|
if (payload && payload.userId === props.data.userId) {
|
|
228
125
|
setHandRaised(true);
|
|
229
126
|
props.data.handRaised = true;
|
|
230
127
|
}
|
|
231
128
|
};
|
|
232
|
-
|
|
233
|
-
var onLowerHand = function onLowerHand(payload) {
|
|
129
|
+
const onLowerHand = payload => {
|
|
234
130
|
if (payload && payload.userId === props.data.userId) {
|
|
235
131
|
setHandRaised(false);
|
|
236
132
|
props.data.handRaised = false;
|
|
237
133
|
}
|
|
238
134
|
};
|
|
239
|
-
|
|
240
|
-
(0, _react.useEffect)(function () {
|
|
135
|
+
(0, _react.useEffect)(() => {
|
|
241
136
|
eventHandler.api = handler();
|
|
242
137
|
});
|
|
243
|
-
(0, _react.useEffect)(
|
|
138
|
+
(0, _react.useEffect)(() => {
|
|
244
139
|
if (videoRef.current && videoStream.current) {
|
|
245
140
|
videoRef.current.srcObject = videoStream.current;
|
|
246
141
|
}
|
|
247
142
|
}, [videoRef.current]);
|
|
248
|
-
(0, _react.useEffect)(
|
|
143
|
+
(0, _react.useEffect)(() => {
|
|
249
144
|
if (props.soundMonitor && !props.inView) {
|
|
250
145
|
if (soundLevel > 3) {
|
|
251
146
|
soundLevelCounter.current = 10;
|
|
252
147
|
} else if (soundLevelCounter.current > 0) {
|
|
253
148
|
soundLevelCounter.current--;
|
|
254
149
|
}
|
|
255
|
-
|
|
256
150
|
props.soundMonitor(props.data.userId, soundLevelCounter.current === 0 || audioMuted);
|
|
257
151
|
}
|
|
258
152
|
}, [soundLevel]);
|
|
259
|
-
(0, _react.useEffect)(
|
|
153
|
+
(0, _react.useEffect)(() => {
|
|
260
154
|
if (audioMuted) {
|
|
261
155
|
setSoundLevel(0);
|
|
262
|
-
|
|
263
156
|
if (props.soundMonitor && !props.inView) {
|
|
264
157
|
props.soundMonitor(props.data.userId, true);
|
|
265
158
|
}
|
|
266
159
|
}
|
|
267
160
|
}, [audioMuted]);
|
|
268
|
-
|
|
269
|
-
var handleCloseDeviceMenu = function handleCloseDeviceMenu() {
|
|
161
|
+
const handleCloseDeviceMenu = () => {
|
|
270
162
|
setAnchorEl(null);
|
|
271
163
|
};
|
|
272
|
-
|
|
273
|
-
var onAVSettingsChange = function onAVSettingsChange(payload) {
|
|
164
|
+
const onAVSettingsChange = payload => {
|
|
274
165
|
if (props.data.userId === payload.userId) {
|
|
275
166
|
if (props.isCurrentUser) {
|
|
276
167
|
if (payload.audioMuted) {
|
|
@@ -280,7 +171,6 @@ var VCRoomParticipant = function VCRoomParticipant(props) {
|
|
|
280
171
|
produce('audio');
|
|
281
172
|
}
|
|
282
173
|
}
|
|
283
|
-
|
|
284
174
|
if (payload.videoMuted) {
|
|
285
175
|
stopProducing('video');
|
|
286
176
|
} else {
|
|
@@ -289,31 +179,28 @@ var VCRoomParticipant = function VCRoomParticipant(props) {
|
|
|
289
179
|
}
|
|
290
180
|
}
|
|
291
181
|
}
|
|
292
|
-
|
|
293
182
|
setAudioMuted(payload.audioMuted);
|
|
294
183
|
setVideoMuted(payload.videoMuted);
|
|
295
184
|
} else if (props.isCurrentUser) {}
|
|
296
185
|
};
|
|
297
|
-
|
|
298
|
-
(0, _react.useEffect)(function () {
|
|
186
|
+
(0, _react.useEffect)(() => {
|
|
299
187
|
if (props.data && !_Utils.default.isNull(props.data.avatarId) && props.data.avatarId !== 'undefined' && props.data.avatarId !== 'null') {
|
|
300
188
|
setDownloadUrl(location + _ApplicationManager.default.getContextRoot() + '/docs/api/v1/manager/download/' + props.data.avatarId + '?access_token=' + sessionStorage.getItem('accessToken') + '&idToken=' + sessionStorage.getItem('idToken'));
|
|
301
189
|
}
|
|
302
190
|
}, [props.data]);
|
|
303
|
-
(0, _react.useEffect)(
|
|
191
|
+
(0, _react.useEffect)(() => {
|
|
304
192
|
setAudioMuted(props.audioMuted);
|
|
305
193
|
}, [props.audioMuted]);
|
|
306
|
-
(0, _react.useEffect)(
|
|
194
|
+
(0, _react.useEffect)(() => {
|
|
307
195
|
setVideoMuted(props.videoMuted);
|
|
308
196
|
}, [props.videoMuted]);
|
|
309
|
-
(0, _react.useEffect)(
|
|
197
|
+
(0, _react.useEffect)(() => {
|
|
310
198
|
if (producerTransport) {
|
|
311
199
|
if (props.videoMuted) {
|
|
312
200
|
stopProducing('video');
|
|
313
201
|
} else {
|
|
314
202
|
produce('video');
|
|
315
203
|
}
|
|
316
|
-
|
|
317
204
|
if (props.audioMuted) {
|
|
318
205
|
stopProducing('audio');
|
|
319
206
|
} else {
|
|
@@ -321,13 +208,13 @@ var VCRoomParticipant = function VCRoomParticipant(props) {
|
|
|
321
208
|
}
|
|
322
209
|
}
|
|
323
210
|
}, [producerTransport]);
|
|
324
|
-
(0, _react.useEffect)(
|
|
211
|
+
(0, _react.useEffect)(() => {
|
|
325
212
|
setProducerTransport(props.producerTransport);
|
|
326
213
|
}, [props.producerTransport]);
|
|
327
|
-
(0, _react.useEffect)(
|
|
214
|
+
(0, _react.useEffect)(() => {
|
|
328
215
|
if (props.isCurrentUser) {
|
|
329
216
|
props.onAudioDeviceChange(selectedAudioDevice);
|
|
330
|
-
stopProducing('audio',
|
|
217
|
+
stopProducing('audio', () => {
|
|
331
218
|
if (selectedAudioDevice) {
|
|
332
219
|
if (!producerTransport) {
|
|
333
220
|
createProducerTransport();
|
|
@@ -338,82 +225,33 @@ var VCRoomParticipant = function VCRoomParticipant(props) {
|
|
|
338
225
|
});
|
|
339
226
|
}
|
|
340
227
|
}, [selectedAudioDevice]);
|
|
341
|
-
(0, _react.useEffect)(
|
|
228
|
+
(0, _react.useEffect)(() => {
|
|
342
229
|
if (consumerTransport) {
|
|
343
230
|
console.log('TRANSI ARRIVED WITH PRODUCERS : ', props.data.producers);
|
|
344
|
-
|
|
345
231
|
if (props.data.producers) {
|
|
346
232
|
onNewProducers(props.data.producers, true);
|
|
347
233
|
}
|
|
348
|
-
|
|
349
234
|
onNewProducers(failedProducersDueToNullTransport, true);
|
|
350
235
|
failedProducersDueToNullTransport.splice(0, failedProducersDueToNullTransport.length);
|
|
351
|
-
|
|
352
236
|
if (producers) {
|
|
353
237
|
console.log('RE-INSTATING CONSUMERS');
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
var _step$value = _slicedToArray(_step.value, 2),
|
|
361
|
-
key = _step$value[0],
|
|
362
|
-
value = _step$value[1];
|
|
363
|
-
|
|
364
|
-
console.log('PROCESSING PRODUCER OF TYPE : ' + key + ' : ' + value.id);
|
|
365
|
-
|
|
366
|
-
if (!(props.data.producers && _this.props.data.producers.find(function (p) {
|
|
367
|
-
return p.producerId === value.id;
|
|
368
|
-
}))) {
|
|
369
|
-
consume(value.id, key, true, value.userId);
|
|
370
|
-
} else {
|
|
371
|
-
console.log('PRODUCER ALREADY PROCESSED');
|
|
372
|
-
}
|
|
373
|
-
};
|
|
374
|
-
|
|
375
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
376
|
-
_loop();
|
|
238
|
+
for (let [key, value] of producers) {
|
|
239
|
+
console.log('PROCESSING PRODUCER OF TYPE : ' + key + ' : ' + value.id);
|
|
240
|
+
if (!(props.data.producers && (void 0).props.data.producers.find(p => p.producerId === value.id))) {
|
|
241
|
+
consume(value.id, key, true, value.userId);
|
|
242
|
+
} else {
|
|
243
|
+
console.log('PRODUCER ALREADY PROCESSED');
|
|
377
244
|
}
|
|
378
|
-
} catch (err) {
|
|
379
|
-
_iterator.e(err);
|
|
380
|
-
} finally {
|
|
381
|
-
_iterator.f();
|
|
382
245
|
}
|
|
383
246
|
}
|
|
384
247
|
}
|
|
385
248
|
}, [consumerTransport]);
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
case 0:
|
|
393
|
-
_context.t0 = setProducerTransport;
|
|
394
|
-
_context.next = 3;
|
|
395
|
-
return _MediaSoupHelper.default.initProducerTransport(props.device, props.meetingId, sessionStorage.getItem('username'));
|
|
396
|
-
|
|
397
|
-
case 3:
|
|
398
|
-
_context.t1 = _context.sent;
|
|
399
|
-
(0, _context.t0)(_context.t1);
|
|
400
|
-
|
|
401
|
-
case 5:
|
|
402
|
-
case "end":
|
|
403
|
-
return _context.stop();
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
}, _callee);
|
|
407
|
-
}));
|
|
408
|
-
|
|
409
|
-
return function createProducerTransport() {
|
|
410
|
-
return _ref.apply(this, arguments);
|
|
411
|
-
};
|
|
412
|
-
}();
|
|
413
|
-
|
|
414
|
-
var handleDevicesChanged = function handleDevicesChanged(devices) {
|
|
415
|
-
var audioDeviceList = [];
|
|
416
|
-
devices.forEach(function (device) {
|
|
249
|
+
const createProducerTransport = async () => {
|
|
250
|
+
setProducerTransport(await _MediaSoupHelper.default.initProducerTransport(props.device, props.meetingId, sessionStorage.getItem('username')));
|
|
251
|
+
};
|
|
252
|
+
const handleDevicesChanged = devices => {
|
|
253
|
+
let audioDeviceList = [];
|
|
254
|
+
devices.forEach(device => {
|
|
417
255
|
if ('audioinput' === device.kind) {
|
|
418
256
|
audioDeviceList.push({
|
|
419
257
|
id: device.deviceId,
|
|
@@ -422,206 +260,117 @@ var VCRoomParticipant = function VCRoomParticipant(props) {
|
|
|
422
260
|
}
|
|
423
261
|
});
|
|
424
262
|
setAudioDevices(audioDeviceList);
|
|
425
|
-
|
|
426
263
|
if (audioDeviceList.length > 0) {
|
|
427
264
|
setSelectedAudioDevice(audioDeviceList[0]);
|
|
428
265
|
} else {
|
|
429
266
|
setSelectedAudioDevice(null);
|
|
430
267
|
}
|
|
431
268
|
};
|
|
432
|
-
|
|
433
|
-
(0, _react.useEffect)(function () {
|
|
269
|
+
(0, _react.useEffect)(() => {
|
|
434
270
|
_VCEventManager.default.removeSubscriptions(eventHandler);
|
|
435
|
-
|
|
436
271
|
_VCEventManager.default.addSubscriptions(eventHandler, _VCEventType.VCEventType.AUDIO_VISUAL_SETTINGS_CHANGED, _VCEventType.VCEventType.RAISE_HAND, _VCEventType.VCEventType.LOWER_HAND, _VCEventType.VCEventType.NEW_PRODUCERS, _VCEventType.VCEventType.CONSUMER_CLOSED);
|
|
437
|
-
|
|
438
272
|
if (props.isCurrentUser) {
|
|
439
|
-
navigator.mediaDevices.ondevicechange =
|
|
440
|
-
navigator.mediaDevices.enumerateDevices().then(
|
|
273
|
+
navigator.mediaDevices.ondevicechange = () => {
|
|
274
|
+
navigator.mediaDevices.enumerateDevices().then(devices => {
|
|
441
275
|
handleDevicesChanged(devices);
|
|
442
276
|
});
|
|
443
277
|
};
|
|
444
|
-
|
|
445
|
-
navigator.mediaDevices.enumerateDevices().then(function (devices) {
|
|
278
|
+
navigator.mediaDevices.enumerateDevices().then(devices => {
|
|
446
279
|
handleDevicesChanged(devices);
|
|
447
280
|
});
|
|
448
281
|
}
|
|
449
|
-
|
|
450
282
|
if (props.isCurrentUser) {
|
|
451
283
|
consumeFailedProducers();
|
|
452
284
|
}
|
|
453
|
-
|
|
454
|
-
return function () {
|
|
285
|
+
return () => {
|
|
455
286
|
console.log('======================DESTROYING PARTICIPANT========================= : ' + props.data.userId);
|
|
456
|
-
|
|
457
287
|
if (props.isCurrentUser) {
|
|
458
288
|
stopProducing('audio');
|
|
459
289
|
stopProducing('video');
|
|
460
290
|
}
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
_step2;
|
|
464
|
-
|
|
465
|
-
try {
|
|
466
|
-
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
467
|
-
var _step2$value = _slicedToArray(_step2.value, 2),
|
|
468
|
-
key = _step2$value[0],
|
|
469
|
-
value = _step2$value[1];
|
|
470
|
-
|
|
471
|
-
removeConsumer(key, 'video');
|
|
472
|
-
}
|
|
473
|
-
} catch (err) {
|
|
474
|
-
_iterator2.e(err);
|
|
475
|
-
} finally {
|
|
476
|
-
_iterator2.f();
|
|
291
|
+
for (let [key, value] of consumers) {
|
|
292
|
+
removeConsumer(key, 'video');
|
|
477
293
|
}
|
|
478
|
-
|
|
479
294
|
_VCEventManager.default.removeSubscriptions(eventHandler);
|
|
480
295
|
};
|
|
481
296
|
}, []);
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
_context2.next = 12;
|
|
519
|
-
break;
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
console.log('Producer already exists for this type ' + type);
|
|
523
|
-
return _context2.abrupt("return");
|
|
524
|
-
|
|
525
|
-
case 12:
|
|
526
|
-
_context2.t0 = type;
|
|
527
|
-
_context2.next = _context2.t0 === 'audio' ? 15 : _context2.t0 === 'video' ? 17 : 19;
|
|
528
|
-
break;
|
|
529
|
-
|
|
530
|
-
case 15:
|
|
531
|
-
mediaConstraints = {
|
|
532
|
-
deviceId: selectedAudioDevice.id,
|
|
533
|
-
audio: true,
|
|
534
|
-
video: false
|
|
535
|
-
};
|
|
536
|
-
return _context2.abrupt("break", 20);
|
|
537
|
-
|
|
538
|
-
case 17:
|
|
539
|
-
mediaConstraints = VIDEO_CONSTRAINTS;
|
|
540
|
-
return _context2.abrupt("break", 20);
|
|
541
|
-
|
|
542
|
-
case 19:
|
|
543
|
-
return _context2.abrupt("return");
|
|
544
|
-
|
|
545
|
-
case 20:
|
|
546
|
-
_context2.next = 22;
|
|
547
|
-
return navigator.mediaDevices.getUserMedia(mediaConstraints);
|
|
548
|
-
|
|
549
|
-
case 22:
|
|
550
|
-
stream = _context2.sent;
|
|
551
|
-
track = type === 'audio' ? stream.getAudioTracks()[0] : stream.getVideoTracks()[0];
|
|
552
|
-
params = {
|
|
553
|
-
track: track
|
|
554
|
-
};
|
|
555
|
-
audioRef.current = stream;
|
|
556
|
-
|
|
557
|
-
if (props.isHost && type === 'audio') {
|
|
558
|
-
_VCRoomRecorder.default.addTrack(props.data.userId, track);
|
|
559
|
-
|
|
560
|
-
tracks.current.setAudioTrack(track);
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
if (type === 'video') {
|
|
564
|
-
params.encodings = VIDEO_ENCODINGS;
|
|
565
|
-
params.codecOptions = VIDEO_CODEC_OPTIONS;
|
|
566
|
-
tracks.current.setVideoTrack(track);
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
_context2.prev = 28;
|
|
570
|
-
_context2.next = 31;
|
|
571
|
-
return producerTransport.produce(params);
|
|
572
|
-
|
|
573
|
-
case 31:
|
|
574
|
-
producer = _context2.sent;
|
|
575
|
-
_context2.next = 37;
|
|
576
|
-
break;
|
|
577
|
-
|
|
578
|
-
case 34:
|
|
579
|
-
_context2.prev = 34;
|
|
580
|
-
_context2.t1 = _context2["catch"](28);
|
|
581
|
-
console.log(_context2.t1);
|
|
582
|
-
|
|
583
|
-
case 37:
|
|
584
|
-
if (producer) {
|
|
585
|
-
producerTransport.getStats().then(function (data) {
|
|
586
|
-
return console.log(data);
|
|
587
|
-
});
|
|
588
|
-
producers.set(type, producer);
|
|
589
|
-
|
|
590
|
-
if (type === 'video') {
|
|
591
|
-
videoRef.current.srcObject = stream;
|
|
592
|
-
videoStream.current = stream;
|
|
593
|
-
setVideoRefresher(!videoRefresher);
|
|
594
|
-
console.log(stream);
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
producer.on('transportclose', function () {
|
|
598
|
-
stream.srcObject.getTracks().forEach(function (track) {
|
|
599
|
-
track.stop();
|
|
600
|
-
});
|
|
601
|
-
producers.delete(type);
|
|
602
|
-
});
|
|
603
|
-
producer.on('close', function () {
|
|
604
|
-
stream.srcObject.getTracks().forEach(function (track) {
|
|
605
|
-
track.stop();
|
|
606
|
-
});
|
|
607
|
-
producers.delete(type);
|
|
608
|
-
});
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
case 38:
|
|
612
|
-
case "end":
|
|
613
|
-
return _context2.stop();
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
}, _callee2, null, [[28, 34]]);
|
|
617
|
-
}));
|
|
618
|
-
|
|
619
|
-
return function produce(_x) {
|
|
620
|
-
return _ref2.apply(this, arguments);
|
|
297
|
+
const produce = async type => {
|
|
298
|
+
if (!device) {
|
|
299
|
+
console.error('No available device');
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
if (!device.canProduce('video') && type === 'video') {
|
|
303
|
+
console.error('Cannot produce video');
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
if (!selectedAudioDevice && type === 'audio') {
|
|
307
|
+
console.error('No audio device selected');
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
if (producers.has(type)) {
|
|
311
|
+
console.log('Producer already exists for this type ' + type);
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
let mediaConstraints;
|
|
315
|
+
switch (type) {
|
|
316
|
+
case 'audio':
|
|
317
|
+
mediaConstraints = {
|
|
318
|
+
deviceId: selectedAudioDevice.id,
|
|
319
|
+
audio: true,
|
|
320
|
+
video: false
|
|
321
|
+
};
|
|
322
|
+
break;
|
|
323
|
+
case 'video':
|
|
324
|
+
mediaConstraints = VIDEO_CONSTRAINTS;
|
|
325
|
+
break;
|
|
326
|
+
default:
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
let stream = await navigator.mediaDevices.getUserMedia(mediaConstraints);
|
|
330
|
+
const track = type === 'audio' ? stream.getAudioTracks()[0] : stream.getVideoTracks()[0];
|
|
331
|
+
const params = {
|
|
332
|
+
track
|
|
621
333
|
};
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
334
|
+
audioRef.current = stream;
|
|
335
|
+
if (props.isHost && type === 'audio') {
|
|
336
|
+
_VCRoomRecorder.default.addTrack(props.data.userId, track);
|
|
337
|
+
tracks.current.setAudioTrack(track);
|
|
338
|
+
}
|
|
339
|
+
if (type === 'video') {
|
|
340
|
+
params.encodings = VIDEO_ENCODINGS;
|
|
341
|
+
params.codecOptions = VIDEO_CODEC_OPTIONS;
|
|
342
|
+
tracks.current.setVideoTrack(track);
|
|
343
|
+
}
|
|
344
|
+
let producer;
|
|
345
|
+
try {
|
|
346
|
+
producer = await producerTransport.produce(params);
|
|
347
|
+
} catch (e) {
|
|
348
|
+
console.log(e);
|
|
349
|
+
}
|
|
350
|
+
if (producer) {
|
|
351
|
+
producerTransport.getStats().then(data => console.log(data));
|
|
352
|
+
producers.set(type, producer);
|
|
353
|
+
if (type === 'video') {
|
|
354
|
+
videoRef.current.srcObject = stream;
|
|
355
|
+
videoStream.current = stream;
|
|
356
|
+
setVideoRefresher(!videoRefresher);
|
|
357
|
+
console.log(stream);
|
|
358
|
+
}
|
|
359
|
+
producer.on('transportclose', () => {
|
|
360
|
+
stream.srcObject.getTracks().forEach(function (track) {
|
|
361
|
+
track.stop();
|
|
362
|
+
});
|
|
363
|
+
producers.delete(type);
|
|
364
|
+
});
|
|
365
|
+
producer.on('close', () => {
|
|
366
|
+
stream.srcObject.getTracks().forEach(function (track) {
|
|
367
|
+
track.stop();
|
|
368
|
+
});
|
|
369
|
+
producers.delete(type);
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
};
|
|
373
|
+
const consumeFailedProducers = () => {
|
|
625
374
|
setTimeout(function () {
|
|
626
375
|
if (consumerTransport) {
|
|
627
376
|
onNewProducers(failedProducersDueToNullTransport, true);
|
|
@@ -630,81 +379,56 @@ var VCRoomParticipant = function VCRoomParticipant(props) {
|
|
|
630
379
|
}
|
|
631
380
|
}, 5000);
|
|
632
381
|
};
|
|
633
|
-
|
|
634
|
-
var stopProducing = function stopProducing(type, callback) {
|
|
382
|
+
const stopProducing = (type, callback) => {
|
|
635
383
|
if (!producers.has(type)) {
|
|
636
384
|
console.log('There is no producer for this type ' + type);
|
|
637
385
|
return;
|
|
638
386
|
}
|
|
639
|
-
|
|
640
|
-
var producerId = producers.get(type).id;
|
|
387
|
+
let producerId = producers.get(type).id;
|
|
641
388
|
console.log('Close producer', producerId);
|
|
642
389
|
producers.get(type).close();
|
|
643
390
|
producers.delete(type);
|
|
644
|
-
|
|
645
391
|
if (type === 'video') {
|
|
646
392
|
tracks.current.stopVideoTrack();
|
|
647
393
|
}
|
|
648
|
-
|
|
649
394
|
if (type === 'audio') {
|
|
650
395
|
tracks.current.stopAudioTrack();
|
|
651
396
|
}
|
|
652
|
-
|
|
653
397
|
if (callback) {
|
|
654
398
|
callback();
|
|
655
399
|
}
|
|
656
|
-
|
|
657
400
|
console.log('CLOSING PRODUCER OF ID : ' + producerId);
|
|
658
|
-
|
|
659
401
|
_SocketManager.default.emitEvent(_VCEventType.VCEventType.PRODUCER_CLOSED, {
|
|
660
402
|
userId: props.data.userId,
|
|
661
|
-
producerId
|
|
403
|
+
producerId,
|
|
662
404
|
roomId: props.meetingId
|
|
663
|
-
}).then(
|
|
664
|
-
return console.log('PRODUCER_CLOSED ERROR : ', e);
|
|
665
|
-
});
|
|
405
|
+
}).then(data => {}).catch(e => console.log('PRODUCER_CLOSED ERROR : ', e));
|
|
666
406
|
};
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
var loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
407
|
+
const onNewProducers = function (producers) {
|
|
408
|
+
let loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
670
409
|
console.log("====== PRODUCERS RECEIVED : [ " + JSON.stringify(producers) + " ] =======");
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
var producer = _step3.value;
|
|
678
|
-
|
|
679
|
-
if (consumerTransport) {
|
|
680
|
-
if (producer.userId === props.data.userId) {
|
|
681
|
-
if (producer.kind === 'video' && !producer.screenSharing) {
|
|
682
|
-
console.log('CALLING CONSUME FROM ON NEW PRODUCERS FOR : ' + props.data.userId + ' - ' + producer.producerId);
|
|
683
|
-
consume(producer.producerId, producer.kind, loading, producer.userId);
|
|
684
|
-
}
|
|
410
|
+
for (const producer of producers) {
|
|
411
|
+
if (consumerTransport) {
|
|
412
|
+
if (producer.userId === props.data.userId) {
|
|
413
|
+
if (producer.kind === 'video' && !producer.screenSharing) {
|
|
414
|
+
console.log('CALLING CONSUME FROM ON NEW PRODUCERS FOR : ' + props.data.userId + ' - ' + producer.producerId);
|
|
415
|
+
consume(producer.producerId, producer.kind, loading, producer.userId);
|
|
685
416
|
}
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
}
|
|
417
|
+
}
|
|
418
|
+
if (props.isCurrentUser || loading) {
|
|
419
|
+
// The small participant box at the bottom belonging to the current user must consume all audio
|
|
420
|
+
// This is because we do not want to disturb the audio due to any rendering such as Bring to view
|
|
421
|
+
if (producer.kind === 'audio') {
|
|
422
|
+
consume(producer.producerId, producer.kind, loading, producer.userId);
|
|
693
423
|
}
|
|
694
|
-
} else {
|
|
695
|
-
failedProducersDueToNullTransport.push(producer);
|
|
696
424
|
}
|
|
425
|
+
} else {
|
|
426
|
+
failedProducersDueToNullTransport.push(producer);
|
|
697
427
|
}
|
|
698
|
-
} catch (err) {
|
|
699
|
-
_iterator3.e(err);
|
|
700
|
-
} finally {
|
|
701
|
-
_iterator3.f();
|
|
702
428
|
}
|
|
703
|
-
|
|
704
429
|
console.log("====== PRODUCERS THAT COULD NOT BE CONSUMES : [ " + JSON.stringify(failedProducersDueToNullTransport) + " ] =======");
|
|
705
430
|
};
|
|
706
|
-
|
|
707
|
-
var removeConsumer = function removeConsumer(consumerId, kind, userId) {
|
|
431
|
+
const removeConsumer = (consumerId, kind, userId) => {
|
|
708
432
|
if (kind === 'video') {
|
|
709
433
|
if (videoStream.current) {
|
|
710
434
|
if (videoStream.current) {
|
|
@@ -714,32 +438,25 @@ var VCRoomParticipant = function VCRoomParticipant(props) {
|
|
|
714
438
|
}
|
|
715
439
|
}
|
|
716
440
|
} else if (kind === 'audio') {
|
|
717
|
-
|
|
718
|
-
|
|
441
|
+
let audioElement = document.getElementById(consumerId);
|
|
719
442
|
if (audioElement && audioElement.srcObject) {
|
|
720
443
|
audioElement.srcObject.getTracks().forEach(function (track) {
|
|
721
444
|
track.stop();
|
|
722
445
|
});
|
|
723
|
-
|
|
724
446
|
if (userId && _VCRoomRecorder.default) {
|
|
725
447
|
_VCRoomRecorder.default.removeTrack(userId);
|
|
726
448
|
}
|
|
727
|
-
|
|
728
|
-
var elementById = document.getElementById(props.data.userId + '-audio-el-container');
|
|
729
|
-
|
|
449
|
+
let elementById = document.getElementById(props.data.userId + '-audio-el-container');
|
|
730
450
|
if (elementById) {
|
|
731
451
|
elementById.removeChild(audioElement);
|
|
732
452
|
}
|
|
733
453
|
}
|
|
734
454
|
}
|
|
735
|
-
|
|
736
455
|
consumers.delete(consumerId);
|
|
737
456
|
};
|
|
738
|
-
|
|
739
457
|
function retryConsume(kind, userId, e, retries, producerId, loading) {
|
|
740
458
|
console.log('FAILED TO CONSUME ' + kind + ' FROM ' + userId);
|
|
741
459
|
console.log(e);
|
|
742
|
-
|
|
743
460
|
if (retries < 10) {
|
|
744
461
|
console.log('RE-TRYING [' + retries + ']');
|
|
745
462
|
setTimeout(function () {
|
|
@@ -749,98 +466,65 @@ var VCRoomParticipant = function VCRoomParticipant(props) {
|
|
|
749
466
|
console.log('COMPLETELY FAILED TO CONSUME ' + kind + ' FROM ' + userId);
|
|
750
467
|
}
|
|
751
468
|
}
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
if (props.isCurrentUser || loading) {
|
|
783
|
-
var audioElement = document.createElement('audio');
|
|
784
|
-
audioElement.srcObject = stream;
|
|
785
|
-
audioElement.id = consumer.id;
|
|
786
|
-
audioElement.playsinline = false;
|
|
787
|
-
audioElement.autoplay = true;
|
|
788
|
-
document.getElementById('meeting-audio-el-container').appendChild(audioElement);
|
|
789
|
-
|
|
790
|
-
if (props.isHost) {
|
|
791
|
-
_VCRoomRecorder.default.addTrack(userId, stream.getAudioTracks()[0]);
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
consumer.on('trackended', function () {
|
|
797
|
-
console.log(kind + " CONSUMER TRACK ENDED FOR " + userId);
|
|
798
|
-
removeConsumer(consumer.id, kind, userId);
|
|
799
|
-
var participantVideoMuted = participants.find(function (p) {
|
|
800
|
-
return p.userId === userId;
|
|
801
|
-
}).videoMuted;
|
|
802
|
-
var participantAudioMuted = participants.find(function (p) {
|
|
803
|
-
return p.userId === userId;
|
|
804
|
-
}).audioMuted;
|
|
805
|
-
|
|
806
|
-
if (kind === 'video' && !participantVideoMuted || kind === 'audio' && !participantAudioMuted) {
|
|
807
|
-
retryConsume(kind, userId, new Error('trackended while ' + kind + ' is NOT muted'), retries, producerId, loading);
|
|
808
|
-
}
|
|
809
|
-
});
|
|
810
|
-
consumer.on('transportclose', function () {
|
|
811
|
-
console.log(kind + " CONSUMER CLOSED FOR " + userId);
|
|
812
|
-
removeConsumer(consumer.id, kind, userId);
|
|
813
|
-
});
|
|
814
|
-
}
|
|
815
|
-
}).catch(function (e) {
|
|
816
|
-
retryConsume(kind, userId, e, retries, producerId, loading);
|
|
817
|
-
});
|
|
818
|
-
|
|
819
|
-
case 2:
|
|
820
|
-
case "end":
|
|
821
|
-
return _context3.stop();
|
|
469
|
+
const consume = async function (producerId, kind, loading, userId) {
|
|
470
|
+
let retries = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
471
|
+
_MediaSoupHelper.default.getConsumeStream(producerId, device.rtpCapabilities, consumerTransport, props.meetingId, sessionStorage.getItem('username'), kind).then(_ref => {
|
|
472
|
+
let {
|
|
473
|
+
consumer,
|
|
474
|
+
stream,
|
|
475
|
+
kind
|
|
476
|
+
} = _ref;
|
|
477
|
+
if (consumer) {
|
|
478
|
+
consumers.set(consumer.id, consumer);
|
|
479
|
+
console.log('=====================================CONSUME===================================== : ' + kind + ' FOR : ' + userId);
|
|
480
|
+
if (kind === 'video') {
|
|
481
|
+
if (videoRef.current) {
|
|
482
|
+
videoRef.current.srcObject = stream;
|
|
483
|
+
}
|
|
484
|
+
videoStream.current = stream;
|
|
485
|
+
setVideoMuted(false);
|
|
486
|
+
setVideoRefresher(!videoRefresher);
|
|
487
|
+
tracks.current.setVideoTrack(stream.getVideoTracks()[0]);
|
|
488
|
+
} else {
|
|
489
|
+
if (props.isCurrentUser || loading) {
|
|
490
|
+
let audioElement = document.createElement('audio');
|
|
491
|
+
audioElement.srcObject = stream;
|
|
492
|
+
audioElement.id = consumer.id;
|
|
493
|
+
audioElement.playsinline = false;
|
|
494
|
+
audioElement.autoplay = true;
|
|
495
|
+
document.getElementById('meeting-audio-el-container').appendChild(audioElement);
|
|
496
|
+
if (props.isHost) {
|
|
497
|
+
_VCRoomRecorder.default.addTrack(userId, stream.getAudioTracks()[0]);
|
|
498
|
+
}
|
|
822
499
|
}
|
|
823
500
|
}
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
501
|
+
consumer.on('trackended', () => {
|
|
502
|
+
console.log(kind + " CONSUMER TRACK ENDED FOR " + userId);
|
|
503
|
+
removeConsumer(consumer.id, kind, userId);
|
|
504
|
+
let participantVideoMuted = participants.find(p => p.userId === userId).videoMuted;
|
|
505
|
+
let participantAudioMuted = participants.find(p => p.userId === userId).audioMuted;
|
|
506
|
+
if (kind === 'video' && !participantVideoMuted || kind === 'audio' && !participantAudioMuted) {
|
|
507
|
+
retryConsume(kind, userId, new Error('trackended while ' + kind + ' is NOT muted'), retries, producerId, loading);
|
|
508
|
+
}
|
|
509
|
+
});
|
|
510
|
+
consumer.on('transportclose', () => {
|
|
511
|
+
console.log(kind + " CONSUMER CLOSED FOR " + userId);
|
|
512
|
+
removeConsumer(consumer.id, kind, userId);
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
}).catch(e => {
|
|
516
|
+
retryConsume(kind, userId, e, retries, producerId, loading);
|
|
517
|
+
});
|
|
518
|
+
};
|
|
519
|
+
const getParticipantName = () => {
|
|
520
|
+
let name = props.data.name;
|
|
835
521
|
if (_Utils.default.isNull(props.data.userId)) {
|
|
836
|
-
name =
|
|
522
|
+
name = `${name} (Guest)`;
|
|
837
523
|
}
|
|
838
|
-
|
|
839
524
|
return name;
|
|
840
525
|
};
|
|
841
|
-
|
|
842
526
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
843
|
-
className:
|
|
527
|
+
className: `${'col-*-* ' + (props.isCurrentUser ? 'meeting-participant-container-current-user' : 'meeting-participant-container')}`,
|
|
844
528
|
style: {
|
|
845
529
|
padding: props.padding ? props.padding : null,
|
|
846
530
|
height: props.height ? props.height : null,
|
|
@@ -875,7 +559,7 @@ var VCRoomParticipant = function VCRoomParticipant(props) {
|
|
|
875
559
|
backgroundPosition: 'center',
|
|
876
560
|
borderRadius: '50%',
|
|
877
561
|
backgroundColor: 'transparent',
|
|
878
|
-
backgroundImage:
|
|
562
|
+
backgroundImage: `url(${downloadUrl})`
|
|
879
563
|
}
|
|
880
564
|
}) : _Utils.default.getInitials(props.data.name))), /*#__PURE__*/_react.default.createElement("video", {
|
|
881
565
|
id: props.data.userId + '-video',
|
|
@@ -890,8 +574,7 @@ var VCRoomParticipant = function VCRoomParticipant(props) {
|
|
|
890
574
|
zIndex: '0',
|
|
891
575
|
display: videoMuted || !videoRef.current || !videoRef.current.srcObject ? 'none' : null
|
|
892
576
|
}
|
|
893
|
-
}),
|
|
894
|
-
/*We need this element to capture recording sound*/
|
|
577
|
+
}), /*We need this element to capture recording sound*/
|
|
895
578
|
props.isHost && /*#__PURE__*/_react.default.createElement("audio", {
|
|
896
579
|
id: props.data.userId + '-audio',
|
|
897
580
|
autoPlay: true,
|
|
@@ -912,7 +595,7 @@ var VCRoomParticipant = function VCRoomParticipant(props) {
|
|
|
912
595
|
marginLeft: '4px'
|
|
913
596
|
}
|
|
914
597
|
}, props.isHost && !audioMuted ? /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
915
|
-
onClick:
|
|
598
|
+
onClick: e => {
|
|
916
599
|
props.onHostAudioMute(props.data);
|
|
917
600
|
},
|
|
918
601
|
style: {
|
|
@@ -928,7 +611,7 @@ var VCRoomParticipant = function VCRoomParticipant(props) {
|
|
|
928
611
|
}) : /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
929
612
|
id: 'MIC'
|
|
930
613
|
})), props.isHost && !videoMuted && /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
931
|
-
onClick:
|
|
614
|
+
onClick: e => {
|
|
932
615
|
props.onHostVideoMute(props.data);
|
|
933
616
|
},
|
|
934
617
|
style: {
|
|
@@ -1028,11 +711,9 @@ var VCRoomParticipant = function VCRoomParticipant(props) {
|
|
|
1028
711
|
horizontal: 'right',
|
|
1029
712
|
vertical: 'top'
|
|
1030
713
|
}
|
|
1031
|
-
}, audioDevices.map(
|
|
714
|
+
}, audioDevices.map((device, index) => {
|
|
1032
715
|
return /*#__PURE__*/_react.default.createElement(_core.MenuItem, {
|
|
1033
|
-
onClick:
|
|
1034
|
-
return changeAudioDevice(device);
|
|
1035
|
-
}
|
|
716
|
+
onClick: () => changeAudioDevice(device)
|
|
1036
717
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
1037
718
|
style: {
|
|
1038
719
|
color: selectedAudioDevice && selectedAudioDevice.id === device.id ? '#198754' : null
|
|
@@ -1040,6 +721,4 @@ var VCRoomParticipant = function VCRoomParticipant(props) {
|
|
|
1040
721
|
}, device.label));
|
|
1041
722
|
})));
|
|
1042
723
|
};
|
|
1043
|
-
|
|
1044
|
-
var _default = VCRoomParticipant;
|
|
1045
|
-
exports.default = _default;
|
|
724
|
+
var _default = exports.default = VCRoomParticipant;
|