Browse Source

fix(spot) adapt to API changes and fix remote screen-share

tags/v0.0.2
Duduman Bogdan Vlad 2 years ago
parent
commit
92a5738bbf
No account linked to committer's email address
2 changed files with 18 additions and 2 deletions
  1. 7
    0
      modules/proxyconnection/ProxyConnectionService.js
  2. 11
    2
      modules/xmpp/XmppConnection.js

+ 7
- 0
modules/proxyconnection/ProxyConnectionService.js View File

@@ -3,6 +3,7 @@ import $ from 'jquery';
3 3
 import { $iq } from 'strophe.js';
4 4
 
5 5
 import { MediaType } from '../../service/RTC/MediaType';
6
+import { getSourceNameForJitsiTrack } from '../../service/RTC/SignalingLayer';
6 7
 import { VideoType } from '../../service/RTC/VideoType';
7 8
 import RTC from '../RTC/RTC';
8 9
 
@@ -138,6 +139,12 @@ export default class ProxyConnectionService {
138 139
             receiveVideo: false
139 140
         });
140 141
 
142
+        localTracks.forEach((localTrack, localTrackIndex) => {
143
+            const localSourceNameTrack = getSourceNameForJitsiTrack('peer', localTrack.getType(), localTrackIndex);
144
+
145
+            localTrack.setSourceName(localSourceNameTrack);
146
+        });
147
+
141 148
         this._peerConnection.start(localTracks);
142 149
     }
143 150
 

+ 11
- 2
modules/xmpp/XmppConnection.js View File

@@ -237,10 +237,19 @@ export default class XmppConnection extends Listenable {
237 237
     /**
238 238
      * See {@link Strophe.Connection.addHandler}
239 239
      *
240
-     * @returns {void}
240
+     * @returns {Object} - handler for the connection.
241 241
      */
242 242
     addHandler(...args) {
243
-        this._stropheConn.addHandler(...args);
243
+        return this._stropheConn.addHandler(...args);
244
+    }
245
+
246
+    /**
247
+     * See {@link Strophe.Connection.deleteHandler}
248
+     *
249
+     * @returns {void}
250
+     */
251
+    deleteHandler(...args) {
252
+        this._stropheConn.deleteHandler(...args);
244 253
     }
245 254
 
246 255
     /* eslint-disable max-params */

Loading…
Cancel
Save