@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.
Files changed (219) hide show
  1. package/dist/ApplicationManager.js +675 -1044
  2. package/dist/BasicApp.js +7 -27
  3. package/dist/BasicAppHome.js +27 -101
  4. package/dist/DynamicJS.js +109 -197
  5. package/dist/InteractionPortalApp.js +7 -27
  6. package/dist/InteractionPortalAppHome.js +21 -87
  7. package/dist/InteractionPortalApp_old.js +60 -122
  8. package/dist/RestUtils.js +269 -410
  9. package/dist/TypedValue.js +20 -26
  10. package/dist/Utils.js +295 -481
  11. package/dist/WithRouter.js +9 -17
  12. package/dist/assets/jss/components/authNavbarStyle.js +168 -171
  13. package/dist/assets/jss/components/buttonStyle.js +2 -5
  14. package/dist/assets/jss/components/cardAvatarStyle.js +2 -5
  15. package/dist/assets/jss/components/cardBodyStyle.js +2 -5
  16. package/dist/assets/jss/components/cardFooterStyle.js +2 -5
  17. package/dist/assets/jss/components/cardHeaderStyle.js +20 -17
  18. package/dist/assets/jss/components/cardIconStyle.js +2 -5
  19. package/dist/assets/jss/components/cardStyle.js +2 -5
  20. package/dist/assets/jss/components/cardTextStyle.js +2 -5
  21. package/dist/assets/jss/components/customDropdownStyle.js +171 -173
  22. package/dist/assets/jss/components/customInputStyle.js +5 -13
  23. package/dist/assets/jss/components/dropdownStyle.js +71 -74
  24. package/dist/assets/jss/components/footerStyle.js +14 -23
  25. package/dist/assets/jss/components/headerLinksStyle.js +52 -53
  26. package/dist/assets/jss/components/headerStyle.js +68 -73
  27. package/dist/assets/jss/components/navbarLinksStyle.js +81 -74
  28. package/dist/assets/jss/components/navbarStyle.js +79 -84
  29. package/dist/assets/jss/components/sidebarStyle.js +438 -441
  30. package/dist/assets/jss/components/typographyStyle.js +5 -13
  31. package/dist/assets/jss/rootStyle.js +85 -151
  32. package/dist/assets/jss/views/layoutStyle.js +45 -51
  33. package/dist/assets/jss/views/loginBasicStyle.js +2 -5
  34. package/dist/assets/jss/views/loginBusinessPortalStyle.js +2 -5
  35. package/dist/assets/jss/views/loginStyle.js +80 -87
  36. package/dist/components/AlertBar.js +20 -75
  37. package/dist/components/AlertItem.js +13 -49
  38. package/dist/components/AlertTemplate.js +12 -18
  39. package/dist/components/Button.js +41 -112
  40. package/dist/components/Calendar.js +99 -208
  41. package/dist/components/ConfirmationDialog.js +13 -54
  42. package/dist/components/DataGrid.js +271 -695
  43. package/dist/components/DataGridColumn.js +24 -74
  44. package/dist/components/DataGridFilter.js +107 -245
  45. package/dist/components/DataGridHeading.js +34 -78
  46. package/dist/components/Dialog.js +37 -130
  47. package/dist/components/DocumentTemplateDesigner.js +16 -57
  48. package/dist/components/DocumentTemplateDesignerComponent.js +47 -141
  49. package/dist/components/DocumentTemplatePlaceholderDialog.js +34 -67
  50. package/dist/components/DocumentViewer.js +25 -65
  51. package/dist/components/DocumentViewerComponent.js +13 -44
  52. package/dist/components/ElementResizeHandler.js +148 -200
  53. package/dist/components/FileThumb.js +15 -56
  54. package/dist/components/Graph.js +98 -203
  55. package/dist/components/GraphNode.js +20 -61
  56. package/dist/components/HtmlPanel.js +38 -105
  57. package/dist/components/Icon.js +174 -253
  58. package/dist/components/LoadingIndicator.js +4 -11
  59. package/dist/components/LottieIcon.js +63 -60
  60. package/dist/components/PopupView.js +21 -60
  61. package/dist/components/Portlet.js +18 -60
  62. package/dist/components/RegularButton.js +34 -42
  63. package/dist/components/SignaturePanel.js +19 -67
  64. package/dist/components/SocketManager.js +133 -228
  65. package/dist/components/StepperTitleBar.js +48 -99
  66. package/dist/components/TabPage.js +30 -47
  67. package/dist/components/TabPanel.js +35 -122
  68. package/dist/components/TableCellContent.js +34 -98
  69. package/dist/components/TemplateDesigner.js +115 -230
  70. package/dist/components/TemplateItemEventHandler.js +298 -481
  71. package/dist/components/TemplateTable.js +117 -218
  72. package/dist/components/TitleBar.js +15 -53
  73. package/dist/components/Toolbar.js +44 -110
  74. package/dist/components/Tooltip.js +37 -56
  75. package/dist/components/Tree.js +50 -143
  76. package/dist/components/UseIsVisible.js +5 -25
  77. package/dist/components/card/Card.js +35 -39
  78. package/dist/components/card/CardAvatar.js +21 -32
  79. package/dist/components/card/CardBody.js +29 -36
  80. package/dist/components/card/CardFooter.js +26 -35
  81. package/dist/components/card/CardHeader.js +29 -36
  82. package/dist/components/card/CardIcon.js +15 -29
  83. package/dist/components/card/CardText.js +15 -29
  84. package/dist/components/customInput/CustomInput.js +38 -40
  85. package/dist/components/dashboard/FoldingSideTabDashboard.js +65 -184
  86. package/dist/components/dashboard/SideMenuModuleDashboard.js +67 -185
  87. package/dist/components/dashboard/TopMenuModuleDashboard.js +22 -63
  88. package/dist/components/dashboard/components/Header.js +15 -52
  89. package/dist/components/dashboard/components/LeftDrawer.js +9 -23
  90. package/dist/components/dashboard/components/UserIdentity.js +4 -12
  91. package/dist/components/dashboard/components/blackDashboard/fixedPlugin/FixedPlugin.js +115 -155
  92. package/dist/components/dashboard/components/blackDashboard/sidebar/FoldingTabSidebar.js +344 -419
  93. package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenu.js +15 -29
  94. package/dist/components/dashboard/components/blackDashboard/sidebar/ModuleMenuSidebar.js +405 -485
  95. package/dist/components/dashboard/components/portal/Timeline.js +3 -8
  96. package/dist/components/dashboard/components/portal/Workspace.js +4 -13
  97. package/dist/components/footer/Footer.js +23 -45
  98. package/dist/components/footer/HomeFooter.js +38 -78
  99. package/dist/components/form/AddressSearch.js +26 -76
  100. package/dist/components/form/AutoComplete.js +54 -168
  101. package/dist/components/form/BaseField.js +59 -189
  102. package/dist/components/form/Checkbox.js +11 -24
  103. package/dist/components/form/DatePicker.js +28 -82
  104. package/dist/components/form/FieldSet.js +84 -300
  105. package/dist/components/form/Form.js +206 -501
  106. package/dist/components/form/GridField.js +83 -243
  107. package/dist/components/form/IconField.js +10 -21
  108. package/dist/components/form/ImageEditor.js +98 -208
  109. package/dist/components/form/LabelField.js +13 -28
  110. package/dist/components/form/LookupField.js +36 -102
  111. package/dist/components/form/MultiFileUploadField.js +67 -134
  112. package/dist/components/form/RadioGroup.js +20 -57
  113. package/dist/components/form/Section.js +33 -118
  114. package/dist/components/form/SelectItem.js +36 -83
  115. package/dist/components/form/SignatureTemplateDesignerField.js +12 -26
  116. package/dist/components/form/Switch.js +11 -24
  117. package/dist/components/form/TextField.js +19 -55
  118. package/dist/components/form/TimePicker.js +18 -43
  119. package/dist/components/form/TransferList.js +76 -200
  120. package/dist/components/form/UploadField.js +134 -256
  121. package/dist/components/grid/GridContainer.js +10 -23
  122. package/dist/components/grid/GridItem.js +10 -23
  123. package/dist/components/layout/CollapsiblePanel.js +20 -59
  124. package/dist/components/layout/Layout.js +40 -149
  125. package/dist/components/layout/View.js +65 -195
  126. package/dist/components/layout/ViewContainer.js +13 -33
  127. package/dist/components/layout/ViewPort.js +14 -48
  128. package/dist/components/layout/Window.js +62 -135
  129. package/dist/components/layout/WindowViewPort.js +18 -63
  130. package/dist/components/media/ClosablePanel.js +9 -18
  131. package/dist/components/media/LobbyWaitingList.js +11 -17
  132. package/dist/components/media/MediaSoupHelper.js +173 -401
  133. package/dist/components/media/SideBarContent.js +17 -34
  134. package/dist/components/media/SocketRequest.js +7 -18
  135. package/dist/components/media/SocketResponse.js +5 -14
  136. package/dist/components/media/Timer.js +18 -54
  137. package/dist/components/media/Toolbar.js +97 -254
  138. package/dist/components/media/ToolbarButton.js +34 -95
  139. package/dist/components/media/Toolbar_bck.js +70 -186
  140. package/dist/components/media/Tracks.js +19 -33
  141. package/dist/components/media/TrainingRoom.js +121 -374
  142. package/dist/components/media/Transports.js +17 -29
  143. package/dist/components/media/VCEventManager.js +45 -116
  144. package/dist/components/media/VCEventType.js +82 -168
  145. package/dist/components/media/VCParticipantList.js +16 -51
  146. package/dist/components/media/VCParticipantListItem.js +44 -141
  147. package/dist/components/media/VCRoom.js +14 -58
  148. package/dist/components/media/VCRoomParticipant.js +235 -556
  149. package/dist/components/media/VCRoomRecorder.js +106 -204
  150. package/dist/components/media/VCRoomWorkspace.js +248 -584
  151. package/dist/components/media/Video.js +27 -112
  152. package/dist/components/media/VideoPlayer.js +23 -91
  153. package/dist/components/media/chat/ChatRoom.js +143 -361
  154. package/dist/components/media/chat/ChatRoomItem.js +17 -58
  155. package/dist/components/media/chat/ChatRoomList.js +15 -60
  156. package/dist/components/menu/CollapsibleMenu.js +22 -52
  157. package/dist/components/menu/MenuBars.js +50 -116
  158. package/dist/components/menu/MenuButton.js +53 -130
  159. package/dist/components/menu/MenuItem.js +11 -51
  160. package/dist/components/menu/MenuLink.js +13 -41
  161. package/dist/components/menu/PopupMenu.js +13 -25
  162. package/dist/components/navbars/AuthNavbar.js +21 -56
  163. package/dist/components/navbars/HomeNavbar.js +213 -290
  164. package/dist/components/navbars/PortalNavbar.js +26 -81
  165. package/dist/components/signatures/AgilitySignaturePanel.js +41 -135
  166. package/dist/components/signatures/AlertItem.js +14 -50
  167. package/dist/components/signatures/Card.js +6 -16
  168. package/dist/components/signatures/DocumentContainer.js +57 -165
  169. package/dist/components/signatures/ImageSignatureInput.js +64 -124
  170. package/dist/components/signatures/MenuButton.js +28 -63
  171. package/dist/components/signatures/Prompt.js +6 -41
  172. package/dist/components/signatures/ResponsiveTable.js +181 -370
  173. package/dist/components/signatures/SearchView.js +34 -112
  174. package/dist/components/signatures/SignatorySearch.js +11 -44
  175. package/dist/components/signatures/SignatorySearchForm.js +19 -50
  176. package/dist/components/signatures/SignatureInput.js +28 -91
  177. package/dist/components/signatures/SignatureInputProps.js +49 -144
  178. package/dist/components/signatures/SignatureTemplateDesigner.js +230 -430
  179. package/dist/components/signatures/Toolbar.js +99 -173
  180. package/dist/components/signatures/ViewUtils.js +207 -313
  181. package/dist/components/typography/Danger.js +6 -11
  182. package/dist/components/typography/Info.js +7 -11
  183. package/dist/components/typography/Link.js +6 -12
  184. package/dist/event/ActionHandlers.js +48 -87
  185. package/dist/event/Event.js +21 -25
  186. package/dist/event/EventListener.js +54 -48
  187. package/dist/event/EventType.js +18 -40
  188. package/dist/event/LoadDataActionHandler.js +10 -31
  189. package/dist/event/Observable.js +204 -396
  190. package/dist/event/RouteActionHandler.js +119 -171
  191. package/dist/event/ScriptActionHandler.js +10 -32
  192. package/dist/event/ServiceCallActionHandler.js +37 -64
  193. package/dist/event/SignalGraphActionHandler.js +9 -31
  194. package/dist/js/Addresses.js +23 -42
  195. package/dist/js/Calendar.js +41 -89
  196. package/dist/js/DynamicLib.js +11 -23
  197. package/dist/js/Media.js +80 -174
  198. package/dist/js/Validators.js +6 -12
  199. package/dist/js/Windows.js +22 -40
  200. package/dist/redux/store/ConfigureStore.js +12 -29
  201. package/dist/redux/store/DashboardStore.js +47 -120
  202. package/dist/redux/store/History.js +2 -5
  203. package/dist/redux/store/SecurityStore.js +22 -65
  204. package/dist/security/TokenManager.js +29 -53
  205. package/dist/theme-default.js +3 -8
  206. package/dist/view/Dashboard.js +140 -308
  207. package/dist/view/PortalDashboard.js +6 -13
  208. package/dist/view/Settings.js +3 -11
  209. package/dist/view/Views.js +15 -35
  210. package/dist/view/security/ChangePasswordBasic.js +41 -147
  211. package/dist/view/security/ForgotPassword.js +26 -106
  212. package/dist/view/security/ForgotPasswordBasic.js +22 -96
  213. package/dist/view/security/Login.js +29 -117
  214. package/dist/view/security/LoginBasic.js +28 -108
  215. package/dist/view/security/LoginInteractionPortal.js +28 -106
  216. package/dist/view/security/ResetPassword.js +25 -110
  217. package/dist/view/security/ResetPasswordBasic.js +39 -142
  218. package/dist/view/security/Security.js +14 -26
  219. 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
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
-
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
-
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); }
17
-
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; }
19
-
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); } }
21
-
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); }); }; }
23
-
24
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
25
-
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; }
27
-
28
- var VCRoomRecorder = function VCRoomRecorder() {
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
- _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, {
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(_this2.mediaStreamAudioDestinationNode);
34
+ mediaStreamAudioSourceNode.connect(this.mediaStreamAudioDestinationNode);
66
35
  }
67
- });
68
-
69
- _defineProperty(this, "removeTrack", function (id) {
70
- if (_this2.audioTracks.has(id)) {
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 : ' + _this2.recordingSequence);
78
- var blob = new Blob([e.data], {
44
+ console.log('ADDED CHUNK : ' + this.recordingSequence);
45
+ const blob = new Blob([e.data], {
79
46
  type: 'video/webm'
80
47
  });
81
- var data = {
48
+ const data = {
82
49
  userId: sessionStorage.getItem('username'),
83
- meetingId: _this2.meetingId,
84
- name: _this2.meetingTitle,
50
+ meetingId: this.meetingId,
51
+ name: this.meetingTitle,
85
52
  type: blob.type,
86
53
  size: blob.size,
87
- sequenceNumber: _this2.recordingSequence,
88
- sessionId: _this2.currentRecordingId
54
+ sequenceNumber: this.recordingSequence,
55
+ sessionId: this.currentRecordingId
89
56
  };
90
- var reader = new FileReader();
57
+ const reader = new FileReader();
91
58
  reader.readAsDataURL(blob);
92
- var _this = _this2;
93
-
59
+ let _this = this;
94
60
  reader.onload = function (evt) {
95
- var result = evt.target.result;
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
- var _data = {
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(function (error) {
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
- _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
- }
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
- _this2.isRecording = false;
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: _this2.meetingId,
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(function (error) {});
190
-
191
- if (_this2.recorder && _this2.recorder.stream) {
192
- if (_this2.recorder.stream.getVideoTracks().length > 0) {
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
- if (_this2.recorder.state === 'recording') {
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
- _defineProperty(this, "createMediaRecorder", function () {
206
- return new Promise(function (resolve, reject) {
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
- var _this = _this2;
218
- navigator.mediaDevices.getDisplayMedia(videoConstraints).then(function (stream) {
219
- var options = {
146
+ let _this = this;
147
+ navigator.mediaDevices.getDisplayMedia(videoConstraints).then(stream => {
148
+ const options = {
220
149
  mimeType: 'video/webm; codecs=vp9'
221
150
  };
222
- var audioContext = new AudioContext();
223
- var mediaStreamAudioDestinationNode = new MediaStreamAudioDestinationNode(audioContext);
224
- var tracks = [mediaStreamAudioDestinationNode.stream.getAudioTracks()[0], stream.getVideoTracks()[0]];
225
-
226
- if (_this2.audioTracks.size > 0) {
227
- var _iterator = _createForOfIteratorHelper(_this2.audioTracks.values()),
228
- _step;
229
-
230
- try {
231
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
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
- var _mediaStreamAudioSourceNode = new MediaStreamAudioSourceNode(audioContext, {
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
- var initialMediaStream = new MediaStream(tracks);
254
- var recorder = new MediaRecorder(initialMediaStream, options);
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
- _this2.audioContext = audioContext;
262
- _this2.mediaStreamAudioDestinationNode = mediaStreamAudioDestinationNode;
175
+ this.audioContext = audioContext;
176
+ this.mediaStreamAudioDestinationNode = mediaStreamAudioDestinationNode;
263
177
  resolve(recorder);
264
- }).catch(function (e) {
178
+ }).catch(e => {
265
179
  console.error(e);
266
180
  reject(new Error(e.message));
267
181
  });
268
182
  });
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();
283
- var _default = instance;
284
- exports.default = _default;
183
+ };
184
+ }
185
+ const instance = new VCRoomRecorder();
186
+ var _default = exports.default = instance;