Browse Source

Merge pull request #614 from jitsi/update_strophe

Update strophe and use it via imports.
dev1
Saúl Ibarra Corretgé 8 years ago
parent
commit
3a890d5b2f

+ 2
- 1
JitsiConference.js View File

1
-/* global __filename, $, Strophe, Promise */
1
+/* global __filename, $, Promise */
2
+import { Strophe } from 'strophe.js';
2
 
3
 
3
 import AvgRTPStatsReporter from './modules/statistics/AvgRTPStatsReporter';
4
 import AvgRTPStatsReporter from './modules/statistics/AvgRTPStatsReporter';
4
 import ComponentsVersions from './modules/version/ComponentsVersions';
5
 import ComponentsVersions from './modules/version/ComponentsVersions';

+ 2
- 1
JitsiConferenceEventManager.js View File

1
-/* global __filename, Strophe */
1
+/* global __filename */
2
+import { Strophe } from 'strophe.js';
2
 
3
 
3
 import AuthenticationEvents
4
 import AuthenticationEvents
4
     from './service/authentication/AuthenticationEvents';
5
     from './service/authentication/AuthenticationEvents';

+ 3
- 1
JitsiParticipant.js View File

1
-/* global Strophe */
1
+
2
+import { Strophe } from 'strophe.js';
3
+
2
 import * as JitsiConferenceEvents from './JitsiConferenceEvents';
4
 import * as JitsiConferenceEvents from './JitsiConferenceEvents';
3
 import { ParticipantConnectionStatus }
5
 import { ParticipantConnectionStatus }
4
     from './modules/connectivity/ParticipantConnectionStatus';
6
     from './modules/connectivity/ParticipantConnectionStatus';

+ 4
- 2
modules/videosipgw/JitsiVideoSIPGWSession.js View File

1
-/* global $, $iq */
1
+/* global $ */
2
 import { getLogger } from 'jitsi-meet-logger';
2
 import { getLogger } from 'jitsi-meet-logger';
3
-const logger = getLogger(__filename);
3
+import { $iq } from 'strophe.js';
4
 
4
 
5
 import Listenable from '../util/Listenable';
5
 import Listenable from '../util/Listenable';
6
 
6
 
7
 import * as VideoSIPGWConstants from './VideoSIPGWConstants';
7
 import * as VideoSIPGWConstants from './VideoSIPGWConstants';
8
 
8
 
9
+const logger = getLogger(__filename);
10
+
9
 /**
11
 /**
10
  * The event name for current sip video session state changed.
12
  * The event name for current sip video session state changed.
11
  * @type {string} event name for sip video session state changed.
13
  * @type {string} event name for sip video session state changed.

+ 5
- 2
modules/xmpp/Caps.js View File

1
-/* global $, b64_sha1, Strophe */
1
+/* global $ */
2
+
3
+import { b64_sha1, Strophe } from 'strophe.js'; // eslint-disable-line camelcase
4
+
2
 import XMPPEvents from '../../service/xmpp/XMPPEvents';
5
 import XMPPEvents from '../../service/xmpp/XMPPEvents';
3
 import Listenable from '../util/Listenable';
6
 import Listenable from '../util/Listenable';
4
 
7
 
41
         if (!this.disco) {
44
         if (!this.disco) {
42
             throw new Error(
45
             throw new Error(
43
                 'Missing strophe-plugins '
46
                 'Missing strophe-plugins '
44
-                + '(disco and caps plugins are required)!');
47
+                + '(disco plugin is required)!');
45
         }
48
         }
46
 
49
 
47
         this.versionToCapabilities = Object.create(null);
50
         this.versionToCapabilities = Object.create(null);

+ 6
- 3
modules/xmpp/ChatRoom.js View File

1
-/* global $, $pres, $iq, $msg, __filename, Strophe */
1
+/* global $, __filename */
2
 
2
 
3
 import { getLogger } from 'jitsi-meet-logger';
3
 import { getLogger } from 'jitsi-meet-logger';
4
+import { $iq, $msg, $pres, Strophe } from 'strophe.js';
5
+
4
 import GlobalOnErrorHandler from '../util/GlobalOnErrorHandler';
6
 import GlobalOnErrorHandler from '../util/GlobalOnErrorHandler';
5
 import * as JitsiTranscriptionStatus from '../../JitsiTranscriptionStatus';
7
 import * as JitsiTranscriptionStatus from '../../JitsiTranscriptionStatus';
6
 import Listenable from '../util/Listenable';
8
 import Listenable from '../util/Listenable';
9
+import Settings from '../settings/Settings';
7
 import * as MediaType from '../../service/RTC/MediaType';
10
 import * as MediaType from '../../service/RTC/MediaType';
11
+import XMPPEvents from '../../service/xmpp/XMPPEvents';
12
+
8
 import Moderator from './moderator';
13
 import Moderator from './moderator';
9
 import Recorder from './recording';
14
 import Recorder from './recording';
10
-import Settings from '../settings/Settings';
11
-import XMPPEvents from '../../service/xmpp/XMPPEvents';
12
 
15
 
13
 const logger = getLogger(__filename);
16
 const logger = getLogger(__filename);
14
 
17
 

+ 6
- 3
modules/xmpp/JingleSessionPC.js View File

1
-/* global __filename, $, $iq, Strophe */
1
+/* global __filename, $ */
2
 
2
 
3
 import async from 'async';
3
 import async from 'async';
4
 import { getLogger } from 'jitsi-meet-logger';
4
 import { getLogger } from 'jitsi-meet-logger';
5
-import GlobalOnErrorHandler from '../util/GlobalOnErrorHandler';
5
+import { $iq, Strophe } from 'strophe.js';
6
+
6
 import JingleSession from './JingleSession';
7
 import JingleSession from './JingleSession';
8
+import * as JingleSessionState from './JingleSessionState';
7
 import SDP from './SDP';
9
 import SDP from './SDP';
8
 import SDPDiffer from './SDPDiffer';
10
 import SDPDiffer from './SDPDiffer';
9
 import SDPUtil from './SDPUtil';
11
 import SDPUtil from './SDPUtil';
10
 import SignalingLayerImpl from './SignalingLayerImpl';
12
 import SignalingLayerImpl from './SignalingLayerImpl';
13
+
11
 import Statistics from '../statistics/statistics';
14
 import Statistics from '../statistics/statistics';
12
 import XMPPEvents from '../../service/xmpp/XMPPEvents';
15
 import XMPPEvents from '../../service/xmpp/XMPPEvents';
13
-import * as JingleSessionState from './JingleSessionState';
16
+import GlobalOnErrorHandler from '../util/GlobalOnErrorHandler';
14
 
17
 
15
 const logger = getLogger(__filename);
18
 const logger = getLogger(__filename);
16
 
19
 

+ 3
- 1
modules/xmpp/moderator.js View File

1
-/* global $, $iq, Promise, Strophe */
1
+/* global $, Promise */
2
 
2
 
3
 const logger = require('jitsi-meet-logger').getLogger(__filename);
3
 const logger = require('jitsi-meet-logger').getLogger(__filename);
4
 
4
 
5
+import { $iq, Strophe } from 'strophe.js';
6
+
5
 const XMPPEvents = require('../../service/xmpp/XMPPEvents');
7
 const XMPPEvents = require('../../service/xmpp/XMPPEvents');
6
 const AuthenticationEvents
8
 const AuthenticationEvents
7
     = require('../../service/authentication/AuthenticationEvents');
9
     = require('../../service/authentication/AuthenticationEvents');

+ 5
- 2
modules/xmpp/recording.js View File

1
-/* global $, $iq */
1
+/* global $ */
2
 
2
 
3
 import { getLogger } from 'jitsi-meet-logger';
3
 import { getLogger } from 'jitsi-meet-logger';
4
-const logger = getLogger(__filename);
4
+import { $iq } from 'strophe.js';
5
+
5
 const XMPPEvents = require('../../service/xmpp/XMPPEvents');
6
 const XMPPEvents = require('../../service/xmpp/XMPPEvents');
6
 const JitsiRecorderErrors = require('../../JitsiRecorderErrors');
7
 const JitsiRecorderErrors = require('../../JitsiRecorderErrors');
7
 const GlobalOnErrorHandler = require('../util/GlobalOnErrorHandler');
8
 const GlobalOnErrorHandler = require('../util/GlobalOnErrorHandler');
8
 
9
 
10
+const logger = getLogger(__filename);
11
+
9
 /**
12
 /**
10
  * Extracts the error details from given error element/node.
13
  * Extracts the error details from given error element/node.
11
  *
14
  *

+ 5
- 7
modules/xmpp/strophe.emuc.js View File

1
-/* a simple MUC connection plugin
2
- * can only handle a single MUC room
3
- */
4
-
5
-/* global $, Strophe */
1
+/* global $ */
6
 
2
 
7
 import { getLogger } from 'jitsi-meet-logger';
3
 import { getLogger } from 'jitsi-meet-logger';
8
-const logger = getLogger(__filename);
4
+import { Strophe } from 'strophe.js';
9
 
5
 
10
 import ChatRoom from './ChatRoom';
6
 import ChatRoom from './ChatRoom';
11
 import { ConnectionPluginListenable } from './ConnectionPlugin';
7
 import { ConnectionPluginListenable } from './ConnectionPlugin';
12
 import XMPPEvents from '../../service/xmpp/XMPPEvents';
8
 import XMPPEvents from '../../service/xmpp/XMPPEvents';
13
 
9
 
10
+const logger = getLogger(__filename);
11
+
14
 /**
12
 /**
15
- *
13
+ * MUC connection plugin.
16
  */
14
  */
17
 class MucConnectionPlugin extends ConnectionPluginListenable {
15
 class MucConnectionPlugin extends ConnectionPluginListenable {
18
     /**
16
     /**

+ 6
- 3
modules/xmpp/strophe.jingle.js View File

1
-/* global $, $iq, __filename, Strophe */
1
+/* global $, __filename */
2
 
2
 
3
 import { getLogger } from 'jitsi-meet-logger';
3
 import { getLogger } from 'jitsi-meet-logger';
4
-const logger = getLogger(__filename);
4
+import { $iq, Strophe } from 'strophe.js';
5
 
5
 
6
-import JingleSessionPC from './JingleSessionPC';
7
 import XMPPEvents from '../../service/xmpp/XMPPEvents';
6
 import XMPPEvents from '../../service/xmpp/XMPPEvents';
8
 import GlobalOnErrorHandler from '../util/GlobalOnErrorHandler';
7
 import GlobalOnErrorHandler from '../util/GlobalOnErrorHandler';
9
 import RandomUtil from '../util/RandomUtil';
8
 import RandomUtil from '../util/RandomUtil';
10
 import Statistics from '../statistics/statistics';
9
 import Statistics from '../statistics/statistics';
10
+
11
+import JingleSessionPC from './JingleSessionPC';
11
 import ConnectionPlugin from './ConnectionPlugin';
12
 import ConnectionPlugin from './ConnectionPlugin';
12
 
13
 
14
+const logger = getLogger(__filename);
15
+
13
 // XXX Strophe is build around the idea of chaining function calls so allow long
16
 // XXX Strophe is build around the idea of chaining function calls so allow long
14
 // function call chains.
17
 // function call chains.
15
 /* eslint-disable newline-per-chained-call */
18
 /* eslint-disable newline-per-chained-call */

+ 2
- 1
modules/xmpp/strophe.logger.js View File

1
-/* global Strophe */
1
+import { Strophe } from 'strophe.js';
2
+
2
 import ConnectionPlugin from './ConnectionPlugin';
3
 import ConnectionPlugin from './ConnectionPlugin';
3
 
4
 
4
 /**
5
 /**

+ 6
- 4
modules/xmpp/strophe.ping.js View File

1
-/* global $iq, Strophe */
2
-
3
 import { getLogger } from 'jitsi-meet-logger';
1
 import { getLogger } from 'jitsi-meet-logger';
4
-const logger = getLogger(__filename);
2
+import { $iq, Strophe } from 'strophe.js';
5
 
3
 
6
-import ConnectionPlugin from './ConnectionPlugin';
7
 import GlobalOnErrorHandler from '../util/GlobalOnErrorHandler';
4
 import GlobalOnErrorHandler from '../util/GlobalOnErrorHandler';
8
 
5
 
6
+import ConnectionPlugin from './ConnectionPlugin';
7
+
8
+
9
+const logger = getLogger(__filename);
10
+
9
 /**
11
 /**
10
  * Ping every 10 sec
12
  * Ping every 10 sec
11
  */
13
  */

+ 4
- 2
modules/xmpp/strophe.rayo.js View File

1
-/* global $, $iq, Strophe */
1
+/* global $ */
2
 
2
 
3
 import { getLogger } from 'jitsi-meet-logger';
3
 import { getLogger } from 'jitsi-meet-logger';
4
-const logger = getLogger(__filename);
4
+import { $iq, Strophe } from 'strophe.js';
5
 
5
 
6
 import ConnectionPlugin from './ConnectionPlugin';
6
 import ConnectionPlugin from './ConnectionPlugin';
7
 
7
 
8
+const logger = getLogger(__filename);
9
+
8
 const RAYO_XMLNS = 'urn:xmpp:rayo:1';
10
 const RAYO_XMLNS = 'urn:xmpp:rayo:1';
9
 
11
 
10
 /**
12
 /**

+ 4
- 2
modules/xmpp/strophe.util.js View File

1
-/* global __filename, Strophe */
1
+/* global __filename */
2
 /**
2
 /**
3
  * Strophe logger implementation. Logs from level WARN and above.
3
  * Strophe logger implementation. Logs from level WARN and above.
4
  */
4
  */
5
 import { getLogger } from 'jitsi-meet-logger';
5
 import { getLogger } from 'jitsi-meet-logger';
6
-const logger = getLogger(__filename);
6
+import { Strophe } from 'strophe.js';
7
 
7
 
8
 import GlobalOnErrorHandler from '../util/GlobalOnErrorHandler';
8
 import GlobalOnErrorHandler from '../util/GlobalOnErrorHandler';
9
 
9
 
10
+const logger = getLogger(__filename);
11
+
10
 /**
12
 /**
11
  * This is the last HTTP error status captured from Strophe debug logs.
13
  * This is the last HTTP error status captured from Strophe debug logs.
12
  * The purpose of storing it is to distinguish between the network and
14
  * The purpose of storing it is to distinguish between the network and

+ 5
- 2
modules/xmpp/xmpp.js View File

1
-/* global $, Strophe */
1
+/* global $ */
2
 
2
 
3
 import { getLogger } from 'jitsi-meet-logger';
3
 import { getLogger } from 'jitsi-meet-logger';
4
-const logger = getLogger(__filename);
4
+import { Strophe } from 'strophe.js';
5
+import 'strophejs-plugin-disco';
5
 
6
 
6
 import RandomUtil from '../util/RandomUtil';
7
 import RandomUtil from '../util/RandomUtil';
7
 import * as JitsiConnectionErrors from '../../JitsiConnectionErrors';
8
 import * as JitsiConnectionErrors from '../../JitsiConnectionErrors';
16
 import Listenable from '../util/Listenable';
17
 import Listenable from '../util/Listenable';
17
 import Caps from './Caps';
18
 import Caps from './Caps';
18
 
19
 
20
+const logger = getLogger(__filename);
21
+
19
 /**
22
 /**
20
  *
23
  *
21
  * @param token
24
  * @param token

+ 2
- 2
package.json View File

23
     "sdp-interop": "0.1.12",
23
     "sdp-interop": "0.1.12",
24
     "sdp-simulcast": "0.2.1",
24
     "sdp-simulcast": "0.2.1",
25
     "sdp-transform": "2.3.0",
25
     "sdp-transform": "2.3.0",
26
-    "strophe": "1.2.4",
27
-    "strophejs-plugins": "0.0.7",
26
+    "strophe.js": "1.2.14",
27
+    "strophejs-plugin-disco": "0.0.2",
28
     "yaeti": "1.0.1"
28
     "yaeti": "1.0.1"
29
   },
29
   },
30
   "devDependencies": {
30
   "devDependencies": {

Loading…
Cancel
Save