Explorar el Código

Uses SDPUtil filter special characters method through xmpp interface instead of importing it directly.

j8
paweldomas hace 9 años
padre
commit
59b26fdf07
Se han modificado 2 ficheros con 8 adiciones y 5 borrados
  1. 4
    5
      modules/RTC/RTCUtils.js
  2. 4
    0
      modules/xmpp/xmpp.js

+ 4
- 5
modules/RTC/RTCUtils.js Ver fichero

@@ -1,8 +1,7 @@
1
-/* global config, require, attachMediaStream, getUserMedia */
1
+/* global APP, config, require, attachMediaStream, getUserMedia */
2 2
 var RTCBrowserType = require("./RTCBrowserType");
3 3
 var Resolutions = require("../../service/RTC/Resolutions");
4 4
 var AdapterJS = require("./adapter.screenshare");
5
-var SDPUtil = require("../xmpp/SDPUtil");
6 5
 
7 6
 var currentResolution = null;
8 7
 
@@ -176,7 +175,7 @@ function RTCUtils(RTCService, onTemasysPluginReady)
176 175
                     }
177 176
                     id = tracks[0].id;
178 177
                 }
179
-                return SDPUtil.filter_special_chars(id);
178
+                return APP.xmpp.filter_special_chars(id);
180 179
             };
181 180
             this.getVideoSrc = function (element) {
182 181
                 if(!element)
@@ -205,7 +204,7 @@ function RTCUtils(RTCService, onTemasysPluginReady)
205 204
         this.getStreamID = function (stream) {
206 205
             // streams from FF endpoints have the characters '{' and '}'
207 206
             // that make jQuery choke.
208
-            return SDPUtil.filter_special_chars(stream.id);
207
+            return APP.xmpp.filter_special_chars(stream.id);
209 208
         };
210 209
         this.getVideoSrc = function (element) {
211 210
             if(!element)
@@ -251,7 +250,7 @@ function RTCUtils(RTCService, onTemasysPluginReady)
251 250
                 attachMediaStream(elSel[0], stream);
252 251
             };
253 252
             self.getStreamID = function (stream) {
254
-                var id = SDPUtil.filter_special_chars(stream.label);
253
+                var id = APP.xmpp.filter_special_chars(stream.label);
255 254
                 return id;
256 255
             };
257 256
             self.getVideoSrc = function (element) {

+ 4
- 0
modules/xmpp/xmpp.js Ver fichero

@@ -3,6 +3,7 @@ var Moderator = require("./moderator");
3 3
 var EventEmitter = require("events");
4 4
 var Recording = require("./recording");
5 5
 var SDP = require("./SDP");
6
+var SDPUtil = require("./SDPUtil");
6 7
 var Settings = require("../settings/Settings");
7 8
 var Pako = require("pako");
8 9
 var StreamEventTypes = require("../../service/RTC/StreamEventTypes");
@@ -578,6 +579,9 @@ var XMPP = {
578 579
         if (!this.isConferenceInProgress())
579 580
             return;
580 581
         connection.jingle.activecall.peerconnection.removeStream(stream);
582
+    },
583
+    filter_special_chars: function (text) {
584
+        return SDPUtil.filter_special_chars(text);
581 585
     }
582 586
 };
583 587
 

Loading…
Cancelar
Guardar