Fixes JS errors on FF. Fixes disco info JS error.
This commit is contained in:
parent
c26f82acd9
commit
73232be8be
|
@ -289,8 +289,9 @@ JitsiConference.prototype.onMemberJoined = function (jid, email, nick) {
|
|||
this.eventEmitter.emit(JitsiConferenceEvents.USER_JOINED, id);
|
||||
this.participants[id] = participant;
|
||||
this.connection.xmpp.connection.disco.info(
|
||||
jid, "" /* node */, function(iq) {
|
||||
participant._supportsDTMF = $(iq).find('>query>feature[var="urn:xmpp:jingle:dtmf:0"]').length > 0;
|
||||
jid, "node", function(iq) {
|
||||
participant._supportsDTMF = $(iq).find(
|
||||
'>query>feature[var="urn:xmpp:jingle:dtmf:0"]').length > 0;
|
||||
this.updateDTMFSupport();
|
||||
}.bind(this)
|
||||
);
|
||||
|
|
|
@ -144,7 +144,7 @@ $(window).bind('unload', unload);
|
|||
|
||||
// JitsiMeetJS.setLogLevel(JitsiMeetJS.logLevels.ERROR);
|
||||
var initOptions = {
|
||||
// disableAudioLevels: true,
|
||||
disableAudioLevels: true,
|
||||
// Desktop sharing method. Can be set to 'ext', 'webrtc' or false to disable.
|
||||
desktopSharingChromeMethod: 'ext',
|
||||
// The ID of the jidesha extension for Chrome.
|
||||
|
@ -170,6 +170,13 @@ var initOptions = {
|
|||
desktopSharingFirefoxExtensionURL: null
|
||||
}
|
||||
JitsiMeetJS.init(initOptions).then(function(){
|
||||
connection = new JitsiMeetJS.JitsiConnection(null, null, options);
|
||||
|
||||
connection.addEventListener(JitsiMeetJS.events.connection.CONNECTION_ESTABLISHED, onConnectionSuccess);
|
||||
connection.addEventListener(JitsiMeetJS.events.connection.CONNECTION_FAILED, onConnectionFailed);
|
||||
connection.addEventListener(JitsiMeetJS.events.connection.CONNECTION_DISCONNECTED, disconnect);
|
||||
|
||||
connection.connect();
|
||||
JitsiMeetJS.createLocalTracks({devices: ["audio", "video"]}).
|
||||
then(onLocalTracks).catch(function (error) {
|
||||
console.log(error);
|
||||
|
@ -182,12 +189,3 @@ var connection = null;
|
|||
var room = null;
|
||||
var localTracks = [];
|
||||
var remoteTracks = {};
|
||||
|
||||
|
||||
connection = new JitsiMeetJS.JitsiConnection(null, null, options);
|
||||
|
||||
connection.addEventListener(JitsiMeetJS.events.connection.CONNECTION_ESTABLISHED, onConnectionSuccess);
|
||||
connection.addEventListener(JitsiMeetJS.events.connection.CONNECTION_FAILED, onConnectionFailed);
|
||||
connection.addEventListener(JitsiMeetJS.events.connection.CONNECTION_DISCONNECTED, disconnect);
|
||||
|
||||
connection.connect();
|
||||
|
|
|
@ -291,8 +291,9 @@ JitsiConference.prototype.onMemberJoined = function (jid, email, nick) {
|
|||
this.eventEmitter.emit(JitsiConferenceEvents.USER_JOINED, id);
|
||||
this.participants[id] = participant;
|
||||
this.connection.xmpp.connection.disco.info(
|
||||
jid, "" /* node */, function(iq) {
|
||||
participant._supportsDTMF = $(iq).find('>query>feature[var="urn:xmpp:jingle:dtmf:0"]').length > 0;
|
||||
jid, "node", function(iq) {
|
||||
participant._supportsDTMF = $(iq).find(
|
||||
'>query>feature[var="urn:xmpp:jingle:dtmf:0"]').length > 0;
|
||||
this.updateDTMFSupport();
|
||||
}.bind(this)
|
||||
);
|
||||
|
@ -2526,17 +2527,23 @@ function handleLocalStream(streams, resolution) {
|
|||
}
|
||||
}
|
||||
|
||||
if (streams && streams.desktopStream)
|
||||
desktopStream = streams.desktopStream;
|
||||
|
||||
}
|
||||
else if (RTCBrowserType.isFirefox() || RTCBrowserType.isTemasysPluginUsed()) { // Firefox and Temasys plugin
|
||||
if (streams && streams.audioStream)
|
||||
audioStream = streams.audioStream;
|
||||
if (streams && streams.audio)
|
||||
audioStream = streams.audio;
|
||||
|
||||
if (streams && streams.videoStream)
|
||||
videoStream = streams.videoStream;
|
||||
if (streams && streams.video)
|
||||
videoStream = streams.video;
|
||||
|
||||
if(streams && streams.desktop)
|
||||
desktopStream = streams.desktop;
|
||||
}
|
||||
|
||||
if (streams && streams.desktopStream)
|
||||
res.push({stream: streams.desktopStream,
|
||||
if (desktopStream)
|
||||
res.push({stream: desktopStream,
|
||||
type: "video", videoType: "desktop"});
|
||||
|
||||
if(audioStream)
|
||||
|
|
|
@ -378,17 +378,23 @@ function handleLocalStream(streams, resolution) {
|
|||
}
|
||||
}
|
||||
|
||||
if (streams && streams.desktopStream)
|
||||
desktopStream = streams.desktopStream;
|
||||
|
||||
}
|
||||
else if (RTCBrowserType.isFirefox() || RTCBrowserType.isTemasysPluginUsed()) { // Firefox and Temasys plugin
|
||||
if (streams && streams.audioStream)
|
||||
audioStream = streams.audioStream;
|
||||
if (streams && streams.audio)
|
||||
audioStream = streams.audio;
|
||||
|
||||
if (streams && streams.videoStream)
|
||||
videoStream = streams.videoStream;
|
||||
if (streams && streams.video)
|
||||
videoStream = streams.video;
|
||||
|
||||
if(streams && streams.desktop)
|
||||
desktopStream = streams.desktop;
|
||||
}
|
||||
|
||||
if (streams && streams.desktopStream)
|
||||
res.push({stream: streams.desktopStream,
|
||||
if (desktopStream)
|
||||
res.push({stream: desktopStream,
|
||||
type: "video", videoType: "desktop"});
|
||||
|
||||
if(audioStream)
|
||||
|
|
Loading…
Reference in New Issue