@agilemotion/oui-react-js 1.4.5 → 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,13 +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 => {
38
- console.error("EMITTING EVENT RESULT : " + eventType, data);
39
+ console.log("EMITTING EVENT RESULT : " + eventType, data);
39
40
 
40
41
  if (data.status === 'SUCCESS') {
41
42
  resolve(data);
42
43
  } else {
43
- console.error("ERROR EMITTING EVENT : " + eventType);
44
+ console.log("ERROR EMITTING EVENT : " + eventType);
44
45
  reject(new Error(data.status));
45
46
  }
46
47
  });
@@ -55,7 +56,7 @@ class SocketManager {
55
56
  });
56
57
 
57
58
  _defineProperty(this, "init", async () => {
58
- let socket = _socket.default.connect(process.env.REACT_APP_SOCKET_SERVER_URL);
59
+ let socket = _socket.default.connect("https://svn.agilemotion.co.za");
59
60
 
60
61
  this.socket = socket;
61
62
  socket.on("connect", () => {
@@ -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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agilemotion/oui-react-js",
3
- "version": "1.4.5",
3
+ "version": "1.4.6",
4
4
  "babel": {
5
5
  "presets": [
6
6
  "@babel/preset-env",