@agilemotion/oui-react-js 1.4.5 → 1.4.7
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,11 @@ const VCRoomWorkspace = props => {
|
|
|
158
158
|
surfaceSwitching: 'exclude',
|
|
159
159
|
monitorTypeSurfaces: 'exclude'
|
|
160
160
|
};
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
161
|
+
|
|
162
|
+
_SocketManager.default.emitEvent(_VCEventType.VCEventType.CANCEL_SCREEN_SHARE, {
|
|
163
|
+
roomId: props.meetingId
|
|
164
|
+
}).then(async result => {
|
|
165
|
+
navigator.mediaDevices.getDisplayMedia(videoConstraints).then(async stream => {
|
|
165
166
|
const track = stream.getVideoTracks()[0];
|
|
166
167
|
|
|
167
168
|
track.onended = e => {
|
|
@@ -196,10 +197,10 @@ const VCRoomWorkspace = props => {
|
|
|
196
197
|
setShareScreenProducer(null);
|
|
197
198
|
});
|
|
198
199
|
props.onStartSharing();
|
|
199
|
-
}).catch(e =>
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
});
|
|
200
|
+
}).catch(e => {
|
|
201
|
+
props.onStopSharing();
|
|
202
|
+
});
|
|
203
|
+
}).catch(e => console.log('ERROR CANCELLING SCREEN SHARE : ', e));
|
|
203
204
|
};
|
|
204
205
|
|
|
205
206
|
const stopProducingScreenShare = async () => {
|