Browse Source

feat: Moves jquery import in a common place.

master
damencho 3 months ago
parent
commit
f0c3d12b49

+ 8
- 8
JitsiConference.js View File

1
 import { getLogger } from '@jitsi/logger';
1
 import { getLogger } from '@jitsi/logger';
2
-import $ from 'jquery';
3
 import { isEqual } from 'lodash-es';
2
 import { isEqual } from 'lodash-es';
4
 import { Strophe } from 'strophe.js';
3
 import { Strophe } from 'strophe.js';
5
 
4
 
38
 import { isValidNumber, safeSubtract } from './modules/util/MathUtil';
37
 import { isValidNumber, safeSubtract } from './modules/util/MathUtil';
39
 import RandomUtil from './modules/util/RandomUtil';
38
 import RandomUtil from './modules/util/RandomUtil';
40
 import { getJitterDelay } from './modules/util/Retry';
39
 import { getJitterDelay } from './modules/util/Retry';
40
+import $ from './modules/util/XMLParser';
41
 import ComponentsVersions from './modules/version/ComponentsVersions';
41
 import ComponentsVersions from './modules/version/ComponentsVersions';
42
 import VideoSIPGW from './modules/videosipgw/VideoSIPGW';
42
 import VideoSIPGW from './modules/videosipgw/VideoSIPGW';
43
 import * as VideoSIPGWConstants from './modules/videosipgw/VideoSIPGWConstants';
43
 import * as VideoSIPGWConstants from './modules/videosipgw/VideoSIPGWConstants';
2108
     /**
2108
     /**
2109
      * Callback called by the Jingle plugin when 'session-answer' is received.
2109
      * Callback called by the Jingle plugin when 'session-answer' is received.
2110
      * @param {JingleSessionPC} session - The Jingle session for which an answer was received.
2110
      * @param {JingleSessionPC} session - The Jingle session for which an answer was received.
2111
-     * @param {jQuery} answer - A jQuery selector pointing to 'jingle' IQ element.
2111
+     * @param {Object} answer - An element pointing to 'jingle' IQ element.
2112
      */
2112
      */
2113
     onCallAccepted(session, answer) {
2113
     onCallAccepted(session, answer) {
2114
         if (this.p2pJingleSession === session) {
2114
         if (this.p2pJingleSession === session) {
2133
     /**
2133
     /**
2134
      * Callback called by the Jingle plugin when 'transport-info' is received.
2134
      * Callback called by the Jingle plugin when 'transport-info' is received.
2135
      * @param {JingleSessionPC} session - The Jingle session for which the IQ was received.
2135
      * @param {JingleSessionPC} session - The Jingle session for which the IQ was received.
2136
-     * @param {jQuery} transportInfo - A jQuery selector pointing to 'jingle' IQ element.
2136
+     * @param {Object} transportInfo - An element pointing to 'jingle' IQ element.
2137
      */
2137
      */
2138
     onTransportInfo(session, transportInfo) {
2138
     onTransportInfo(session, transportInfo) {
2139
         if (this.p2pJingleSession === session) {
2139
         if (this.p2pJingleSession === session) {
2168
     /**
2168
     /**
2169
      * Handles an incoming call event for the P2P Jingle session.
2169
      * Handles an incoming call event for the P2P Jingle session.
2170
      * @param {JingleSessionPC} jingleSession - The Jingle session for the incoming call.
2170
      * @param {JingleSessionPC} jingleSession - The Jingle session for the incoming call.
2171
-     * @param {jQuery} jingleOffer - A jQuery selector pointing to 'jingle' IQ element containing the offer.
2171
+     * @param {Object} jingleOffer - An element pointing to 'jingle' IQ element containing the offer.
2172
      * @private
2172
      * @private
2173
      */
2173
      */
2174
     _onIncomingCallP2P(jingleSession, jingleOffer) {
2174
     _onIncomingCallP2P(jingleSession, jingleOffer) {
2216
     /**
2216
     /**
2217
      * Handles an incoming call event.
2217
      * Handles an incoming call event.
2218
      * @param {JingleSessionPC} jingleSession - The Jingle session for the incoming call.
2218
      * @param {JingleSessionPC} jingleSession - The Jingle session for the incoming call.
2219
-     * @param {jQuery} jingleOffer - A jQuery selector pointing to 'jingle' IQ element containing the offer.
2219
+     * @param {Object} jingleOffer - An element pointing to 'jingle' IQ element containing the offer.
2220
      * @param {number} now - The timestamp when the call was received.
2220
      * @param {number} now - The timestamp when the call was received.
2221
      */
2221
      */
2222
     onIncomingCall(jingleSession, jingleOffer, now) {
2222
     onIncomingCall(jingleSession, jingleOffer, now) {
2243
     /**
2243
     /**
2244
      * Accepts an incoming call event for the JVB Jingle session.
2244
      * Accepts an incoming call event for the JVB Jingle session.
2245
      * @param {JingleSessionPC} jingleSession - The Jingle session for the incoming call.
2245
      * @param {JingleSessionPC} jingleSession - The Jingle session for the incoming call.
2246
-     * @param {jQuery} jingleOffer - A jQuery selector pointing to 'jingle' IQ element containing the offer.
2246
+     * @param {Object} jingleOffer - An element pointing to 'jingle' IQ element containing the offer.
2247
      * @param {number} now - The timestamp when the call was received.
2247
      * @param {number} now - The timestamp when the call was received.
2248
      * @private
2248
      * @private
2249
      */
2249
      */
2338
     /**
2338
     /**
2339
      * Sets the BridgeChannel.
2339
      * Sets the BridgeChannel.
2340
      *
2340
      *
2341
-     * @param {jQuery} offerIq - A jQuery selector pointing to the jingle element of
2341
+     * @param {Object} offerIq - An element pointing to the jingle element of
2342
      * the offer IQ which may carry the WebSocket URL for the 'websocket'
2342
      * the offer IQ which may carry the WebSocket URL for the 'websocket'
2343
      * BridgeChannel mode.
2343
      * BridgeChannel mode.
2344
      * @param {TraceablePeerConnection} pc - The peer connection which will be used
2344
      * @param {TraceablePeerConnection} pc - The peer connection which will be used
3033
     /**
3033
     /**
3034
      * Accepts an incoming P2P Jingle call.
3034
      * Accepts an incoming P2P Jingle call.
3035
      * @param {JingleSessionPC} jingleSession - The Jingle session instance.
3035
      * @param {JingleSessionPC} jingleSession - The Jingle session instance.
3036
-     * @param {jQuery} jingleOffer - A jQuery selector pointing to 'jingle' IQ element containing the offer.
3036
+     * @param {Object} jingleOffer - An element pointing to 'jingle' IQ element containing the offer.
3037
      * @private
3037
      * @private
3038
      */
3038
      */
3039
     _acceptP2PIncomingCall(jingleSession, jingleOffer) {
3039
     _acceptP2PIncomingCall(jingleSession, jingleOffer) {

+ 3
- 3
modules/proxyconnection/ProxyConnectionPC.js View File

332
      * The passed in jingle element should contain an SDP answer to a previously
332
      * The passed in jingle element should contain an SDP answer to a previously
333
      * sent SDP offer.
333
      * sent SDP offer.
334
      *
334
      *
335
-     * @param {Object} $jingle - The jingle element wrapped in jQuery.
335
+     * @param {Object} $jingle - The jingle element.
336
      * @private
336
      * @private
337
      * @returns {void}
337
      * @returns {void}
338
      */
338
      */
350
      * Callback invoked in response to a request to start a proxy connection.
350
      * Callback invoked in response to a request to start a proxy connection.
351
      * The passed in jingle element should contain an SDP offer.
351
      * The passed in jingle element should contain an SDP offer.
352
      *
352
      *
353
-     * @param {Object} $jingle - The jingle element wrapped in jQuery.
353
+     * @param {Object} $jingle - The jingle element.
354
      * @private
354
      * @private
355
      * @returns {void}
355
      * @returns {void}
356
      */
356
      */
404
      * Callback invoked in response to ICE candidates from the remote peer.
404
      * Callback invoked in response to ICE candidates from the remote peer.
405
      * The passed in jingle element should contain an ICE candidate.
405
      * The passed in jingle element should contain an ICE candidate.
406
      *
406
      *
407
-     * @param {Object} $jingle - The jingle element wrapped in jQuery.
407
+     * @param {Object} $jingle - The jingle element.
408
      * @private
408
      * @private
409
      * @returns {void}
409
      * @returns {void}
410
      */
410
      */

+ 3
- 3
modules/proxyconnection/ProxyConnectionService.js View File

1
 import { getLogger } from '@jitsi/logger';
1
 import { getLogger } from '@jitsi/logger';
2
-import $ from 'jquery';
3
 import { $iq } from 'strophe.js';
2
 import { $iq } from 'strophe.js';
4
 
3
 
4
+import $ from '../../modules/util/XMLParser';
5
 import { MediaType } from '../../service/RTC/MediaType';
5
 import { MediaType } from '../../service/RTC/MediaType';
6
 import { getSourceNameForJitsiTrack } from '../../service/RTC/SignalingLayer';
6
 import { getSourceNameForJitsiTrack } from '../../service/RTC/SignalingLayer';
7
 import { VideoType } from '../../service/RTC/VideoType';
7
 import { VideoType } from '../../service/RTC/VideoType';
162
     }
162
     }
163
 
163
 
164
     /**
164
     /**
165
-     * Transforms a stringified xML into a XML wrapped in jQuery.
165
+     * Transforms a stringified xML into a XML element.
166
      *
166
      *
167
      * @param {string} xml - The XML in string form.
167
      * @param {string} xml - The XML in string form.
168
      * @private
168
      * @private
169
-     * @returns {Object|null} A jQuery version of the xml. Null will be returned
169
+     * @returns {Object|null} An element version of the xml. Null will be returned
170
      * if an error is encountered during transformation.
170
      * if an error is encountered during transformation.
171
      */
171
      */
172
     _convertStringToXML(xml) {
172
     _convertStringToXML(xml) {

+ 2
- 1
modules/sdp/SDP.js View File

1
-import $ from 'jquery';
1
+
2
 import { cloneDeep } from 'lodash-es';
2
 import { cloneDeep } from 'lodash-es';
3
 import transform from 'sdp-transform';
3
 import transform from 'sdp-transform';
4
 import { Strophe } from 'strophe.js';
4
 import { Strophe } from 'strophe.js';
8
 import { SSRC_GROUP_SEMANTICS } from '../../service/RTC/StandardVideoQualitySettings';
8
 import { SSRC_GROUP_SEMANTICS } from '../../service/RTC/StandardVideoQualitySettings';
9
 import { XEP } from '../../service/xmpp/XMPPExtensioProtocols';
9
 import { XEP } from '../../service/xmpp/XMPPExtensioProtocols';
10
 import browser from '../browser';
10
 import browser from '../browser';
11
+import $ from '../util/XMLParser';
11
 
12
 
12
 import SDPUtil from './SDPUtil';
13
 import SDPUtil from './SDPUtil';
13
 
14
 

+ 1
- 1
modules/sdp/SDP.spec.js View File

1
-import $ from 'jquery';
2
 import { $iq } from 'strophe.js';
1
 import { $iq } from 'strophe.js';
3
 
2
 
4
 import FeatureFlags from '../flags/FeatureFlags';
3
 import FeatureFlags from '../flags/FeatureFlags';
5
 import { expandSourcesFromJson } from '../xmpp/JingleHelperFunctions';
4
 import { expandSourcesFromJson } from '../xmpp/JingleHelperFunctions';
5
+import $ from '../util/XMLParser';
6
 
6
 
7
 import SDP from './SDP';
7
 import SDP from './SDP';
8
 
8
 

+ 3
- 0
modules/util/XMLParser.ts View File

1
+import $ from 'jquery';
2
+
3
+export default $;

+ 1
- 1
modules/xmpp/Caps.js View File

1
-import $ from 'jquery';
2
 import { Strophe } from 'strophe.js'; // eslint-disable-line camelcase
1
 import { Strophe } from 'strophe.js'; // eslint-disable-line camelcase
3
 
2
 
4
 import { XMPPEvents } from '../../service/xmpp/XMPPEvents';
3
 import { XMPPEvents } from '../../service/xmpp/XMPPEvents';
5
 import Listenable from '../util/Listenable';
4
 import Listenable from '../util/Listenable';
5
+import $ from '../util/XMLParser';
6
 
6
 
7
 import sha1 from './sha1';
7
 import sha1 from './sha1';
8
 
8
 

+ 1
- 1
modules/xmpp/ChatRoom.js View File

1
 import { getLogger } from '@jitsi/logger';
1
 import { getLogger } from '@jitsi/logger';
2
 import emojiRegex from 'emoji-regex';
2
 import emojiRegex from 'emoji-regex';
3
-import $ from 'jquery';
4
 import { isEqual } from 'lodash-es';
3
 import { isEqual } from 'lodash-es';
5
 import { $iq, $msg, $pres, Strophe } from 'strophe.js';
4
 import { $iq, $msg, $pres, Strophe } from 'strophe.js';
6
 import { v4 as uuidv4 } from 'uuid';
5
 import { v4 as uuidv4 } from 'uuid';
15
 import EventEmitterForwarder from '../util/EventEmitterForwarder';
14
 import EventEmitterForwarder from '../util/EventEmitterForwarder';
16
 import Listenable from '../util/Listenable';
15
 import Listenable from '../util/Listenable';
17
 import { getJitterDelay } from '../util/Retry';
16
 import { getJitterDelay } from '../util/Retry';
17
+import $ from '../util/XMLParser';
18
 
18
 
19
 import AVModeration from './AVModeration';
19
 import AVModeration from './AVModeration';
20
 import BreakoutRooms from './BreakoutRooms';
20
 import BreakoutRooms from './BreakoutRooms';

+ 1
- 1
modules/xmpp/JingleHelperFunctions.ts View File

1
 import { safeJsonParse } from '@jitsi/js-utils/json';
1
 import { safeJsonParse } from '@jitsi/js-utils/json';
2
 import { getLogger } from '@jitsi/logger';
2
 import { getLogger } from '@jitsi/logger';
3
-import $ from 'jquery';
4
 import { $build } from 'strophe.js';
3
 import { $build } from 'strophe.js';
5
 
4
 
6
 import { MediaType } from '../../service/RTC/MediaType';
5
 import { MediaType } from '../../service/RTC/MediaType';
7
 import { SSRC_GROUP_SEMANTICS } from '../../service/RTC/StandardVideoQualitySettings';
6
 import { SSRC_GROUP_SEMANTICS } from '../../service/RTC/StandardVideoQualitySettings';
8
 import { VideoType } from '../../service/RTC/VideoType';
7
 import { VideoType } from '../../service/RTC/VideoType';
9
 import { XEP } from '../../service/xmpp/XMPPExtensioProtocols';
8
 import { XEP } from '../../service/xmpp/XMPPExtensioProtocols';
9
+import $ from '../util/XMLParser';
10
 
10
 
11
 const logger = getLogger('modules/xmpp/JingleHelperFunctions');
11
 const logger = getLogger('modules/xmpp/JingleHelperFunctions');
12
 
12
 

+ 7
- 7
modules/xmpp/JingleSessionPC.js View File

1
 import { getLogger } from '@jitsi/logger';
1
 import { getLogger } from '@jitsi/logger';
2
-import $ from 'jquery';
3
 import { isEqual } from 'lodash-es';
2
 import { isEqual } from 'lodash-es';
4
 import { $build, $iq, Strophe } from 'strophe.js';
3
 import { $build, $iq, Strophe } from 'strophe.js';
5
 
4
 
23
 import SDPUtil from '../sdp/SDPUtil';
22
 import SDPUtil from '../sdp/SDPUtil';
24
 import Statistics from '../statistics/statistics';
23
 import Statistics from '../statistics/statistics';
25
 import AsyncQueue, { ClearedQueueError } from '../util/AsyncQueue';
24
 import AsyncQueue, { ClearedQueueError } from '../util/AsyncQueue';
25
+import $ from '../util/XMLParser';
26
 
26
 
27
 import browser from './../browser';
27
 import browser from './../browser';
28
 import JingleSession from './JingleSession';
28
 import JingleSession from './JingleSession';
113
 export default class JingleSessionPC extends JingleSession {
113
 export default class JingleSessionPC extends JingleSession {
114
     /**
114
     /**
115
      * Parses 'senders' attribute of the video content.
115
      * Parses 'senders' attribute of the video content.
116
-     * @param {jQuery} jingleContents
116
+     * @param {Object} jingleContents
117
      * @return {string|null} one of the values of content "senders" attribute
117
      * @return {string|null} one of the values of content "senders" attribute
118
      * defined by Jingle. If there is no "senders" attribute or if the value is
118
      * defined by Jingle. If there is no "senders" attribute or if the value is
119
      * invalid then <tt>null</tt> will be returned.
119
      * invalid then <tt>null</tt> will be returned.
140
      * Parses the source-name and max frame height value of the 'content-modify' IQ when source-name signaling
140
      * Parses the source-name and max frame height value of the 'content-modify' IQ when source-name signaling
141
      * is enabled.
141
      * is enabled.
142
      *
142
      *
143
-     * @param {jQuery} jingleContents - A jQuery selector pointing to the '>jingle' element.
143
+     * @param {Object} jingleContents - An element pointing to the '>jingle' element.
144
      * @returns {Object|null}
144
      * @returns {Object|null}
145
      */
145
      */
146
     static parseSourceMaxFrameHeight(jingleContents) {
146
     static parseSourceMaxFrameHeight(jingleContents) {
503
      * Takes in a jingle offer iq, returns the new sdp offer that can be set as remote description in the
503
      * Takes in a jingle offer iq, returns the new sdp offer that can be set as remote description in the
504
      * peerconnection.
504
      * peerconnection.
505
      *
505
      *
506
-     * @param {jquery xml element} offerIq the incoming offer.
506
+     * @param {Object} offerIq the incoming offer.
507
      * @returns {SDP object} the jingle offer translated to SDP.
507
      * @returns {SDP object} the jingle offer translated to SDP.
508
      * @private
508
      * @private
509
      */
509
      */
529
     /**
529
     /**
530
      * Parses the SSRC information from the source-add/source-remove element passed and updates the SSRC owners.
530
      * Parses the SSRC information from the source-add/source-remove element passed and updates the SSRC owners.
531
      *
531
      *
532
-     * @param {jquery xml element} sourceElement the source-add/source-remove element from jingle.
532
+     * @param {Object} sourceElement the source-add/source-remove element from jingle.
533
      * @param {boolean} isAdd true if the sources are being added, false if they are to be removed.
533
      * @param {boolean} isAdd true if the sources are being added, false if they are to be removed.
534
      * @returns {Map<string, Object>} - The map of source name to ssrcs, msid and groups.
534
      * @returns {Map<string, Object>} - The map of source name to ssrcs, msid and groups.
535
      */
535
      */
966
     /**
966
     /**
967
      * Accepts incoming Jingle 'session-initiate' and should send 'session-accept' in result.
967
      * Accepts incoming Jingle 'session-initiate' and should send 'session-accept' in result.
968
      *
968
      *
969
-     * @param jingleOffer jQuery selector pointing to the jingle element of the offer IQ
969
+     * @param jingleOffer element pointing to the jingle element of the offer IQ
970
      * @param success callback called when we accept incoming session successfully and receive RESULT packet to
970
      * @param success callback called when we accept incoming session successfully and receive RESULT packet to
971
      * 'session-accept' sent.
971
      * 'session-accept' sent.
972
      * @param failure function(error) called if for any reason we fail to accept the incoming offer. 'error' argument
972
      * @param failure function(error) called if for any reason we fail to accept the incoming offer. 'error' argument
2128
      * This is a setRemoteDescription/setLocalDescription cycle which starts at converting Strophe Jingle IQ into
2128
      * This is a setRemoteDescription/setLocalDescription cycle which starts at converting Strophe Jingle IQ into
2129
      * remote offer SDP. Once converted, setRemoteDescription, createAnswer and setLocalDescription calls follow.
2129
      * remote offer SDP. Once converted, setRemoteDescription, createAnswer and setLocalDescription calls follow.
2130
      *
2130
      *
2131
-     * @param jingleOfferAnswerIq jQuery selector pointing to the jingle element of the offer (or answer) IQ
2131
+     * @param jingleOfferAnswerIq element pointing to the jingle element of the offer (or answer) IQ
2132
      * @param success callback called when sRD/sLD cycle finishes successfully.
2132
      * @param success callback called when sRD/sLD cycle finishes successfully.
2133
      * @param failure callback called with an error object as an argument if we fail at any point during setRD,
2133
      * @param failure callback called with an error object as an argument if we fail at any point during setRD,
2134
      * createAnswer, setLD.
2134
      * createAnswer, setLD.

+ 2
- 3
modules/xmpp/JingleSessionPC.spec.js View File

1
-import $ from 'jquery';
2
-
3
 import { MockRTC } from '../RTC/MockClasses';
1
 import { MockRTC } from '../RTC/MockClasses';
2
+import $ from '../util/XMLParser';
4
 
3
 
5
 import JingleSessionPC from './JingleSessionPC';
4
 import JingleSessionPC from './JingleSessionPC';
6
 import * as JingleSessionState from './JingleSessionState';
5
 import * as JingleSessionState from './JingleSessionState';
9
 
8
 
10
 /**
9
 /**
11
  * Creates 'content-modify' Jingle IQ.
10
  * Creates 'content-modify' Jingle IQ.
12
- * @returns {jQuery}
11
+ * @returns {Object}
13
  */
12
  */
14
 function createContentModifyForSourceNames() {
13
 function createContentModifyForSourceNames() {
15
     const modifyContentsIq = $.parseXML(
14
     const modifyContentsIq = $.parseXML(

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

1
 /* eslint-disable newline-per-chained-call */
1
 /* eslint-disable newline-per-chained-call */
2
 import { getLogger } from '@jitsi/logger';
2
 import { getLogger } from '@jitsi/logger';
3
-import $ from 'jquery';
4
 import { $iq } from 'strophe.js';
3
 import { $iq } from 'strophe.js';
5
 
4
 
6
 import { CONFERENCE_REQUEST_FAILED, NOT_LIVE_ERROR } from '../../JitsiConnectionErrors';
5
 import { CONFERENCE_REQUEST_FAILED, NOT_LIVE_ERROR } from '../../JitsiConnectionErrors';
7
 import { CONNECTION_FAILED, CONNECTION_REDIRECTED } from '../../JitsiConnectionEvents';
6
 import { CONNECTION_FAILED, CONNECTION_REDIRECTED } from '../../JitsiConnectionEvents';
8
 import Settings from '../settings/Settings';
7
 import Settings from '../settings/Settings';
9
 import Listenable from '../util/Listenable';
8
 import Listenable from '../util/Listenable';
9
+import $ from '../util/XMLParser';
10
 
10
 
11
 const AuthenticationEvents
11
 const AuthenticationEvents
12
     = require('../../service/authentication/AuthenticationEvents');
12
     = require('../../service/authentication/AuthenticationEvents');

+ 1
- 1
modules/xmpp/strophe.emuc.js View File

1
 import { getLogger } from '@jitsi/logger';
1
 import { getLogger } from '@jitsi/logger';
2
-import $ from 'jquery';
3
 import { Strophe } from 'strophe.js';
2
 import { Strophe } from 'strophe.js';
4
 
3
 
5
 import { CONNECTION_REDIRECTED } from '../../JitsiConnectionEvents';
4
 import { CONNECTION_REDIRECTED } from '../../JitsiConnectionEvents';
6
 import { XMPPEvents } from '../../service/xmpp/XMPPEvents';
5
 import { XMPPEvents } from '../../service/xmpp/XMPPEvents';
6
+import $ from '../util/XMLParser';
7
 
7
 
8
 import ChatRoom from './ChatRoom';
8
 import ChatRoom from './ChatRoom';
9
 import { ConnectionPluginListenable } from './ConnectionPlugin';
9
 import { ConnectionPluginListenable } from './ConnectionPlugin';

+ 1
- 1
modules/xmpp/strophe.jingle.js View File

1
 import { getLogger } from '@jitsi/logger';
1
 import { getLogger } from '@jitsi/logger';
2
-import $ from 'jquery';
3
 import { cloneDeep } from 'lodash-es';
2
 import { cloneDeep } from 'lodash-es';
4
 import { $iq, Strophe } from 'strophe.js';
3
 import { $iq, Strophe } from 'strophe.js';
5
 
4
 
6
 import { XMPPEvents } from '../../service/xmpp/XMPPEvents';
5
 import { XMPPEvents } from '../../service/xmpp/XMPPEvents';
7
 import RandomUtil from '../util/RandomUtil';
6
 import RandomUtil from '../util/RandomUtil';
7
+import $ from '../util/XMLParser';
8
 
8
 
9
 import ConnectionPlugin from './ConnectionPlugin';
9
 import ConnectionPlugin from './ConnectionPlugin';
10
 import { expandSourcesFromJson } from './JingleHelperFunctions';
10
 import { expandSourcesFromJson } from './JingleHelperFunctions';

+ 2
- 1
modules/xmpp/strophe.rayo.ts View File

1
 import { getLogger } from '@jitsi/logger';
1
 import { getLogger } from '@jitsi/logger';
2
-import $ from 'jquery';
3
 import { $iq, type Connection } from 'strophe.js';
2
 import { $iq, type Connection } from 'strophe.js';
4
 
3
 
4
+import $ from '../util/XMLParser';
5
+
5
 import ConnectionPlugin from './ConnectionPlugin';
6
 import ConnectionPlugin from './ConnectionPlugin';
6
 
7
 
7
 const logger = getLogger('modules/xmpp/strophe.rayo');
8
 const logger = getLogger('modules/xmpp/strophe.rayo');

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

1
 import { safeJsonParse } from '@jitsi/js-utils/json';
1
 import { safeJsonParse } from '@jitsi/js-utils/json';
2
 import { getLogger } from '@jitsi/logger';
2
 import { getLogger } from '@jitsi/logger';
3
-import $ from 'jquery';
4
 import { unescape } from 'lodash-es';
3
 import { unescape } from 'lodash-es';
5
 import { $msg, Strophe } from 'strophe.js';
4
 import { $msg, Strophe } from 'strophe.js';
6
 
5
 
14
 import Statistics from '../statistics/statistics';
13
 import Statistics from '../statistics/statistics';
15
 import Listenable from '../util/Listenable';
14
 import Listenable from '../util/Listenable';
16
 import RandomUtil from '../util/RandomUtil';
15
 import RandomUtil from '../util/RandomUtil';
16
+import $ from '../util/XMLParser';
17
 
17
 
18
 import Caps, { parseDiscoInfo } from './Caps';
18
 import Caps, { parseDiscoInfo } from './Caps';
19
 import { IDENTITY_TYPE as FILE_SHARING_IDENTITY_TYPE } from './FileSharing';
19
 import { IDENTITY_TYPE as FILE_SHARING_IDENTITY_TYPE } from './FileSharing';

+ 2
- 2
types/hand-crafted/JitsiConference.d.ts View File

83
   onUserRoleChanged: ( jid: string, role: string ) => void;
83
   onUserRoleChanged: ( jid: string, role: string ) => void;
84
   onDisplayNameChanged: ( jid: string, displayName: string ) => void;
84
   onDisplayNameChanged: ( jid: string, displayName: string ) => void;
85
   onRemoteTrackAdded: ( track: JitsiRemoteTrack ) => void;
85
   onRemoteTrackAdded: ( track: JitsiRemoteTrack ) => void;
86
-  onCallAccepted: ( session: unknown, answer: JQuery ) => void; // TODO: answer is a jQuery object, unknown = JingleSessionPC which doesn't exist
87
-  onTransportInfo: ( session: unknown, transportInfo: JQuery ) => void; // TODO: transportInfo is a jQuery object, unknown = JingleSessionPC which doesn't exist
86
+  onCallAccepted: ( session: unknown, answer: Object ) => void; // TODO: answer is an element object, unknown = JingleSessionPC which doesn't exist
87
+  onTransportInfo: ( session: unknown, transportInfo: Object ) => void; // TODO: transportInfo is an element object, unknown = JingleSessionPC which doesn't exist
88
   onRemoteTrackRemoved: ( removedTrack: JitsiRemoteTrack ) => void;
88
   onRemoteTrackRemoved: ( removedTrack: JitsiRemoteTrack ) => void;
89
   onIncomingCall: ( jingleSession: unknown, jingleOffer: unknown, now: unknown ) => void; // TODO: unknown = JingleSessionPC which doesn't exist
89
   onIncomingCall: ( jingleSession: unknown, jingleOffer: unknown, now: unknown ) => void; // TODO: unknown = JingleSessionPC which doesn't exist
90
   onCallEnded: ( jingleSession: unknown, reasonCondition: string, reasonText: string ) => void; // TODO: unknown = JingleSessionPC which doesn't exist
90
   onCallEnded: ( jingleSession: unknown, reasonCondition: string, reasonText: string ) => void; // TODO: unknown = JingleSessionPC which doesn't exist

+ 1
- 1
types/hand-crafted/modules/proxyconnection/ProxyConnectionPC.d.ts View File

10
     onSendMessage: ( params: unknown ) => unknown; // TODO:
10
     onSendMessage: ( params: unknown ) => unknown; // TODO:
11
   } );
11
   } );
12
   getPeerJid: () => string;
12
   getPeerJid: () => string;
13
-  processMessage: ( $jingle: JQuery ) => void; // TODO: surely there shouldn't be a dependency on jQuery
13
+  processMessage: ( $jingle: Object ) => void;
14
   start: ( localTracks?: JitsiLocalTrack[] ) => void;
14
   start: ( localTracks?: JitsiLocalTrack[] ) => void;
15
   stop: () => void;
15
   stop: () => void;
16
 }
16
 }

+ 1
- 1
types/hand-crafted/modules/xmpp/Caps.d.ts View File

4
 
4
 
5
 export default class Caps extends Listenable {
5
 export default class Caps extends Listenable {
6
   constructor( connection?: Strophe.Connection, node?: string );
6
   constructor( connection?: Strophe.Connection, node?: string );
7
-  parseDiscoInfo: ( node: string ) => { features: Set<string>, identities: Set<{ type: string, name: string, category: string }> }; // TODO: (string here is a jquery selector)
7
+  parseDiscoInfo: ( node: string ) => { features: Set<string>, identities: Set<{ type: string, name: string, category: string }> }; // TODO: (string here is an element)
8
   addFeature: ( feature: string, submit?: boolean, external?: boolean ) => void;
8
   addFeature: ( feature: string, submit?: boolean, external?: boolean ) => void;
9
   removeFeature: ( feature: string, submit?: boolean, external?: boolean ) => void;
9
   removeFeature: ( feature: string, submit?: boolean, external?: boolean ) => void;
10
   submit: () => void;
10
   submit: () => void;

+ 1
- 1
types/hand-crafted/modules/xmpp/JingleSession.d.ts View File

15
   addSources: ( contents: unknown ) => void; // TODO:
15
   addSources: ( contents: unknown ) => void; // TODO:
16
   removeSources: ( contents: unknown ) => void; // TODO:
16
   removeSources: ( contents: unknown ) => void; // TODO:
17
   terminate: ( success: ( params: unknown ) => unknown, failure: ( params: unknown ) => unknown, options: { reason: string, reasonDescription: string, requestRestart?: boolean, sendSessionTerminate?: boolean } ) => void; // TODO:
17
   terminate: ( success: ( params: unknown ) => unknown, failure: ( params: unknown ) => unknown, options: { reason: string, reasonDescription: string, requestRestart?: boolean, sendSessionTerminate?: boolean } ) => void; // TODO:
18
-  acceptOffer: ( jingle: JQuery, success: ( params: unknown ) => unknown, failure: ( params: unknown ) => unknown ) => void; // TODO:
18
+  acceptOffer: ( jingle: Object, success: ( params: unknown ) => unknown, failure: ( params: unknown ) => unknown ) => void; // TODO:
19
 }
19
 }

+ 4
- 4
types/hand-crafted/modules/xmpp/JingleSessionPC.d.ts View File

5
 import JitsiRemoteTrack from '../RTC/JitsiRemoteTrack';
5
 import JitsiRemoteTrack from '../RTC/JitsiRemoteTrack';
6
 
6
 
7
 export default class JingleSessionPC extends JingleSession {
7
 export default class JingleSessionPC extends JingleSession {
8
-  static parseVideoSenders: ( jingleContents: JQuery ) => string | null;
8
+  static parseVideoSenders: ( jingleContents: Object ) => string | null;
9
   constructor( sid: string, localJid: string, remoteJid: string, connection: XmppConnection, mediaConstraints: unknown, iceConfig: unknown, isP2P: boolean, isInitiator: boolean ); // TODO:
9
   constructor( sid: string, localJid: string, remoteJid: string, connection: XmppConnection, mediaConstraints: unknown, iceConfig: unknown, isP2P: boolean, isInitiator: boolean ); // TODO:
10
   doInitialize: ( options: {} ) => void;
10
   doInitialize: ( options: {} ) => void;
11
   sendIceCandidate: ( candidate: RTCIceCandidate ) => void;
11
   sendIceCandidate: ( candidate: RTCIceCandidate ) => void;
12
   sendIceCandidates: ( candidates: RTCIceCandidate[] ) => void;
12
   sendIceCandidates: ( candidates: RTCIceCandidate[] ) => void;
13
   addIceCandidates: ( elem: unknown ) => void; // TODO:
13
   addIceCandidates: ( elem: unknown ) => void; // TODO:
14
   getConfiguredVideoCodec: () => CodecMimeType;
14
   getConfiguredVideoCodec: () => CodecMimeType;
15
-  acceptOffer: ( jingleOffer: JQuery, success: ( params: unknown ) => unknown, failure: ( params: unknown ) => unknown, localTracks?: JitsiLocalTrack[] ) => void; // TODO:
15
+  acceptOffer: ( jingleOffer: Object, success: ( params: unknown ) => unknown, failure: ( params: unknown ) => unknown, localTracks?: JitsiLocalTrack[] ) => void; // TODO:
16
   invite: ( localTracks?: JitsiLocalTrack[] ) => void;
16
   invite: ( localTracks?: JitsiLocalTrack[] ) => void;
17
   sendSessionInitiate: ( offerSdp: string ) => void;
17
   sendSessionInitiate: ( offerSdp: string ) => void;
18
   setAnswer: ( jingleAnswer: unknown ) => void; // TODO:
18
   setAnswer: ( jingleAnswer: unknown ) => void; // TODO:
19
-  setOfferAnswerCycle: ( jingleOfferAnswerIq: JQuery, success: ( params: unknown ) => unknown, failure: ( params: unknown ) => unknown, localTracks?: JitsiLocalTrack[] ) => void; // TODO:
19
+  setOfferAnswerCycle: ( jingleOfferAnswerIq: Object, success: ( params: unknown ) => unknown, failure: ( params: unknown ) => unknown, localTracks?: JitsiLocalTrack[] ) => void; // TODO:
20
   setVideoCodecs: ( preferred?: CodecMimeType, disabled?: CodecMimeType ) => void;
20
   setVideoCodecs: ( preferred?: CodecMimeType, disabled?: CodecMimeType ) => void;
21
   setReceiverVideoConstraint: ( maxFrameHeight: number ) => void;
21
   setReceiverVideoConstraint: ( maxFrameHeight: number ) => void;
22
   setSenderMaxBitrates: () => Promise<void>;
22
   setSenderMaxBitrates: () => Promise<void>;
32
   addTrackAsUnmute: ( track: JitsiLocalTrack ) => Promise<unknown>; // TODO:
32
   addTrackAsUnmute: ( track: JitsiLocalTrack ) => Promise<unknown>; // TODO:
33
   removeTrackAsMute: ( track: JitsiLocalTrack ) => Promise<unknown>; // TODO:
33
   removeTrackAsMute: ( track: JitsiLocalTrack ) => Promise<unknown>; // TODO:
34
   setMediaTransferActive: ( videoActive: boolean ) => Promise<unknown>; // TODO:
34
   setMediaTransferActive: ( videoActive: boolean ) => Promise<unknown>; // TODO:
35
-  modifyContents: ( jingleContents: JQuery ) => void;
35
+  modifyContents: ( jingleContents: Object ) => void;
36
   notifyMySSRCUpdate: ( oldSDP: unknown, newSDP: unknown ) => void; // TODO:
36
   notifyMySSRCUpdate: ( oldSDP: unknown, newSDP: unknown ) => void; // TODO:
37
   newJingleErrorHandler: ( request: unknown, failureCb: ( error: Error ) => void ) => ( this: JingleSessionPC ) => unknown; // TODO:
37
   newJingleErrorHandler: ( request: unknown, failureCb: ( error: Error ) => void ) => ( this: JingleSessionPC ) => unknown; // TODO:
38
   getIceConnectionState: () => unknown; // TODO:
38
   getIceConnectionState: () => unknown; // TODO:

Loading…
Cancel
Save