Commit 90b14960 authored by Dele Olajide's avatar Dele Olajide Committed by dele

Jitsi Videobridge plugin - refresh with github, fix issues

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@13879 b35dd754-fafc-0310-a699-88a17e54d16e
parent 4f0936b9
......@@ -44,10 +44,10 @@
Jitsi Video Bridge Plugin Changelog
</h1>
<p><b>1.1</b> -- Jan 7th, 2014</p>
<p><b>1.1</b> -- Jan 27th, 2014</p>
<ul>
<li>OF-716 Added to Openfire plugins with embedded ofmeet web video conference application and Spark plugin</li>
<li>OF-716 Added to Openfire plugins.</li>
</ul>
<p><b>1.0</b> -- Apr 12, 2013</p>
......
var connection = null;
var userForm = null;
$(document).ready(function ()
{
......@@ -25,6 +26,8 @@ $(document).ready(function ()
function joinWorkgroup(workgroup, form)
{
userForm = form;
if (connection != null && connection.connected)
{
var iq = $iq({to: workgroup + "@workgroup." + connection.domain, type: 'set'}).c('join-queue', {xmlns: 'http://jabber.org/protocol/workgroup'});
......@@ -63,7 +66,7 @@ function onMessage(message)
if (xmlns == "jabber:x:conference")
{
var roomJid = $(this).attr("jid");
window.location.href = "/ofmeet/?r=" + Strophe.getNodeFromJid(roomJid);
window.location.href = "/ofmeet/?r=" + Strophe.getNodeFromJid(roomJid) + "&n=" + userForm.username + "&q=" + userForm.question;
}
});
return true;
......
......@@ -4,7 +4,9 @@ var config = {
muc: 'conference.' + window.location.hostname, // FIXME: use XEP-0030
bridge: 'jitsi-videobridge.' + window.location.hostname // FIXME: use XEP-0030
},
useIPv6: false, // ipv6 support. use at your own risk
useNicks: false,
useWebsockets: true,
resolution: "360",
bosh: window.location.protocol + "//" + window.location.host + '/http-bind/' // FIXME: use xep-0156 for that
};
......@@ -86,7 +86,7 @@ $(document).ready(function ()
$("#screen").addClass("fa-border");
} else {
getConstraints(['audio', 'video'], '720');
getConstraints(['audio', 'video'], config.resolution);
$("#screen").removeClass("fa-border");
}
......@@ -129,7 +129,7 @@ $(document).bind('mediafailure.rayo', function(error) {
$(document).bind('remotestreamadded.rayo', function(event, data, sid)
{
var id = 'remoteVideo_' + sid + '_' + data.stream.id;
var id = 'remoteVideo_' + data.stream.id;
if (!document.getElementById(id))
{
......@@ -145,14 +145,15 @@ $(document).bind('remotestreamadded.rayo', function(event, data, sid)
window.RTC.attachMediaStream(sel, data.stream);
if (sel.attr('id').indexOf('mixedmslabel') == -1) {
if (sel.attr('id') && sel.attr('id').indexOf('mixedmslabel') == -1) {
// ignore mixedmslabela0 and non room members
sel.show();
resizeThumbnails();
document.getElementById('largeVideo').volume = 1;
$('#largeVideo').attr('src', sel.attr('src'));
}
resizeThumbnails();
data.stream.onended = function() {
console.log('stream ended', this.id);
......@@ -416,8 +417,9 @@ function urlParam(name)
function doJoin() {
var roomnode = urlParam("r");
nickname = unescape(urlParam("n"));
console.log("doJoin", roomnode);
console.log("doJoin", roomnode, nickname);
if (!roomnode) {
roomnode = Math.random().toString(36).substr(2, 20);
......@@ -431,21 +433,35 @@ function doJoin() {
var nick = window.prompt('Your nickname (optional)');
if (nick) {
myroomjid += '/' + nick;
nickname = nick;
$('#nickname').css({visibility:"hidden"});
$('#ofmeet').css({visibility:'visible'});
$('#usermsg').css({visibility:'visible'});
nickname = nick;
} else {
myroomjid += '/' + Strophe.getNodeFromJid(connection.jid);
}
} else {
myroomjid += '/' + Strophe.getNodeFromJid(connection.jid);
if (nickname)
myroomjid += '/' + nickname;
else
myroomjid += '/' + Strophe.getNodeFromJid(connection.jid);
}
connection.addHandler(rayoCallback, 'urn:xmpp:rayo:colibri:1');
connection.emuc.doJoin(myroomjid);
connection.emuc.doJoin(myroomjid);
if (nickname)
{
var question = unescape(urlParam("q"));
if (question) updateChatConversation(nickname, question);
$('#nickname').css({visibility:"hidden"});
$('#ofmeet').css({visibility:'visible'});
$('#usermsg').css({visibility:'visible'});
openChat();
}
}
function rayoCallback(presence)
{
......@@ -573,13 +589,11 @@ function handleOffer (from, offer)
var confid = null;
var channelId = [];
window.RTC.rayo.channels = {}
window.RTC.rayo.addssrc = false;
$(offer).find('conference').each(function()
{
confid = $(this).attr('id');
window.RTC.rayo.channels.id = confid;
$(this).find('content').each(function()
{
......@@ -647,11 +661,10 @@ function handleOffer (from, offer)
});
bridgeSDP.raw = bridgeSDP.session + bridgeSDP.media.join('');
window.RTC.rayo.channels.sdp = bridgeSDP.raw;
//console.log("bridgeSDP.raw", bridgeSDP.raw);
window.RTC.rayo.pc[videobridge] = new window.RTC.peerconnection(null, {'optional': [{'DtlsSrtpKeyAgreement': 'true'}]});
window.RTC.rayo.pc[videobridge] = new window.RTC.peerconnection(null, {'optional': [{'DtlsSrtpKeyAgreement': 'true'}, {googIPv6: config.useIPv6}]});
window.RTC.rayo.pc[videobridge].onicecandidate = function(event)
......
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