瀏覽代碼

Update strophe and use it via imports.

dev1
hristoterezov 7 年之前
父節點
當前提交
73300752f5

+ 2
- 1
JitsiConference.js 查看文件

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

+ 2
- 1
JitsiConferenceEventManager.js 查看文件

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

+ 3
- 1
JitsiParticipant.js 查看文件

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

+ 4
- 2
modules/videosipgw/JitsiVideoSIPGWSession.js 查看文件

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

+ 5
- 2
modules/xmpp/Caps.js 查看文件

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

+ 6
- 3
modules/xmpp/ChatRoom.js 查看文件

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

+ 6
- 3
modules/xmpp/JingleSessionPC.js 查看文件

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

+ 3
- 1
modules/xmpp/moderator.js 查看文件

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

+ 5
- 2
modules/xmpp/recording.js 查看文件

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

+ 5
- 7
modules/xmpp/strophe.emuc.js 查看文件

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

+ 6
- 3
modules/xmpp/strophe.jingle.js 查看文件

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

+ 2
- 1
modules/xmpp/strophe.logger.js 查看文件

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

+ 6
- 4
modules/xmpp/strophe.ping.js 查看文件

@@ -1,11 +1,13 @@
1
-/* global $iq, Strophe */
2
-
3 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 4
 import GlobalOnErrorHandler from '../util/GlobalOnErrorHandler';
8 5
 
6
+import ConnectionPlugin from './ConnectionPlugin';
7
+
8
+
9
+const logger = getLogger(__filename);
10
+
9 11
 /**
10 12
  * Ping every 10 sec
11 13
  */

+ 4
- 2
modules/xmpp/strophe.rayo.js 查看文件

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

+ 4
- 2
modules/xmpp/strophe.util.js 查看文件

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

+ 5
- 2
modules/xmpp/xmpp.js 查看文件

@@ -1,7 +1,8 @@
1
-/* global $, Strophe */
1
+/* global $ */
2 2
 
3 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 7
 import RandomUtil from '../util/RandomUtil';
7 8
 import * as JitsiConnectionErrors from '../../JitsiConnectionErrors';
@@ -16,6 +17,8 @@ import initStropheLogger from './strophe.logger';
16 17
 import Listenable from '../util/Listenable';
17 18
 import Caps from './Caps';
18 19
 
20
+const logger = getLogger(__filename);
21
+
19 22
 /**
20 23
  *
21 24
  * @param token

+ 2
- 2
package.json 查看文件

@@ -23,8 +23,8 @@
23 23
     "sdp-interop": "0.1.12",
24 24
     "sdp-simulcast": "0.2.1",
25 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 28
     "yaeti": "1.0.1"
29 29
   },
30 30
   "devDependencies": {

Loading…
取消
儲存