Commit 18d9928e authored by daryl herzmann's avatar daryl herzmann

Merge pull request #450 from deleolajide/ofmeet-0.3.1

ofmeet plugin version 0.3.1
parents c5db7ec9 08c6109e
......@@ -49,12 +49,22 @@
Openfire Meetings Plugin Changelog
</h1>
<p><b>0.3.1</b> -- December 12, 2015</p>
<ul>
<li>Fixed issue with broken presence broadcast</li>
<li>Fixed issue with broken desktop/screen sharing</li>
<li>Fixed issue with missing jnsctp.dll dependencies</li>
<li>Removed some more redundant or duplicate jar files in jitsivideobridge lib</li>
</ul>
<p><b>0.3.0</b> -- October 12, 2015</p>
<ul>
<li>[<a href='http://www.igniterealtime.org/issues/browse/OF-953'>OF-953</a>] - Updated JSP libraries.</li>
<li>Requires Openfire 3.11.0.</li>
</ul>
<p><b>0.2.3</b> -- Nov 14th, 2015</p>
<ul>
......
Some of the files here, notably libjitsi.jar, are OSGi bundles from the Jitsi
project. In Jitsi they are generated in the 'sc-bundles' directory by the
'bundles' ant target. To update the files here, run 'ant rebuild' in Jitsi and
then copy the files here, e.g.:
for f in *.jar; do
if [ -e ../../jitsi/sc-bundles/$f ]; then
cp ../../jitsi/sc-bundles/$f .;
fi;
done
......@@ -5,8 +5,8 @@
<name>Openfire Meetings</name>
<description>Provides high quality, scalable video conferences using Jitsi Meet and Jitsi Videobridge</description>
<author>Ignite Realtime</author>
<version>0.3.0</version>
<date>11/18/2015</date>
<version>0.3.1</version>
<date>12/12/2015</date>
<minServerVersion>3.11.0 alpha</minServerVersion>
<adminconsole>
<tab id="tab-ofmeet" name="${plugin.title}" url="ofmeet-summary.jsp" description="${plugin.description}">
......
......@@ -736,11 +736,12 @@ $(document).bind('setLocalDescription.jingle', function (event, sid) {
if (newssrcs[i-1].type === 'video' && isUsingScreenStream) {
newssrcs[i-1].type = 'screen';
}
connection.emuc.addMediaToPresence(i,
newssrcs[i-1].type, newssrcs[i-1].ssrc, newssrcs[i-1].direction);
}
connection.emuc.sendPresence();
connection.emuc.sendPresence();
}
});
......@@ -815,8 +816,8 @@ $(document).bind('entered.muc', function (event, jid, info, pres) {
'connected');
// Add Peer's container
var id = $(pres).find('>userID').text();
var email = $(pres).find('>email');
var id = $(pres).find('userID').text();
var email = $(pres).find('email');
if(email.length > 0) {
id = email.text();
}
......@@ -891,20 +892,22 @@ $(document).bind('left.muc', function (event, jid) {
$(document).bind('presence.muc', function (event, jid, info, pres) {
/* BAO
//check if the video bridge is available
if($(pres).find(">bridgeIsDown").length > 0 && !bridgeIsDown) {
if($(pres).find("bridgeIsDown").length > 0 && !bridgeIsDown) {
bridgeIsDown = true;
messageHandler.showError("Error",
"Jitsi Videobridge is currently unavailable. Please try again later!");
}
*/
if (info.isFocus)
{
return;
}
*/
// Remove old ssrcs coming from the jid
Object.keys(ssrc2jid).forEach(function (ssrc) {
if (ssrc2jid[ssrc] == jid) {
......@@ -913,7 +916,7 @@ $(document).bind('presence.muc', function (event, jid, info, pres) {
}
});
$(pres).find('>media[xmlns="http://estos.de/ns/mjs"]>source').each(function (idx, ssrc) {
$(pres).find('media[xmlns="http://estos.de/ns/mjs"]>source').each(function (idx, ssrc) {
//console.log(jid, 'assoc ssrc', ssrc.getAttribute('type'), ssrc.getAttribute('ssrc'));
var ssrcV = ssrc.getAttribute('ssrc');
ssrc2jid[ssrcV] = jid;
......@@ -951,14 +954,14 @@ $(document).bind('presence.muc', function (event, jid, info, pres) {
/* BAO
//check if the video bridge is available
if($(pres).find(">bridgeIsDown").length > 0 && !bridgeIsDown) {
if($(pres).find("bridgeIsDown").length > 0 && !bridgeIsDown) {
bridgeIsDown = true;
messageHandler.showError("Error",
"Jitsi Videobridge is currently unavailable. Please try again later!");
}
*/
var id = $(pres).find('>userID').text();
var email = $(pres).find('>email');
var id = $(pres).find('userID').text();
var email = $(pres).find('email');
if(email.length > 0) {
id = email.text();
}
......
......@@ -18250,7 +18250,18 @@ var ofmeet = (function(of)
var self = this;
// Stop the stream to trigger onended event for old stream
oldStream.stop();
if (oldStream.getAudioTracks().length) {
oldStream.getAudioTracks().forEach(function(track) {
track.stop();
});
}
if (oldStream.getVideoTracks().length) {
oldStream.getVideoTracks().forEach(function(track) {
track.stop();
});
}
// Remember SDP to figure out added/removed SSRCs
var oldSdp = null;
......@@ -18672,11 +18683,13 @@ var ofmeet = (function(of)
var self = this;
//console.log('tell', self.peerjid, 'about ' + (isadd ? 'new' : 'removed') + ' ssrcs from' + self.me);
if (!(this.peerconnection.signalingState == 'stable' && this.peerconnection.iceConnectionState == 'connected')){
//console.log("Too early to send updates");
return;
}
// BAO This code is now redundant
//
//if (!(this.peerconnection.signalingState == 'stable' && this.peerconnection.iceConnectionState == 'connected')){
// console.log("Too early to send updates");
// return;
//}
this.sendSSRCUpdateIq(sdpMediaSsrcs, self.sid, self.initiator, self.peerjid, isadd);
};
......@@ -28793,7 +28806,7 @@ var ofmeet = (function(of)
},
initPresenceMap: function (myroomjid) {
this.presMap['to'] = myroomjid;
this.presMap['xns'] = 'http://jabber.org/protocol/muc';
this.presMap['xns'] = 'http://igniterealtime.org/protocol/ofmeet';
},
doJoin: function (jid, password) {
this.myroomjid = jid;
......@@ -28829,13 +28842,13 @@ var ofmeet = (function(of)
}
// Parse etherpad tag.
var etherpad = $(pres).find('>etherpad');
var etherpad = $(pres).find('etherpad');
if (etherpad.length) {
$(document).trigger('etherpadadded.muc', [from, etherpad.text()]);
}
// Parse prezi tag.
var presentation = $(pres).find('>prezi');
var presentation = $(pres).find('prezi');
if (presentation.length)
{
var url = presentation.attr('url');
......@@ -28859,18 +28872,18 @@ var ofmeet = (function(of)
}
// Parse audio info tag.
var audioMuted = $(pres).find('>audiomuted');
var audioMuted = $(pres).find('audiomuted');
if (audioMuted.length) {
$(document).trigger('audiomuted.muc', [from, audioMuted.text()]);
}
// Parse video info tag.
var videoMuted = $(pres).find('>videomuted');
var videoMuted = $(pres).find('videomuted');
if (videoMuted.length) {
$(document).trigger('videomuted.muc', [from, videoMuted.text()]);
}
var stats = $(pres).find('>stats');
var stats = $(pres).find('stats');
if(stats.length)
{
var statsObj = {};
......@@ -28906,7 +28919,7 @@ var ofmeet = (function(of)
member.isFocus = true;
}
var nicktag = $(pres).find('>nick[xmlns="http://jabber.org/protocol/nick"]');
var nicktag = $(pres).find('nick[xmlns="http://jabber.org/protocol/nick"]');
member.displayName = (nicktag.length > 0 ? nicktag.text() : null);
if (from == this.myroomjid) {
......@@ -29119,7 +29132,7 @@ var ofmeet = (function(of)
pres.c('password').t(this.presMap['password']).up();
}
pres.up();
//pres.up(); // BAO made child elements of <x>
// Send XEP-0115 'c' stanza that contains our capabilities info
if (connection.caps) {
......@@ -29894,7 +29907,10 @@ var ofmeet = (function(of)
if (this.localStream)
{
this.localStream.stop();
this.localStream.getAudioTracks().forEach(function(track)
{
track.stop();
});
}
var iq = $iq({to: config.hosts.bridge, type: 'get'});
......@@ -31867,8 +31883,8 @@ var ofmeet = (function(of)
'connected');
// Add Peer's container
var id = $(pres).find('>userID').text();
var email = $(pres).find('>email');
var id = $(pres).find('userId').text();
var email = $(pres).find('email');
if(email.length > 0) {
id = email.text();
}
......@@ -31918,12 +31934,13 @@ var ofmeet = (function(of)
messageHandler.showError("Error",
"Jitsi Videobridge is currently unavailable. Please try again later!");
}
*/
if (info.isFocus)
{
return;
}
*/
// Remove old ssrcs coming from the jid
Object.keys(ssrc2jid).forEach(function (ssrc) {
if (ssrc2jid[ssrc] == jid) {
......@@ -31932,7 +31949,7 @@ var ofmeet = (function(of)
}
});
$(pres).find('>media[xmlns="http://estos.de/ns/mjs"]>source').each(function (idx, ssrc) {
$(pres).find('media[xmlns="http://estos.de/ns/mjs"]>source').each(function (idx, ssrc) {
//console.log(jid, 'assoc ssrc', ssrc.getAttribute('type'), ssrc.getAttribute('ssrc'));
var ssrcV = ssrc.getAttribute('ssrc');
ssrc2jid[ssrcV] = jid;
......@@ -31961,8 +31978,8 @@ var ofmeet = (function(of)
if (displayName && displayName.length > 0) $(document).trigger('displaynamechanged', [jid, displayName]);
var id = $(pres).find('>userID').text();
var email = $(pres).find('>email');
var id = $(pres).find('userId').text();
var email = $(pres).find('email');
if(email.length > 0) {
id = email.text();
}
......@@ -172,12 +172,14 @@ JingleSession.prototype.accept = function () {
JingleSession.prototype.sendSSRCUpdate = function(sdpMediaSsrcs, fromJid, isadd) {
var self = this;
console.log('tell', self.peerjid, 'about ' + (isadd ? 'new' : 'removed') + ' ssrcs from' + self.me);
if (!(this.peerconnection.signalingState == 'stable' && this.peerconnection.iceConnectionState == 'connected')){
console.log("Too early to send updates");
return;
}
//console.log('tell', self.peerjid, 'about ' + (isadd ? 'new' : 'removed') + ' ssrcs from' + self.me);
// BAO This code is now redundant
//
//if (!(this.peerconnection.signalingState == 'stable' && this.peerconnection.iceConnectionState == 'connected')){
// console.log("Too early to send updates");
// return;
//}
this.sendSSRCUpdateIq(sdpMediaSsrcs, self.sid, self.initiator, self.peerjid, isadd);
};
......
......@@ -81,7 +81,18 @@ SessionBase.prototype.switchStreams = function (new_stream, oldStream, success_c
var self = this;
// Stop the stream to trigger onended event for old stream
oldStream.stop();
if (oldStream.getAudioTracks().length) {
oldStream.getAudioTracks().forEach(function(track) {
track.stop();
});
}
if (oldStream.getVideoTracks().length) {
oldStream.getVideoTracks().forEach(function(track) {
track.stop();
});
}
// Remember SDP to figure out added/removed SSRCs
var oldSdp = null;
......
......@@ -18,7 +18,7 @@ Strophe.addConnectionPlugin('emuc', {
},
initPresenceMap: function (myroomjid) {
this.presMap['to'] = myroomjid;
this.presMap['xns'] = 'http://jabber.org/protocol/muc';
this.presMap['xns'] = 'http://igniterealtime.org/protocol/ofmeet';
},
doJoin: function (jid, password) {
this.myroomjid = jid;
......@@ -54,13 +54,13 @@ Strophe.addConnectionPlugin('emuc', {
}
// Parse etherpad tag.
var etherpad = $(pres).find('>etherpad');
var etherpad = $(pres).find('etherpad');
if (etherpad.length) {
$(document).trigger('etherpadadded.muc', [from, etherpad.text()]);
}
// Parse prezi tag.
var presentation = $(pres).find('>prezi');
var presentation = $(pres).find('prezi');
if (presentation.length)
{
var url = presentation.attr('url');
......@@ -84,18 +84,18 @@ Strophe.addConnectionPlugin('emuc', {
}
// Parse audio info tag.
var audioMuted = $(pres).find('>audiomuted');
var audioMuted = $(pres).find('audiomuted');
if (audioMuted.length) {
$(document).trigger('audiomuted.muc', [from, audioMuted.text()]);
}
// Parse video info tag.
var videoMuted = $(pres).find('>videomuted');
var videoMuted = $(pres).find('videomuted');
if (videoMuted.length) {
$(document).trigger('videomuted.muc', [from, videoMuted.text()]);
}
var stats = $(pres).find('>stats');
var stats = $(pres).find('stats');
if(stats.length)
{
var statsObj = {};
......@@ -131,7 +131,7 @@ Strophe.addConnectionPlugin('emuc', {
member.isFocus = true;
}
var nicktag = $(pres).find('>nick[xmlns="http://jabber.org/protocol/nick"]');
var nicktag = $(pres).find('nick[xmlns="http://jabber.org/protocol/nick"]');
member.displayName = (nicktag.length > 0 ? nicktag.text() : null);
if (from == this.myroomjid) {
......@@ -339,7 +339,7 @@ Strophe.addConnectionPlugin('emuc', {
});
},
sendPresence: function ()
{
{
if (!this.presMap['to']) {
// Too early to send presence - not initialized
return;
......@@ -352,7 +352,7 @@ Strophe.addConnectionPlugin('emuc', {
pres.c('password').t(this.presMap['password']).up();
}
pres.up();
//pres.up(); // BAO made child elements of <x>
// Send XEP-0115 'c' stanza that contains our capabilities info
if (connection.caps) {
......@@ -433,7 +433,7 @@ Strophe.addConnectionPlugin('emuc', {
}
pres.up();
connection.send(pres);
connection.send(pres);
},
addDisplayNameToPresence: function (displayName) {
this.presMap['displayName'] = displayName;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment