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

This commit is contained in:
paweldomas 2015-09-02 11:56:22 +02:00
parent 74c531aed6
commit 59b26fdf07
2 changed files with 8 additions and 5 deletions

View File

@ -1,8 +1,7 @@
/* global config, require, attachMediaStream, getUserMedia */ /* global APP, config, require, attachMediaStream, getUserMedia */
var RTCBrowserType = require("./RTCBrowserType"); var RTCBrowserType = require("./RTCBrowserType");
var Resolutions = require("../../service/RTC/Resolutions"); var Resolutions = require("../../service/RTC/Resolutions");
var AdapterJS = require("./adapter.screenshare"); var AdapterJS = require("./adapter.screenshare");
var SDPUtil = require("../xmpp/SDPUtil");
var currentResolution = null; var currentResolution = null;
@ -176,7 +175,7 @@ function RTCUtils(RTCService, onTemasysPluginReady)
} }
id = tracks[0].id; id = tracks[0].id;
} }
return SDPUtil.filter_special_chars(id); return APP.xmpp.filter_special_chars(id);
}; };
this.getVideoSrc = function (element) { this.getVideoSrc = function (element) {
if(!element) if(!element)
@ -205,7 +204,7 @@ function RTCUtils(RTCService, onTemasysPluginReady)
this.getStreamID = function (stream) { this.getStreamID = function (stream) {
// streams from FF endpoints have the characters '{' and '}' // streams from FF endpoints have the characters '{' and '}'
// that make jQuery choke. // that make jQuery choke.
return SDPUtil.filter_special_chars(stream.id); return APP.xmpp.filter_special_chars(stream.id);
}; };
this.getVideoSrc = function (element) { this.getVideoSrc = function (element) {
if(!element) if(!element)
@ -251,7 +250,7 @@ function RTCUtils(RTCService, onTemasysPluginReady)
attachMediaStream(elSel[0], stream); attachMediaStream(elSel[0], stream);
}; };
self.getStreamID = function (stream) { self.getStreamID = function (stream) {
var id = SDPUtil.filter_special_chars(stream.label); var id = APP.xmpp.filter_special_chars(stream.label);
return id; return id;
}; };
self.getVideoSrc = function (element) { self.getVideoSrc = function (element) {

View File

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