|
|
@@ -26,6 +26,9 @@ export default class ProxyConnectionService {
|
|
26
|
26
|
* video should be returned as a desktop stream. Defaults to false.
|
|
27
|
27
|
* @param {Object} [options.iceConfig] - The {@code RTCConfiguration} to use
|
|
28
|
28
|
* for the peer connection.
|
|
|
29
|
+ * @param {JitsiConnection} [options.jitsiConnection] - The
|
|
|
30
|
+ * {@code JitsiConnection} which will be used to fetch TURN credentials for
|
|
|
31
|
+ * the P2P connection.
|
|
29
|
32
|
* @param {Function} options.onRemoteStream - Callback to invoke when a
|
|
30
|
33
|
* remote video stream has been received and converted to a
|
|
31
|
34
|
* {@code JitsiLocakTrack}. The {@code JitsiLocakTrack} will be passed in.
|
|
|
@@ -34,12 +37,21 @@ export default class ProxyConnectionService {
|
|
34
|
37
|
* jid to send the message to and the message
|
|
35
|
38
|
*/
|
|
36
|
39
|
constructor(options = {}) {
|
|
|
40
|
+ const {
|
|
|
41
|
+ jitsiConnection,
|
|
|
42
|
+ ...otherOptions
|
|
|
43
|
+ } = options;
|
|
|
44
|
+
|
|
37
|
45
|
/**
|
|
38
|
46
|
* Holds a reference to the collection of all callbacks.
|
|
39
|
47
|
*
|
|
40
|
48
|
* @type {Object}
|
|
41
|
49
|
*/
|
|
42
|
|
- this._options = options;
|
|
|
50
|
+ this._options = {
|
|
|
51
|
+ iceConfig: jitsiConnection
|
|
|
52
|
+ && jitsiConnection.xmpp.connection.jingle.p2pIceConfig,
|
|
|
53
|
+ ...otherOptions
|
|
|
54
|
+ };
|
|
43
|
55
|
|
|
44
|
56
|
/**
|
|
45
|
57
|
* The active instance of {@code ProxyConnectionService}.
|