@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.
|
|
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.
|
|
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(
|
|
59
|
+
let socket = _socket.default.connect("https://svn.agilemotion.co.za");
|
|
59
60
|
|
|
60
61
|
this.socket = socket;
|
|
61
62
|
socket.on("connect", () => {
|
|
@@ -158,10 +158,13 @@ const VCRoomWorkspace = props => {
|
|
|
158
158
|
surfaceSwitching: 'exclude',
|
|
159
159
|
monitorTypeSurfaces: 'exclude'
|
|
160
160
|
};
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
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 =>
|
|
200
|
-
|
|
201
|
-
|
|
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 () => {
|