@agilemotion/oui-react-js 1.4.4 → 1.4.6

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.
@@ -34,11 +34,14 @@ class SocketManager {
34
34
  _defineProperty(this, "emitEvent", (eventType, data) => {
35
35
  return new Promise((resolve, reject) => {
36
36
  if (this.socket) {
37
+ console.log("EMITTING EVENT : " + eventType);
37
38
  let response = this.socket.emit(eventType, data, data => {
39
+ console.log("EMITTING EVENT RESULT : " + eventType, data);
40
+
38
41
  if (data.status === 'SUCCESS') {
39
42
  resolve(data);
40
43
  } else {
41
- console.error("ERROR EMITTING EVENT : " + eventType);
44
+ console.log("ERROR EMITTING EVENT : " + eventType);
42
45
  reject(new Error(data.status));
43
46
  }
44
47
  });
@@ -53,7 +56,7 @@ class SocketManager {
53
56
  });
54
57
 
55
58
  _defineProperty(this, "init", async () => {
56
- let socket = _socket.default.connect(process.env.REACT_APP_SOCKET_SERVER_URL);
59
+ let socket = _socket.default.connect("https://svn.agilemotion.co.za");
57
60
 
58
61
  this.socket = socket;
59
62
  socket.on("connect", () => {
@@ -126,8 +129,11 @@ class SocketManager {
126
129
  }
127
130
 
128
131
  registerOnline() {
132
+ console.log('***** FETCHIN SOCKET MANAGER USER PROFILE *****');
129
133
  (0, _RestUtils.sendRequest)(_RestUtils.location + _ApplicationManager.default.getContextRoot() + '/auth/api/v1/user/find', response => {
130
134
  this.profile = response.profile;
135
+ console.log("PROFILE : ", response);
136
+ console.log("REGISTERING ONLINE");
131
137
  this.emitEvent(_SocketRequest.default.REGISTER_ONLINE, {
132
138
  user: {
133
139
  userId: response.username,
@@ -135,14 +141,18 @@ class SocketManager {
135
141
  },
136
142
  orgCode: response.profile
137
143
  }).then(data => {
144
+ console.log("REGISTERED ONLINE - " + response.username);
138
145
  this.connected = true;
139
146
  let event = this.createEvent();
140
147
 
141
148
  _VCEventManager.default.fireEvent(_EventType.default.SOCKET_CONNECT, event);
142
149
  }).catch(exp => {
143
- console.log(exp.message);
150
+ console.log(exp);
144
151
  });
145
- }, e => {});
152
+ }, e => {
153
+ console.log("ERROR FETCHING PROFILE");
154
+ console.log(e);
155
+ });
146
156
  }
147
157
 
148
158
  createEvent(data = null) {
@@ -572,6 +572,7 @@ const TrainingRoom = /*#__PURE__*/_react.default.memo( /*#__PURE__*/_react.defau
572
572
  setStartScreenSharing(false);
573
573
  },
574
574
  onStartSharing: () => {
575
+ alert('Strt sharing fireee');
575
576
  setScreenShared(true);
576
577
  setStartScreenSharing(false);
577
578
  },
@@ -158,10 +158,13 @@ const VCRoomWorkspace = props => {
158
158
  surfaceSwitching: 'exclude',
159
159
  monitorTypeSurfaces: 'exclude'
160
160
  };
161
- navigator.mediaDevices.getDisplayMedia(videoConstraints).then(async stream => {
162
- _SocketManager.default.emitEvent(_VCEventType.VCEventType.CANCEL_SCREEN_SHARE, {
163
- roomId: props.meetingId
164
- }).then(async result => {
161
+ alert('Cancelling screen share');
162
+
163
+ _SocketManager.default.emitEvent(_VCEventType.VCEventType.CANCEL_SCREEN_SHARE, {
164
+ roomId: props.meetingId
165
+ }).then(async result => {
166
+ navigator.mediaDevices.getDisplayMedia(videoConstraints).then(async stream => {
167
+ alert('Screen cancelled');
165
168
  const track = stream.getVideoTracks()[0];
166
169
 
167
170
  track.onended = e => {
@@ -195,11 +198,12 @@ const VCRoomWorkspace = props => {
195
198
  });
196
199
  setShareScreenProducer(null);
197
200
  });
201
+ alert('Sharing starting');
198
202
  props.onStartSharing();
199
- }).catch(e => console.log('ERROR CANCELLING SCREEN SHARE : ', e));
200
- }).catch(e => {
201
- props.onStopSharing();
202
- });
203
+ }).catch(e => {
204
+ props.onStopSharing();
205
+ });
206
+ }).catch(e => console.log('ERROR CANCELLING SCREEN SHARE : ', e));
203
207
  };
204
208
 
205
209
  const stopProducingScreenShare = async () => {
package/dist/js/Media.js CHANGED
@@ -44,15 +44,22 @@ class Media {
44
44
  askToJoin: calendarEvent.askToJoin,
45
45
  meetingId: calendarEvent.id
46
46
  }).then(result => {
47
+ console.log("***** JOIN MEETING RESPONSE *****", result);
47
48
  let outcome = result.outcome;
48
49
  resolve(outcome);
49
50
 
50
51
  if (outcome === _SocketResponse.default.JOIN_MEETING_PERMIT) {
51
52
  _Observable.default.fireEvent(_VCEventType.VCEventType.JOIN_MEETING_PERMIT, event);
52
53
  }
54
+ }).catch(e => {
55
+ console.log("***** JOIN MEETING ERROR *****");
56
+ console.log(e);
57
+ reject(e);
53
58
  });
54
59
  }
55
60
  } catch (e) {
61
+ console.log("***** REQUEST TO JOIN MEETING ERROR *****");
62
+ console.log(e);
56
63
  reject(e);
57
64
  }
58
65
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agilemotion/oui-react-js",
3
- "version": "1.4.4",
3
+ "version": "1.4.6",
4
4
  "babel": {
5
5
  "presets": [
6
6
  "@babel/preset-env",