@agilemotion/oui-react-js 1.6.1 → 1.6.2
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 +698 -421
- package/dist/BasicApp.js +5 -5
- package/dist/BasicAppHome.js +55 -26
- package/dist/DynamicJS.js +147 -65
- package/dist/InteractionPortalApp.css +1 -1
- package/dist/InteractionPortalApp.js +5 -5
- package/dist/InteractionPortalAppHome.js +57 -22
- package/dist/InteractionPortalApp_old.js +107 -61
- package/dist/RestUtils.js +339 -287
- package/dist/TypedValue.js +18 -15
- package/dist/Utils.js +375 -276
- package/dist/WithRouter.js +6 -6
- package/dist/assets/jss/components/authNavbarStyle.js +166 -164
- package/dist/assets/jss/components/buttonStyle.js +1 -1
- package/dist/assets/jss/components/cardAvatarStyle.js +1 -1
- package/dist/assets/jss/components/cardBodyStyle.js +1 -1
- package/dist/assets/jss/components/cardFooterStyle.js +1 -1
- package/dist/assets/jss/components/cardHeaderStyle.js +13 -13
- package/dist/assets/jss/components/cardIconStyle.js +1 -1
- package/dist/assets/jss/components/cardStyle.js +1 -1
- package/dist/assets/jss/components/cardTextStyle.js +1 -1
- package/dist/assets/jss/components/customDropdownStyle.js +168 -169
- package/dist/assets/jss/components/customInputStyle.js +9 -3
- package/dist/assets/jss/components/dropdownStyle.js +69 -69
- package/dist/assets/jss/components/footerStyle.js +19 -13
- package/dist/assets/jss/components/headerLinksStyle.js +45 -48
- package/dist/assets/jss/components/headerStyle.js +68 -65
- package/dist/assets/jss/components/navbarLinksStyle.js +66 -77
- package/dist/assets/jss/components/navbarStyle.js +79 -76
- package/dist/assets/jss/components/sidebarStyle.js +436 -436
- package/dist/assets/jss/components/typographyStyle.js +9 -3
- package/dist/assets/jss/rootStyle.js +96 -81
- package/dist/assets/jss/views/layoutStyle.js +44 -41
- package/dist/assets/jss/views/loginBasicStyle.js +1 -1
- package/dist/assets/jss/views/loginBusinessPortalStyle.js +1 -1
- package/dist/assets/jss/views/loginStyle.js +82 -77
- package/dist/components/AlertBar.js +50 -17
- package/dist/components/AlertItem.js +35 -12
- package/dist/components/AlertTemplate.js +30 -29
- package/dist/components/Button.js +62 -34
- package/dist/components/Calendar.js +140 -91
- package/dist/components/ConfirmationDialog.js +36 -11
- package/dist/components/DataGrid.js +512 -270
- package/dist/components/DataGridColumn.js +47 -22
- package/dist/components/DataGridFilter.js +186 -105
- package/dist/components/DataGridHeading.js +50 -32
- package/dist/components/Dialog.js +90 -35
- package/dist/components/DocumentTemplateDesigner.js +34 -16
- package/dist/components/DocumentTemplateDesignerComponent.js +124 -48
- package/dist/components/DocumentTemplatePlaceholderDialog.js +52 -30
- package/dist/components/DocumentViewer.js +34 -18
- package/dist/components/DocumentViewerComponent.js +26 -9
- package/dist/components/ElementResizeHandler.js +229 -207
- package/dist/components/FileThumb.js +32 -10
- package/dist/components/Graph.js +153 -85
- package/dist/components/GraphNode.js +58 -38
- package/dist/components/HtmlPanel.js +67 -39
- package/dist/components/Icon.js +206 -166
- package/dist/components/LoadingIndicator.js +3 -3
- package/dist/components/LottieIcon.js +1 -1
- package/dist/components/PopupView.js +39 -19
- package/dist/components/Portlet.js +32 -17
- package/dist/components/RegularButton.js +28 -32
- package/dist/components/SignaturePanel.js +37 -17
- package/dist/components/SocketManager.js +178 -119
- package/dist/components/StepperTitleBar.js +62 -42
- package/dist/components/TabPage.js +30 -25
- package/dist/components/TabPanel.js +86 -33
- package/dist/components/TableCellContent.js +51 -32
- package/dist/components/TemplateDesigner.js +173 -121
- package/dist/components/TemplateItemEventHandler.js +335 -221
- package/dist/components/TemplateTable.js +183 -118
- package/dist/components/TitleBar.js +26 -11
- package/dist/components/Toolbar.js +67 -38
- package/dist/components/Tooltip.js +43 -35
- package/dist/components/Tree.js +85 -44
- package/dist/components/UseIsVisible.js +25 -4
- package/dist/components/card/Card.js +27 -33
- package/dist/components/card/CardAvatar.js +20 -19
- package/dist/components/card/CardBody.js +24 -27
- package/dist/components/card/CardFooter.js +23 -24
- package/dist/components/card/CardHeader.js +24 -27
- package/dist/components/card/CardIcon.js +17 -13
- package/dist/components/card/CardText.js +17 -13
- package/dist/components/customInput/CustomInput.js +22 -36
- package/dist/components/dashboard/{BasicBusinessAppDashboard.js → FoldingSideTabDashboard.js} +111 -63
- package/dist/components/dashboard/SideMenuModuleDashboard.css +60 -0
- package/dist/components/dashboard/SideMenuModuleDashboard.js +423 -0
- package/dist/components/dashboard/TopMenuModuleDashboard.js +138 -0
- package/dist/components/dashboard/components/Header.js +29 -12
- package/dist/components/dashboard/components/LeftDrawer.js +3 -5
- package/dist/components/dashboard/components/UserIdentity.js +2 -2
- package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +131 -87
- package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.js +488 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenu.js +64 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.css +65 -0
- package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.js +556 -0
- package/dist/components/dashboard/components/portal/Timeline.js +1 -1
- package/dist/components/dashboard/components/portal/Workspace.js +5 -11
- package/dist/components/footer/Footer.js +31 -24
- package/dist/components/footer/HomeFooter.js +68 -34
- package/dist/components/form/AddressSearch.js +78 -42
- package/dist/components/form/AutoComplete.js +136 -55
- package/dist/components/form/BaseField.js +108 -56
- package/dist/components/form/Checkbox.js +10 -8
- package/dist/components/form/DatePicker.js +47 -25
- package/dist/components/form/FieldSet.js +217 -84
- package/dist/components/form/Form.js +334 -200
- package/dist/components/form/GridField.js +185 -82
- package/dist/components/form/IconField.js +9 -7
- package/dist/components/form/ImageEditor.js +141 -92
- package/dist/components/form/LabelField.js +12 -10
- package/dist/components/form/LookupField.js +54 -32
- package/dist/components/form/MultiFileUploadField.js +101 -67
- package/dist/components/form/RadioGroup.js +33 -16
- package/dist/components/form/Section.js +84 -34
- package/dist/components/form/SelectItem.js +55 -33
- package/dist/components/form/SignatureTemplateDesignerField.js +11 -9
- package/dist/components/form/Switch.js +10 -8
- package/dist/components/form/TextField.js +34 -16
- package/dist/components/form/TimePicker.js +19 -15
- package/dist/components/form/TransferList.js +153 -75
- package/dist/components/form/UploadField.js +183 -128
- package/dist/components/grid/GridContainer.js +12 -8
- package/dist/components/grid/GridItem.js +12 -8
- package/dist/components/layout/CollapsiblePanel.js +44 -18
- package/dist/components/layout/Layout.js +81 -40
- package/dist/components/layout/VC.css +1 -1
- package/dist/components/layout/View.js +136 -62
- package/dist/components/layout/ViewContainer.js +13 -11
- package/dist/components/layout/ViewPort.js +25 -10
- package/dist/components/layout/Window.js +87 -53
- package/dist/components/layout/WindowViewPort.js +38 -16
- package/dist/components/media/ClosablePanel.js +7 -7
- package/dist/components/media/LobbyWaitingList.js +7 -9
- package/dist/components/media/MediaSoupHelper.js +379 -187
- package/dist/components/media/SideBarContent.js +22 -14
- package/dist/components/media/SocketRequest.js +5 -1
- package/dist/components/media/SocketResponse.js +5 -1
- package/dist/components/media/Timer.js +35 -15
- package/dist/components/media/Toolbar.css +5 -0
- package/dist/components/media/Toolbar.js +220 -102
- package/dist/components/media/ToolbarButton.js +82 -33
- package/dist/components/media/Toolbar_bck.js +142 -70
- package/dist/components/media/Tracks.js +31 -28
- package/dist/components/media/TrainingRoom.js +284 -121
- package/dist/components/media/Transports.js +27 -24
- package/dist/components/media/VCEventManager.js +95 -31
- package/dist/components/media/VCEventType.js +5 -1
- package/dist/components/media/VCParticipantList.js +40 -14
- package/dist/components/media/VCParticipantListItem.js +92 -41
- package/dist/components/media/VCRoom.js +29 -11
- package/dist/components/media/VCRoomParticipant.js +488 -242
- package/dist/components/media/VCRoomRecorder.js +236 -175
- package/dist/components/media/VCRoomWorkspace.js +505 -245
- package/dist/components/media/Video.js +89 -25
- package/dist/components/media/VideoPlayer.js +56 -22
- package/dist/components/media/chat/ChatRoom.js +255 -132
- package/dist/components/media/chat/ChatRoomItem.js +35 -14
- package/dist/components/media/chat/ChatRoomList.js +43 -13
- package/dist/components/menu/CollapsibleMenu.js +39 -20
- package/dist/components/menu/MenuBars.js +81 -48
- package/dist/components/menu/MenuButton.js +95 -60
- package/dist/components/menu/MenuItem.js +28 -9
- package/dist/components/menu/MenuLink.js +12 -10
- package/dist/components/menu/PopupMenu.js +16 -12
- package/dist/components/navbars/AuthNavbar.js +27 -18
- package/dist/components/navbars/HomeNavbar.js +243 -194
- package/dist/components/navbars/PortalNavbar.js +50 -26
- package/dist/components/signatures/AgilitySignaturePanel.js +96 -39
- package/dist/components/signatures/AlertItem.js +36 -13
- package/dist/components/signatures/Card.js +4 -4
- package/dist/components/signatures/DocumentContainer.js +141 -57
- package/dist/components/signatures/ImageSignatureInput.js +90 -59
- package/dist/components/signatures/MenuButton.js +53 -33
- package/dist/components/signatures/Prompt.js +26 -5
- package/dist/components/signatures/ResponsiveTable.js +302 -197
- package/dist/components/signatures/SearchView.js +77 -36
- package/dist/components/signatures/SignatorySearch.js +30 -10
- package/dist/components/signatures/SignatorySearchForm.js +35 -18
- package/dist/components/signatures/SignatureInput.js +56 -26
- package/dist/components/signatures/SignatureInputProps.js +107 -55
- package/dist/components/signatures/SignatureTemplateDesigner.js +340 -235
- package/dist/components/signatures/Toolbar.js +135 -94
- package/dist/components/signatures/ViewUtils.js +273 -224
- package/dist/components/typography/Danger.js +3 -5
- package/dist/components/typography/Info.js +3 -5
- package/dist/components/typography/Link.js +3 -5
- package/dist/event/ActionHandlers.js +57 -43
- package/dist/event/Event.js +16 -13
- package/dist/event/EventListener.js +39 -36
- package/dist/event/EventType.js +5 -1
- package/dist/event/LoadDataActionHandler.js +20 -8
- package/dist/event/Observable.js +323 -142
- package/dist/event/RouteActionHandler.js +139 -125
- package/dist/event/ScriptActionHandler.js +20 -8
- package/dist/event/ServiceCallActionHandler.js +51 -39
- package/dist/event/SignalGraphActionHandler.js +19 -7
- package/dist/js/Addresses.js +38 -24
- package/dist/js/Calendar.js +168 -161
- package/dist/js/DynamicLib.js +14 -11
- package/dist/js/Media.js +213 -120
- package/dist/js/Validators.js +6 -5
- package/dist/js/Windows.js +48 -47
- package/dist/redux/store/ConfigureStore.js +17 -9
- package/dist/redux/store/DashboardStore.js +110 -43
- package/dist/redux/store/History.js +1 -1
- package/dist/redux/store/SecurityStore.js +59 -20
- package/dist/security/TokenManager.js +44 -30
- package/dist/theme-default.js +1 -1
- package/dist/view/Dashboard.js +230 -137
- package/dist/view/PortalDashboard.js +4 -4
- package/dist/view/Settings.js +4 -2
- package/dist/view/Views.js +27 -14
- package/dist/view/security/ChangePasswordBasic.js +97 -40
- package/dist/view/security/ForgotPassword.js +59 -22
- package/dist/view/security/ForgotPasswordBasic.js +62 -21
- package/dist/view/security/Login.js +64 -24
- package/dist/view/security/LoginBasic.js +65 -26
- package/dist/view/security/LoginInteractionPortal.js +62 -25
- package/dist/view/security/ResetPassword.js +65 -23
- package/dist/view/security/ResetPasswordBasic.js +91 -37
- package/dist/view/security/Security.js +12 -12
- package/package.json +1 -2
- package/dist/components/dashboard/BusinessPortalAppDashboard.js +0 -115
- package/dist/components/dashboard/components/blackDashboard/sidebar/Sidebar.js +0 -447
- /package/dist/components/dashboard/{BusinessPortalAppDashboard.css → TopMenuModuleDashboard.css} +0 -0
- /package/dist/components/dashboard/components/blackDashboard/sidebar/{Sidebar.css → FoldingTabSidebar.css} +0 -0
|
@@ -11,213 +11,274 @@ var _VCEventType = require("./VCEventType");
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
|
-
function
|
|
14
|
+
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(_e) { throw _e; }, 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(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
constructor() {
|
|
18
|
-
_defineProperty(this, "init", async (meetingId, meetingTitle) => {
|
|
19
|
-
this.meetingId = meetingId;
|
|
20
|
-
this.meetingTitle = meetingTitle;
|
|
21
|
-
});
|
|
16
|
+
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); }
|
|
22
17
|
|
|
23
|
-
|
|
24
|
-
console.log('ADDING TRACK FOR : ' + id);
|
|
25
|
-
this.audioTracks.set(id, track);
|
|
18
|
+
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; }
|
|
26
19
|
|
|
27
|
-
|
|
28
|
-
let mediaStream = new MediaStream([track]);
|
|
29
|
-
const mediaStreamAudioSourceNode = new MediaStreamAudioSourceNode(this.audioContext, {
|
|
30
|
-
mediaStream: mediaStream
|
|
31
|
-
});
|
|
32
|
-
mediaStreamAudioSourceNode.connect(this.mediaStreamAudioDestinationNode);
|
|
33
|
-
}
|
|
34
|
-
});
|
|
20
|
+
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); } }
|
|
35
21
|
|
|
36
|
-
|
|
37
|
-
if (this.audioTracks.has(id)) {
|
|
38
|
-
this.audioTracks.delete(id);
|
|
39
|
-
}
|
|
40
|
-
});
|
|
22
|
+
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); }); }; }
|
|
41
23
|
|
|
42
|
-
|
|
43
|
-
if (e.data.size > 0) {
|
|
44
|
-
console.log('ADDED CHUNK : ' + this.recordingSequence);
|
|
45
|
-
const blob = new Blob([e.data], {
|
|
46
|
-
type: 'video/webm'
|
|
47
|
-
});
|
|
48
|
-
const data = {
|
|
49
|
-
userId: sessionStorage.getItem('username'),
|
|
50
|
-
meetingId: this.meetingId,
|
|
51
|
-
name: this.meetingTitle,
|
|
52
|
-
type: blob.type,
|
|
53
|
-
size: blob.size,
|
|
54
|
-
sequenceNumber: this.recordingSequence,
|
|
55
|
-
sessionId: this.currentRecordingId
|
|
56
|
-
};
|
|
57
|
-
const reader = new FileReader();
|
|
58
|
-
reader.readAsDataURL(blob);
|
|
59
|
-
|
|
60
|
-
let _this = this;
|
|
61
|
-
|
|
62
|
-
reader.onload = function (evt) {
|
|
63
|
-
const result = evt.target.result;
|
|
64
|
-
_this.recordingType = blob.type;
|
|
65
|
-
_this.recordingSize += blob.size;
|
|
66
|
-
data.recordedData = result.replace('data:video/webm;base64,', '');
|
|
67
|
-
console.log('======== SAVING RECORDING CHUNK =========');
|
|
68
|
-
console.log(data);
|
|
69
|
-
|
|
70
|
-
_SocketManager.default.emitEvent(_VCEventType.VCEventType.SAVE_RECORDING, data).then(data => {
|
|
71
|
-
console.log('===== SAVE RECORDING SUCCESS ======');
|
|
72
|
-
|
|
73
|
-
if (!_this.isRecording) {
|
|
74
|
-
console.log('======= STOPPING RECORDING =======', _this.meetingTitle);
|
|
75
|
-
const data = {
|
|
76
|
-
meetingId: _this.meetingId,
|
|
77
|
-
userId: sessionStorage.getItem("username"),
|
|
78
|
-
name: _this.meetingTitle,
|
|
79
|
-
type: _this.recordingType,
|
|
80
|
-
size: _this.recordingSize,
|
|
81
|
-
sequenceNumber: _this.recordingSequence,
|
|
82
|
-
sessionId: _this.currentRecordingId
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
_SocketManager.default.emitEvent(_VCEventType.VCEventType.STOP_RECORDING, data).catch(error => {});
|
|
86
|
-
}
|
|
87
|
-
}).catch(error => {
|
|
88
|
-
console.log('===== SAVE RECORDING ERROR ======');
|
|
89
|
-
});
|
|
90
|
-
};
|
|
24
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
91
25
|
|
|
92
|
-
|
|
93
|
-
} else {
|
|
94
|
-
console.log('no data to push');
|
|
95
|
-
}
|
|
96
|
-
});
|
|
26
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
97
27
|
|
|
98
|
-
|
|
99
|
-
|
|
28
|
+
var VCRoomRecorder = function VCRoomRecorder() {
|
|
29
|
+
var _this2 = this;
|
|
100
30
|
|
|
101
|
-
|
|
102
|
-
this.recorder = await this.createMediaRecorder();
|
|
103
|
-
} catch (e) {}
|
|
31
|
+
_classCallCheck(this, VCRoomRecorder);
|
|
104
32
|
|
|
105
|
-
|
|
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;
|
|
106
41
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
_this.recordingSequence = 0;
|
|
115
|
-
_this.recordingSize = 0;
|
|
116
|
-
_this.recordingType = '';
|
|
42
|
+
case 2:
|
|
43
|
+
case "end":
|
|
44
|
+
return _context.stop();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}, _callee);
|
|
48
|
+
}));
|
|
117
49
|
|
|
118
|
-
|
|
50
|
+
return function (_x, _x2) {
|
|
51
|
+
return _ref.apply(this, arguments);
|
|
52
|
+
};
|
|
53
|
+
}());
|
|
119
54
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
55
|
+
_defineProperty(this, "addTrack", function (id, track) {
|
|
56
|
+
console.log('ADDING TRACK FOR : ' + id);
|
|
57
|
+
|
|
58
|
+
_this2.audioTracks.set(id, track);
|
|
59
|
+
|
|
60
|
+
if (_this2.recorder && _this2.recorder.state === 'recording') {
|
|
61
|
+
var mediaStream = new MediaStream([track]);
|
|
62
|
+
var mediaStreamAudioSourceNode = new MediaStreamAudioSourceNode(_this2.audioContext, {
|
|
63
|
+
mediaStream: mediaStream
|
|
64
|
+
});
|
|
65
|
+
mediaStreamAudioSourceNode.connect(_this2.mediaStreamAudioDestinationNode);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
_defineProperty(this, "removeTrack", function (id) {
|
|
70
|
+
if (_this2.audioTracks.has(id)) {
|
|
71
|
+
_this2.audioTracks.delete(id);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
_defineProperty(this, "handleRecordingDataAvailable", function (e) {
|
|
76
|
+
if (e.data.size > 0) {
|
|
77
|
+
console.log('ADDED CHUNK : ' + _this2.recordingSequence);
|
|
78
|
+
var blob = new Blob([e.data], {
|
|
79
|
+
type: 'video/webm'
|
|
80
|
+
});
|
|
81
|
+
var data = {
|
|
82
|
+
userId: sessionStorage.getItem('username'),
|
|
83
|
+
meetingId: _this2.meetingId,
|
|
84
|
+
name: _this2.meetingTitle,
|
|
85
|
+
type: blob.type,
|
|
86
|
+
size: blob.size,
|
|
87
|
+
sequenceNumber: _this2.recordingSequence,
|
|
88
|
+
sessionId: _this2.currentRecordingId
|
|
89
|
+
};
|
|
90
|
+
var reader = new FileReader();
|
|
91
|
+
reader.readAsDataURL(blob);
|
|
92
|
+
var _this = _this2;
|
|
93
|
+
|
|
94
|
+
reader.onload = function (evt) {
|
|
95
|
+
var result = evt.target.result;
|
|
96
|
+
_this.recordingType = blob.type;
|
|
97
|
+
_this.recordingSize += blob.size;
|
|
98
|
+
data.recordedData = result.replace('data:video/webm;base64,', '');
|
|
99
|
+
console.log('======== SAVING RECORDING CHUNK =========');
|
|
100
|
+
console.log(data);
|
|
101
|
+
|
|
102
|
+
_SocketManager.default.emitEvent(_VCEventType.VCEventType.SAVE_RECORDING, data).then(function (data) {
|
|
103
|
+
console.log('===== SAVE RECORDING SUCCESS ======');
|
|
104
|
+
|
|
105
|
+
if (!_this.isRecording) {
|
|
106
|
+
console.log('======= STOPPING RECORDING =======', _this.meetingTitle);
|
|
107
|
+
var _data = {
|
|
108
|
+
meetingId: _this.meetingId,
|
|
109
|
+
userId: sessionStorage.getItem("username"),
|
|
110
|
+
name: _this.meetingTitle,
|
|
111
|
+
type: _this.recordingType,
|
|
112
|
+
size: _this.recordingSize,
|
|
113
|
+
sequenceNumber: _this.recordingSequence,
|
|
114
|
+
sessionId: _this.currentRecordingId
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
_SocketManager.default.emitEvent(_VCEventType.VCEventType.STOP_RECORDING, _data).catch(function (error) {});
|
|
118
|
+
}
|
|
119
|
+
}).catch(function (error) {
|
|
120
|
+
console.log('===== SAVE RECORDING ERROR ======');
|
|
124
121
|
});
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
_this.recordingSequence++;
|
|
125
|
+
} else {
|
|
126
|
+
console.log('no data to push');
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
_defineProperty(this, "recordMeeting", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
|
|
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
|
+
}
|
|
125
178
|
}
|
|
126
|
-
});
|
|
179
|
+
}, _callee2, null, [[1, 7]]);
|
|
180
|
+
})));
|
|
127
181
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
182
|
+
_defineProperty(this, "stopRecordingMeeting", function () {
|
|
183
|
+
try {
|
|
184
|
+
_this2.isRecording = false;
|
|
131
185
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
186
|
+
_SocketManager.default.emitEvent(_VCEventType.VCEventType.TOGGLE_RECORD_MEETING, {
|
|
187
|
+
roomId: _this2.meetingId,
|
|
188
|
+
isRecording: false
|
|
189
|
+
}).catch(function (error) {});
|
|
136
190
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
191
|
+
if (_this2.recorder && _this2.recorder.stream) {
|
|
192
|
+
if (_this2.recorder.stream.getVideoTracks().length > 0) {
|
|
193
|
+
_this2.recorder.stream.getVideoTracks()[0].stop();
|
|
194
|
+
}
|
|
141
195
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
196
|
+
if (_this2.recorder.state === 'recording') {
|
|
197
|
+
_this2.recorder.stop();
|
|
145
198
|
}
|
|
146
|
-
} catch (e) {
|
|
147
|
-
console.error(e);
|
|
148
199
|
}
|
|
149
|
-
})
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
200
|
+
} catch (e) {
|
|
201
|
+
console.error(e);
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
_defineProperty(this, "createMediaRecorder", function () {
|
|
206
|
+
return new Promise(function (resolve, reject) {
|
|
207
|
+
var videoConstraints = {
|
|
208
|
+
cursor: true,
|
|
209
|
+
audio: false,
|
|
210
|
+
mediaSource: "screen",
|
|
211
|
+
preferCurrentTab: true,
|
|
212
|
+
selfBrowserSurface: 'include',
|
|
213
|
+
systemAudio: 'exclude',
|
|
214
|
+
surfaceSwitching: 'exclude',
|
|
215
|
+
monitorTypeSurfaces: 'exclude'
|
|
216
|
+
};
|
|
217
|
+
var _this = _this2;
|
|
218
|
+
navigator.mediaDevices.getDisplayMedia(videoConstraints).then(function (stream) {
|
|
219
|
+
var options = {
|
|
220
|
+
mimeType: 'video/webm; codecs=vp9'
|
|
162
221
|
};
|
|
222
|
+
var audioContext = new AudioContext();
|
|
223
|
+
var mediaStreamAudioDestinationNode = new MediaStreamAudioDestinationNode(audioContext);
|
|
224
|
+
var tracks = [mediaStreamAudioDestinationNode.stream.getAudioTracks()[0], stream.getVideoTracks()[0]];
|
|
163
225
|
|
|
164
|
-
|
|
226
|
+
if (_this2.audioTracks.size > 0) {
|
|
227
|
+
var _iterator = _createForOfIteratorHelper(_this2.audioTracks.values()),
|
|
228
|
+
_step;
|
|
165
229
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
};
|
|
170
|
-
let audioContext = new AudioContext();
|
|
171
|
-
let mediaStreamAudioDestinationNode = new MediaStreamAudioDestinationNode(audioContext);
|
|
172
|
-
let tracks = [mediaStreamAudioDestinationNode.stream.getAudioTracks()[0], stream.getVideoTracks()[0]];
|
|
173
|
-
|
|
174
|
-
if (this.audioTracks.size > 0) {
|
|
175
|
-
for (const value of this.audioTracks.values()) {
|
|
230
|
+
try {
|
|
231
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
232
|
+
var value = _step.value;
|
|
176
233
|
tracks.push(value);
|
|
177
|
-
|
|
234
|
+
var mediaStreamAudioSourceNode = new MediaStreamAudioSourceNode(audioContext, {
|
|
178
235
|
mediaStream: new MediaStream([value])
|
|
179
236
|
});
|
|
180
237
|
mediaStreamAudioSourceNode.connect(mediaStreamAudioDestinationNode);
|
|
181
238
|
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
mediaStreamAudioSourceNode.connect(mediaStreamAudioDestinationNode);
|
|
239
|
+
} catch (err) {
|
|
240
|
+
_iterator.e(err);
|
|
241
|
+
} finally {
|
|
242
|
+
_iterator.f();
|
|
187
243
|
}
|
|
244
|
+
} else {
|
|
245
|
+
var _mediaStreamAudioSourceNode = new MediaStreamAudioSourceNode(audioContext, {
|
|
246
|
+
mediaStream: new MediaStream(tracks)
|
|
247
|
+
});
|
|
188
248
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
const recorder = new MediaRecorder(initialMediaStream, options);
|
|
192
|
-
recorder.ondataavailable = _this.handleRecordingDataAvailable;
|
|
193
|
-
|
|
194
|
-
recorder.onstop = e => {
|
|
195
|
-
_this.isRecording = false;
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
this.audioContext = audioContext;
|
|
199
|
-
this.mediaStreamAudioDestinationNode = mediaStreamAudioDestinationNode;
|
|
200
|
-
resolve(recorder);
|
|
201
|
-
}).catch(e => {
|
|
202
|
-
console.error(e);
|
|
203
|
-
reject(new Error(e.message));
|
|
204
|
-
});
|
|
205
|
-
});
|
|
206
|
-
});
|
|
249
|
+
_mediaStreamAudioSourceNode.connect(mediaStreamAudioDestinationNode);
|
|
250
|
+
}
|
|
207
251
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
this.recordingType = null;
|
|
213
|
-
this.recordingSize = null;
|
|
214
|
-
this.isRecording = false;
|
|
215
|
-
this.recorder = null;
|
|
216
|
-
this.audioTracks = new Map();
|
|
217
|
-
}
|
|
252
|
+
console.log('INIT WITH TRACKS : ', tracks);
|
|
253
|
+
var initialMediaStream = new MediaStream(tracks);
|
|
254
|
+
var recorder = new MediaRecorder(initialMediaStream, options);
|
|
255
|
+
recorder.ondataavailable = _this.handleRecordingDataAvailable;
|
|
218
256
|
|
|
219
|
-
|
|
257
|
+
recorder.onstop = function (e) {
|
|
258
|
+
_this.isRecording = false;
|
|
259
|
+
};
|
|
220
260
|
|
|
221
|
-
|
|
261
|
+
_this2.audioContext = audioContext;
|
|
262
|
+
_this2.mediaStreamAudioDestinationNode = mediaStreamAudioDestinationNode;
|
|
263
|
+
resolve(recorder);
|
|
264
|
+
}).catch(function (e) {
|
|
265
|
+
console.error(e);
|
|
266
|
+
reject(new Error(e.message));
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
this.meetingId = null;
|
|
272
|
+
this.meetingTitle = '';
|
|
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();
|
|
222
283
|
var _default = instance;
|
|
223
284
|
exports.default = _default;
|