@agilemotion/oui-react-js 1.6.3 → 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 +26 -21
|
@@ -4,107 +4,71 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _SocketManager = _interopRequireDefault(require("../SocketManager"));
|
|
9
|
-
|
|
10
8
|
var _VCEventType = require("./VCEventType");
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
var _this2 = this;
|
|
30
|
-
|
|
31
|
-
_classCallCheck(this, VCRoomRecorder);
|
|
32
|
-
|
|
33
|
-
_defineProperty(this, "init", /*#__PURE__*/function () {
|
|
34
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(meetingId, meetingTitle) {
|
|
35
|
-
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
36
|
-
while (1) {
|
|
37
|
-
switch (_context.prev = _context.next) {
|
|
38
|
-
case 0:
|
|
39
|
-
_this2.meetingId = meetingId;
|
|
40
|
-
_this2.meetingTitle = meetingTitle;
|
|
41
|
-
|
|
42
|
-
case 2:
|
|
43
|
-
case "end":
|
|
44
|
-
return _context.stop();
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}, _callee);
|
|
48
|
-
}));
|
|
49
|
-
|
|
50
|
-
return function (_x, _x2) {
|
|
51
|
-
return _ref.apply(this, arguments);
|
|
52
|
-
};
|
|
53
|
-
}());
|
|
54
|
-
|
|
55
|
-
_defineProperty(this, "addTrack", function (id, track) {
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
class VCRoomRecorder {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.meetingId = null;
|
|
13
|
+
this.meetingTitle = '';
|
|
14
|
+
this.recordingSequence = 0;
|
|
15
|
+
this.currentRecordingId = null;
|
|
16
|
+
this.recordingType = null;
|
|
17
|
+
this.recordingSize = null;
|
|
18
|
+
this.isRecording = false;
|
|
19
|
+
this.recorder = null;
|
|
20
|
+
this.audioTracks = new Map();
|
|
21
|
+
}
|
|
22
|
+
init = async (meetingId, meetingTitle) => {
|
|
23
|
+
this.meetingId = meetingId;
|
|
24
|
+
this.meetingTitle = meetingTitle;
|
|
25
|
+
};
|
|
26
|
+
addTrack = (id, track) => {
|
|
56
27
|
console.log('ADDING TRACK FOR : ' + id);
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
var mediaStream = new MediaStream([track]);
|
|
62
|
-
var mediaStreamAudioSourceNode = new MediaStreamAudioSourceNode(_this2.audioContext, {
|
|
28
|
+
this.audioTracks.set(id, track);
|
|
29
|
+
if (this.recorder && this.recorder.state === 'recording') {
|
|
30
|
+
let mediaStream = new MediaStream([track]);
|
|
31
|
+
const mediaStreamAudioSourceNode = new MediaStreamAudioSourceNode(this.audioContext, {
|
|
63
32
|
mediaStream: mediaStream
|
|
64
33
|
});
|
|
65
|
-
mediaStreamAudioSourceNode.connect(
|
|
34
|
+
mediaStreamAudioSourceNode.connect(this.mediaStreamAudioDestinationNode);
|
|
66
35
|
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
_this2.audioTracks.delete(id);
|
|
36
|
+
};
|
|
37
|
+
removeTrack = id => {
|
|
38
|
+
if (this.audioTracks.has(id)) {
|
|
39
|
+
this.audioTracks.delete(id);
|
|
72
40
|
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
_defineProperty(this, "handleRecordingDataAvailable", function (e) {
|
|
41
|
+
};
|
|
42
|
+
handleRecordingDataAvailable = e => {
|
|
76
43
|
if (e.data.size > 0) {
|
|
77
|
-
console.log('ADDED CHUNK : ' +
|
|
78
|
-
|
|
44
|
+
console.log('ADDED CHUNK : ' + this.recordingSequence);
|
|
45
|
+
const blob = new Blob([e.data], {
|
|
79
46
|
type: 'video/webm'
|
|
80
47
|
});
|
|
81
|
-
|
|
48
|
+
const data = {
|
|
82
49
|
userId: sessionStorage.getItem('username'),
|
|
83
|
-
meetingId:
|
|
84
|
-
name:
|
|
50
|
+
meetingId: this.meetingId,
|
|
51
|
+
name: this.meetingTitle,
|
|
85
52
|
type: blob.type,
|
|
86
53
|
size: blob.size,
|
|
87
|
-
sequenceNumber:
|
|
88
|
-
sessionId:
|
|
54
|
+
sequenceNumber: this.recordingSequence,
|
|
55
|
+
sessionId: this.currentRecordingId
|
|
89
56
|
};
|
|
90
|
-
|
|
57
|
+
const reader = new FileReader();
|
|
91
58
|
reader.readAsDataURL(blob);
|
|
92
|
-
|
|
93
|
-
|
|
59
|
+
let _this = this;
|
|
94
60
|
reader.onload = function (evt) {
|
|
95
|
-
|
|
61
|
+
const result = evt.target.result;
|
|
96
62
|
_this.recordingType = blob.type;
|
|
97
63
|
_this.recordingSize += blob.size;
|
|
98
64
|
data.recordedData = result.replace('data:video/webm;base64,', '');
|
|
99
65
|
console.log('======== SAVING RECORDING CHUNK =========');
|
|
100
66
|
console.log(data);
|
|
101
|
-
|
|
102
|
-
_SocketManager.default.emitEvent(_VCEventType.VCEventType.SAVE_RECORDING, data).then(function (data) {
|
|
67
|
+
_SocketManager.default.emitEvent(_VCEventType.VCEventType.SAVE_RECORDING, data).then(data => {
|
|
103
68
|
console.log('===== SAVE RECORDING SUCCESS ======');
|
|
104
|
-
|
|
105
69
|
if (!_this.isRecording) {
|
|
106
70
|
console.log('======= STOPPING RECORDING =======', _this.meetingTitle);
|
|
107
|
-
|
|
71
|
+
const data = {
|
|
108
72
|
meetingId: _this.meetingId,
|
|
109
73
|
userId: sessionStorage.getItem("username"),
|
|
110
74
|
name: _this.meetingTitle,
|
|
@@ -113,98 +77,63 @@ var VCRoomRecorder = function VCRoomRecorder() {
|
|
|
113
77
|
sequenceNumber: _this.recordingSequence,
|
|
114
78
|
sessionId: _this.currentRecordingId
|
|
115
79
|
};
|
|
116
|
-
|
|
117
|
-
_SocketManager.default.emitEvent(_VCEventType.VCEventType.STOP_RECORDING, _data).catch(function (error) {});
|
|
80
|
+
_SocketManager.default.emitEvent(_VCEventType.VCEventType.STOP_RECORDING, data).catch(error => {});
|
|
118
81
|
}
|
|
119
|
-
}).catch(
|
|
82
|
+
}).catch(error => {
|
|
120
83
|
console.log('===== SAVE RECORDING ERROR ======');
|
|
121
84
|
});
|
|
122
85
|
};
|
|
123
|
-
|
|
124
86
|
_this.recordingSequence++;
|
|
125
87
|
} else {
|
|
126
88
|
console.log('no data to push');
|
|
127
89
|
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
var _this;
|
|
132
|
-
|
|
133
|
-
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
134
|
-
while (1) {
|
|
135
|
-
switch (_context2.prev = _context2.next) {
|
|
136
|
-
case 0:
|
|
137
|
-
_this2.recorder = null;
|
|
138
|
-
_context2.prev = 1;
|
|
139
|
-
_context2.next = 4;
|
|
140
|
-
return _this2.createMediaRecorder();
|
|
141
|
-
|
|
142
|
-
case 4:
|
|
143
|
-
_this2.recorder = _context2.sent;
|
|
144
|
-
_context2.next = 9;
|
|
145
|
-
break;
|
|
146
|
-
|
|
147
|
-
case 7:
|
|
148
|
-
_context2.prev = 7;
|
|
149
|
-
_context2.t0 = _context2["catch"](1);
|
|
150
|
-
|
|
151
|
-
case 9:
|
|
152
|
-
_this = _this2;
|
|
153
|
-
|
|
154
|
-
if (_this2.recorder != null) {
|
|
155
|
-
_SocketManager.default.emitEvent(_VCEventType.VCEventType.TOGGLE_RECORD_MEETING, {
|
|
156
|
-
roomId: _this.meetingId,
|
|
157
|
-
isRecording: true
|
|
158
|
-
}).then(function (data) {
|
|
159
|
-
console.log('RECORDING STARTED : ' + data.id);
|
|
160
|
-
_this.currentRecordingId = data.id;
|
|
161
|
-
_this.recordingSequence = 0;
|
|
162
|
-
_this.recordingSize = 0;
|
|
163
|
-
_this.recordingType = '';
|
|
164
|
-
|
|
165
|
-
_this.recorder.start(60000);
|
|
166
|
-
|
|
167
|
-
_this.isRecording = true;
|
|
168
|
-
}).catch(function (error) {
|
|
169
|
-
console.log('RECORD START ERROR');
|
|
170
|
-
console.log(error);
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
case 11:
|
|
175
|
-
case "end":
|
|
176
|
-
return _context2.stop();
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}, _callee2, null, [[1, 7]]);
|
|
180
|
-
})));
|
|
181
|
-
|
|
182
|
-
_defineProperty(this, "stopRecordingMeeting", function () {
|
|
90
|
+
};
|
|
91
|
+
recordMeeting = async () => {
|
|
92
|
+
this.recorder = null;
|
|
183
93
|
try {
|
|
184
|
-
|
|
185
|
-
|
|
94
|
+
this.recorder = await this.createMediaRecorder();
|
|
95
|
+
} catch (e) {}
|
|
96
|
+
let _this = this;
|
|
97
|
+
if (this.recorder != null) {
|
|
186
98
|
_SocketManager.default.emitEvent(_VCEventType.VCEventType.TOGGLE_RECORD_MEETING, {
|
|
187
|
-
roomId:
|
|
99
|
+
roomId: _this.meetingId,
|
|
100
|
+
isRecording: true
|
|
101
|
+
}).then(data => {
|
|
102
|
+
console.log('RECORDING STARTED : ' + data.id);
|
|
103
|
+
_this.currentRecordingId = data.id;
|
|
104
|
+
_this.recordingSequence = 0;
|
|
105
|
+
_this.recordingSize = 0;
|
|
106
|
+
_this.recordingType = '';
|
|
107
|
+
_this.recorder.start(60000);
|
|
108
|
+
_this.isRecording = true;
|
|
109
|
+
}).catch(error => {
|
|
110
|
+
console.log('RECORD START ERROR');
|
|
111
|
+
console.log(error);
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
stopRecordingMeeting = () => {
|
|
116
|
+
try {
|
|
117
|
+
this.isRecording = false;
|
|
118
|
+
_SocketManager.default.emitEvent(_VCEventType.VCEventType.TOGGLE_RECORD_MEETING, {
|
|
119
|
+
roomId: this.meetingId,
|
|
188
120
|
isRecording: false
|
|
189
|
-
}).catch(
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
_this2.recorder.stream.getVideoTracks()[0].stop();
|
|
121
|
+
}).catch(error => {});
|
|
122
|
+
if (this.recorder && this.recorder.stream) {
|
|
123
|
+
if (this.recorder.stream.getVideoTracks().length > 0) {
|
|
124
|
+
this.recorder.stream.getVideoTracks()[0].stop();
|
|
194
125
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
_this2.recorder.stop();
|
|
126
|
+
if (this.recorder.state === 'recording') {
|
|
127
|
+
this.recorder.stop();
|
|
198
128
|
}
|
|
199
129
|
}
|
|
200
130
|
} catch (e) {
|
|
201
131
|
console.error(e);
|
|
202
132
|
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
var videoConstraints = {
|
|
133
|
+
};
|
|
134
|
+
createMediaRecorder = () => {
|
|
135
|
+
return new Promise((resolve, reject) => {
|
|
136
|
+
const videoConstraints = {
|
|
208
137
|
cursor: true,
|
|
209
138
|
audio: false,
|
|
210
139
|
mediaSource: "screen",
|
|
@@ -214,71 +143,44 @@ var VCRoomRecorder = function VCRoomRecorder() {
|
|
|
214
143
|
surfaceSwitching: 'exclude',
|
|
215
144
|
monitorTypeSurfaces: 'exclude'
|
|
216
145
|
};
|
|
217
|
-
|
|
218
|
-
navigator.mediaDevices.getDisplayMedia(videoConstraints).then(
|
|
219
|
-
|
|
146
|
+
let _this = this;
|
|
147
|
+
navigator.mediaDevices.getDisplayMedia(videoConstraints).then(stream => {
|
|
148
|
+
const options = {
|
|
220
149
|
mimeType: 'video/webm; codecs=vp9'
|
|
221
150
|
};
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
var value = _step.value;
|
|
233
|
-
tracks.push(value);
|
|
234
|
-
var mediaStreamAudioSourceNode = new MediaStreamAudioSourceNode(audioContext, {
|
|
235
|
-
mediaStream: new MediaStream([value])
|
|
236
|
-
});
|
|
237
|
-
mediaStreamAudioSourceNode.connect(mediaStreamAudioDestinationNode);
|
|
238
|
-
}
|
|
239
|
-
} catch (err) {
|
|
240
|
-
_iterator.e(err);
|
|
241
|
-
} finally {
|
|
242
|
-
_iterator.f();
|
|
151
|
+
let audioContext = new AudioContext();
|
|
152
|
+
let mediaStreamAudioDestinationNode = new MediaStreamAudioDestinationNode(audioContext);
|
|
153
|
+
let tracks = [mediaStreamAudioDestinationNode.stream.getAudioTracks()[0], stream.getVideoTracks()[0]];
|
|
154
|
+
if (this.audioTracks.size > 0) {
|
|
155
|
+
for (const value of this.audioTracks.values()) {
|
|
156
|
+
tracks.push(value);
|
|
157
|
+
let mediaStreamAudioSourceNode = new MediaStreamAudioSourceNode(audioContext, {
|
|
158
|
+
mediaStream: new MediaStream([value])
|
|
159
|
+
});
|
|
160
|
+
mediaStreamAudioSourceNode.connect(mediaStreamAudioDestinationNode);
|
|
243
161
|
}
|
|
244
162
|
} else {
|
|
245
|
-
|
|
163
|
+
let mediaStreamAudioSourceNode = new MediaStreamAudioSourceNode(audioContext, {
|
|
246
164
|
mediaStream: new MediaStream(tracks)
|
|
247
165
|
});
|
|
248
|
-
|
|
249
|
-
_mediaStreamAudioSourceNode.connect(mediaStreamAudioDestinationNode);
|
|
166
|
+
mediaStreamAudioSourceNode.connect(mediaStreamAudioDestinationNode);
|
|
250
167
|
}
|
|
251
|
-
|
|
252
168
|
console.log('INIT WITH TRACKS : ', tracks);
|
|
253
|
-
|
|
254
|
-
|
|
169
|
+
let initialMediaStream = new MediaStream(tracks);
|
|
170
|
+
const recorder = new MediaRecorder(initialMediaStream, options);
|
|
255
171
|
recorder.ondataavailable = _this.handleRecordingDataAvailable;
|
|
256
|
-
|
|
257
|
-
recorder.onstop = function (e) {
|
|
172
|
+
recorder.onstop = e => {
|
|
258
173
|
_this.isRecording = false;
|
|
259
174
|
};
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
_this2.mediaStreamAudioDestinationNode = mediaStreamAudioDestinationNode;
|
|
175
|
+
this.audioContext = audioContext;
|
|
176
|
+
this.mediaStreamAudioDestinationNode = mediaStreamAudioDestinationNode;
|
|
263
177
|
resolve(recorder);
|
|
264
|
-
}).catch(
|
|
178
|
+
}).catch(e => {
|
|
265
179
|
console.error(e);
|
|
266
180
|
reject(new Error(e.message));
|
|
267
181
|
});
|
|
268
182
|
});
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
this.recordingSequence = 0;
|
|
274
|
-
this.currentRecordingId = null;
|
|
275
|
-
this.recordingType = null;
|
|
276
|
-
this.recordingSize = null;
|
|
277
|
-
this.isRecording = false;
|
|
278
|
-
this.recorder = null;
|
|
279
|
-
this.audioTracks = new Map();
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
var instance = new VCRoomRecorder();
|
|
283
|
-
var _default = instance;
|
|
284
|
-
exports.default = _default;
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
const instance = new VCRoomRecorder();
|
|
186
|
+
var _default = exports.default = instance;
|