Commit 1db630d0 authored by Dele Olajide's avatar Dele Olajide Committed by dele

Jitsi-Videobridge plugin : Replaced jitmeet with ofmeet

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@13852 b35dd754-fafc-0310-a699-88a17e54d16e
parent 15c082a4
......@@ -47,7 +47,7 @@ Jitsi Video Bridge Plugin Changelog
<p><b>1.1</b> -- Jan 4th, 2014</p>
<ul>
<li>OF-716 Added to Openfire plugins with jitmeet web video conference application</li>
<li>OF-716 Added to Openfire plugins with embedded ofmeet web video conference application</li>
</ul>
<p><b>1.0</b> -- Apr 12, 2013</p>
......
......@@ -63,7 +63,7 @@ Jitsi Videobridge does not mix the video channels into a composite video stream,
but only relays the received video channels to all call participants.
Therefore, while it does need to run on a server with good network bandwidth,
CPU horsepower is not that critical for performance.
The JitMeet video conference application using WebRTC is included.
The OfMeet video conference application using WebRTC is included.
</p>
......@@ -79,7 +79,7 @@ Under Server settings -> Jitsi Videobridge tab you can configure it.
<h2>How to use</h2>
To run the demo video conference application, point your browser at https://your_server:7443/jitmeet
To run the demo video conference application, point your browser at https://your_server:7443/ofmeet
</body>
</html>
The MIT License (MIT)
Copyright (c) 2013 ESTOS GmbH
Copyright (c) 2013 BlueJimp SARL
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
meet - a colibri.js sample application
====
A WebRTC-powered multi-user videochat. For a live demo, check out either https://meet.estos.de/ or https://meet.jit.si/.
Built using [colibri.js](https://github.com/ESTOS/colibri.js) and [strophe.jingle](https://github.com/ESTOS/strophe.jingle), powered by the [jitsi-videobridge](https://github.com/jitsi/jitsi-videobridge) and [prosody](http://prosody.im/).
This diff is collapsed.
......@@ -7,6 +7,7 @@ html, body{
background: #e9e9e9;
}
#videospace {
display: block;
position: absolute;
......@@ -70,26 +71,13 @@ html, body{
top: 40px;
bottom: 0px;
right: 0px;
width:0;
width:450px;
opacity: 0;
overflow: hidden;
background-color:#f6f6f6;
border-left:1px solid #424242;
}
#chatconversation {
display:block;
position:relative;
top: -120px;
float:top;
text-align:left;
line-height:20px;
font-size:14px;
padding:5px;
height:90%;
overflow:scroll;
visibility:hidden;
}
.localuser {
color: #087dba;
......@@ -154,7 +142,6 @@ html, body{
top: 0px;
width: 100px;
height: 39px;
background-image:url(../images/left1.png);
background-repeat:no-repeat;
margin: 0;
padding: 0;
......@@ -163,8 +150,8 @@ html, body{
#leftlogo {
position:absolute;
top: 5px;
color: white;
left: 15px;
background-image:url(../images/jitsilogo.png);
background-repeat:no-repeat;
height: 31px;
width: 68px;
......@@ -229,7 +216,6 @@ a.button:hover {
position:absolute;
right: 0px;
top: 0px;
background-image:url(../images/right1.png);
background-repeat:no-repeat;
margin:0;
padding:0;
......@@ -241,7 +227,7 @@ a.button:hover {
position:absolute;
top: 6px;
right: 15px;
background-image:url(../images/estoslogo.png);
color: white;
background-repeat:no-repeat;
height: 25px;
width: 62px;
......
.jqistates {
font-size: 14px;
}
}
.jqistates h2 {
padding-bottom: 10px;
border-bottom: 1px solid #eee;
......@@ -9,18 +9,18 @@
line-height: 25px;
text-align: center;
color: #424242;
}
}
.jqistates input {
width: 100%;
margin: 20px 0;
}
}
.jqibuttons button {
margin-right: 5px;
float:right;
}
}
button.jqidefaultbutton #inviteLinkRef {
button.jqidefaultbutton #inviteLinkRef {
color: #2c8ad2;
}
\ No newline at end of file
}
\ No newline at end of file
div#ofmeet {
border: 1px solid #C9C9C9;
margin: 10px auto 20px auto;
padding: 10px;
font-family: Arial,Helvetica,sans-serif,"sans serif";
background-color: #F9F9F9;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
display:block;
position:relative;
top: -100px;
float:top;
text-align:left;
line-height:20px;
font-size:14px;
padding:5px;
overflow:scroll;
visibility:hidden;
}
div#ofmeet div.ofmeet-clear {
clear: both;
}
div#ofmeet form {
margin: 0;
padding: 0;
}
div#ofmeet div#ofmeet-login {
overflow: hidden;
position: relative;
}
div#ofmeet div#ofmeet-login label,
div#ofmeet div#ofmeet-login span#ofmeet-usernameDisplay {
font-size: 0.9em;
line-height: 22px;
margin: 0px 6px;
}
div#ofmeet div#ofmeet-login span#ofmeet-usernameDisplay {
font-weight: bold;
margin: 0;
}
div#ofmeet div#ofmeet-login label,
div#ofmeet div#.ofmeet-login input#ofmeet-username,
div#ofmeet div#ofmeet-login span#ofmeet-usernameDisplay {
float: left;
vertical-align: middle;
}
div#ofmeet div#ofmeet-login input#ofmeet-connect {
float: right;
margin-right: 5px;
}
div#ofmeet div#ofmeet-messaging {
position: relative;
overflow: hidden;
zoom: 1; /* uh, dirty ie6 hack... */
}
div#ofmeet div#ofmeet-log {
height: 85%;
border: 1px solid #999999;
background-color: #FFFFFF;
overflow: auto;
margin: 5px;
padding-top: 10px;
font-size: 0.8em;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
position: relative;
}
div#ofmeet div#ofmeet-log div.message {
width: 95%;
background: transparent url(../images/bubble_top.png) left top no-repeat;
padding-top: 9px;
margin: 0 auto;
}
div#ofmeet div#ofmeet-log div.message a:link,
div#ofmeet div#ofmeet-log div.message a:visited,
div#ofmeet div#ofmeet-log div.message a:hover,
div#ofmeet div#ofmeet-log div.message a:active {
text-decoration: underline;
font-weight: bold;
}
div#ofmeet div#ofmeet-log div.message a:link,
div#ofmeet div#ofmeet-log div.message a:visited {
color: #C64100;
}
div#ofmeet div#ofmeet-log div.message a:hover,
div#ofmeet div#ofmeet-log div.message a:active {
color: #333333;
background-color: #EAEAEA;
}
div#ofmeet div#ofmeet-log div.messageIn {
color: #444444;
}
div#ofmeet div#ofmeet-log div.messageOut {
color: #888888;
}
div#ofmeet div#ofmeet-log div.messageSystem {
color: #BBBBBB;
}
div#ofmeet div#ofmeet-log div.message span.msgText {
display: block;
font-weight: bold;
background: #E0E1E1 url(../images/bubble_content.png) left top no-repeat;
padding: 0px 12px;
}
div#ofmeet div#ofmeet-log div.message span.msgPerson {
display: block;
background: transparent url(../images/bubble_bottom.png) left top no-repeat;
height: 25px;
padding: 12px 0 0 50px;
font-size: 0.8em;
}
div#ofmeet div#ofmeet-log div.message span.msgPerson span.msgTime {
color: #AAAAAA;
}
div#ofmeet div#ofmeet-messaging textarea#ofmeet-message {
width: 388px;
border: 1px solid #999999;
margin: 5px 5px 0;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
position: relative;
}
div#ofmeet div#ofmeet-messaging input#ofmeet-sendmessage {
float: right;
position: relative;
text-transform: uppercase;
font-weight: bold;
padding: 0px 10px;
margin: 7px 5px 0 0;
}
Strophe.addConnectionPlugin('logger', {
// logs raw stanzas and makes them available for download as JSON
connection: null,
log: [],
init: function (conn) {
this.connection = conn;
this.connection.rawInput = this.log_incoming.bind(this);;
this.connection.rawOutput = this.log_outgoing.bind(this);;
},
log_incoming: function (stanza) {
this.log.push([new Date().getTime(), 'incoming', stanza]);
},
log_outgoing: function (stanza) {
this.log.push([new Date().getTime(), 'outgoing', stanza]);
},
// <a onclick="connection.logger.dump(event.target);">my download button</a>
dump: function (what, filename){
what.download = filename || 'xmpplog.json';
what.href = 'data:application/json;charset=utf-8,\n';
what.href += encodeURIComponent(JSON.stringify(this.log, null, ' '));
return true;
}
});
<html>
<head>
<title>WebRTC, meet the Jitsi Videobridge</title>
<script src="jquery.min.js"></script>
<script src="libs/strophejingle.bundle.js?v=1"></script><!-- strophe.jingle bundle -->
<script src="libs/colibri.js?v=1"></script><!-- colibri focus implementation -->
<script src="muc.js?v=2"></script><!-- simple MUC library -->
<script src="estos_log.js?v=1"></script><!-- simple stanza logger -->
<script src="app.js?v=2"></script><!-- application logic -->
<title>Openfire Meet</title>
<script src="js/jquery.min.js"></script>
<script src="js/jquery-impromptu.js"></script>
<script src="js/jquery.autosize.js"></script>
<script src="js/md5.js"></script>
<script src="js/base64.js"></script>
<script src="js/strophe.js"></script>
<script src="js/muc.js"></script>
<script src="js/config.js"></script>
<script src="js/webrtc.sdp.js"></script>
<script src="js/strophe-openfire.js"></script>
<script src="js/main.js"></script>
<link rel="stylesheet" href="font-awesome-4.0.3/css/font-awesome.css">
<link rel="stylesheet" href="css/main.css?v=1"/>
<link rel="stylesheet" href="css/jquery-impromptu.css?v=1">
<link rel="stylesheet" href="css/modaldialog.css?v=1">
<script src="libs/jquery-impromptu.js"></script>
<script src="libs/jquery.autosize.js"></script>
<script src="config.js"></script><!-- adapt to your needs, i.e. set hosts and bosh path -->
<link rel="stylesheet" href="css/styles.css" />
<link rel="stylesheet" href="css/main.css" />
<link rel="stylesheet" href="css/jquery-impromptu.css">
<link rel="stylesheet" href="css/modaldialog.css">
</head>
<body>
<div id="header">
<a href="http://jitsi.org" target="_blank"><div id="leftlogo"></div></a>
<a href="http://www.estos.com/" target="_blank"><div id="rightlogo"></div></a>
<a href="http://community.igniterealtime.org/community/support/jitsi_videobridge_plugin" target="_blank"><div id="leftlogo"><nobr>OfMeet</nobr></div></a>
<div id="toolbar">
<a class="button" onclick='buttonClick("#mute", "fa fa-microphone fa-lg fa fa-microphone-slash fa-lg");toggleAudio();'><i id="mute" title="Mute / unmute" class="fa fa-microphone fa-lg"></i></a>
<div class="header_button_separator"></div>
......@@ -29,18 +33,8 @@
<a class="button" onclick="openLinkDialog();"><i title="Invite others" class="fa fa-link fa-lg"></i></a>
<div class="header_button_separator"></div>
<a class="button" onclick='openChat();'><i id="chat" title="Open chat" class="fa fa-comments fa-lg"></i></a>
<!--i class='fa fa-external-link'>&nbsp;</i>Others can join you by just going to <span id='roomurl'></span-->
</div>
</div>
<div id="settings">
<h1>Connection Settings</h1>
<form id="loginInfo">
<label>JID: <input id="jid" type="text" name="jid" placeholder="me@example.com"/></label>
<label>Password: <input id="password" type="password" name="password" placeholder="secret"/></label>
<label>BOSH URL: <input id="boshURL" type="text" name="boshURL" placeholder="/http-bind"/></label>
<input id="connect" type="submit" value="Connect" />
</form>
</div>
<div id="videospace">
<div class="fade_line"></div>
......@@ -58,17 +52,11 @@
</form>
</div>
<!--div><i class="fa fa-comments">&nbsp;</i><span class='nick'></span>:&nbsp;<span class='chattext'></span></div-->
<div id="chatconversation"></div>
<div id="ofmeet"><div id="ofmeet-messaging"><div id="ofmeet-log"></div></div></div>
<textarea id="usermsg" class= "animated" placeholder='Enter text...' autofocus></textarea>
</div>
<a id="downloadlog" class="fa fa-cloud-download" title="Download logfile for support" onclick="connection.logger.dump(event.target);" style="position: absolute; bottom: 5; left: 5; overflow: visible; z-index: 100;"></a>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-319188-14', 'jit.si');
ga('send', 'pageview');
</script>
</body>
</html>
......@@ -202,7 +202,7 @@ public class PluginImpl implements Plugin, PropertyEventListener
// start video conference web application
try {
String appName = JiveGlobals.getProperty(VIDEO_CONFERENCE_PROPERTY_NAME, "jitmeet");
String appName = JiveGlobals.getProperty(VIDEO_CONFERENCE_PROPERTY_NAME, "ofmeet");
Log.info("Initialize Web App " + appName);
ContextHandlerCollection contexts = HttpBindManager.getInstance().getContexts();
......
// This code was written by Tyler Akins and has been placed in the
// public domain. It would be nice if you left this header intact.
// Base64 code from Tyler Akins -- http://rumkin.com
var Base64 = (function () {
var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
var obj = {
/**
* Encodes a string in base64
* @param {String} input The string to encode in base64.
*/
encode: function (input) {
var output = "";
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;
do {
chr1 = input.charCodeAt(i++);
chr2 = input.charCodeAt(i++);
chr3 = input.charCodeAt(i++);
enc1 = chr1 >> 2;
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
enc4 = chr3 & 63;
if (isNaN(chr2)) {
enc3 = enc4 = 64;
} else if (isNaN(chr3)) {
enc4 = 64;
}
output = output + keyStr.charAt(enc1) + keyStr.charAt(enc2) +
keyStr.charAt(enc3) + keyStr.charAt(enc4);
} while (i < input.length);
return output;
},
/**
* Decodes a base64 string.
* @param {String} input The string to decode.
*/
decode: function (input) {
var output = "";
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;
// remove all characters that are not A-Z, a-z, 0-9, +, /, or =
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
do {
enc1 = keyStr.indexOf(input.charAt(i++));
enc2 = keyStr.indexOf(input.charAt(i++));
enc3 = keyStr.indexOf(input.charAt(i++));
enc4 = keyStr.indexOf(input.charAt(i++));
chr1 = (enc1 << 2) | (enc2 >> 4);
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
chr3 = ((enc3 & 3) << 6) | enc4;
output = output + String.fromCharCode(chr1);
if (enc3 != 64) {
output = output + String.fromCharCode(chr2);
}
if (enc4 != 64) {
output = output + String.fromCharCode(chr3);
}
} while (i < input.length);
return output;
}
};
return obj;
})();
......@@ -5,12 +5,6 @@ var config = {
bridge: 'jitsi-videobridge.' + window.location.hostname // FIXME: use XEP-0030
},
useNicks: false,
bosh: '/http-bind/' // FIXME: use xep-0156 for that
useWebsockets: true,
bosh: window.location.protocol + "//" + window.location.host + '/http-bind/' // FIXME: use xep-0156 for that
};
function urlParam(name)
{
var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href);
if (!results) { return undefined; }
return results[1] || undefined;
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -29,6 +29,11 @@ Strophe.addConnectionPlugin('emuc', {
}
this.connection.send(join);
},
changeNick: function(jid) {
console.log("changeNick", jid);
var presence = $pres({to: jid}).c("x",{xmlns: 'http://jabber.org/protocol/muc'});
this.connection.send(presence);
},
onPresence: function (pres) {
var from = pres.getAttribute('from');
var type = pres.getAttribute('type');
......@@ -73,8 +78,19 @@ Strophe.addConnectionPlugin('emuc', {
},
onPresenceError: function (pres) {
var from = pres.getAttribute('from');
if ($(pres).find('>error[type="auth"]>not-authorized[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]').length) {
$(document).trigger('passwordrequired.muc', [from]);
if ($(pres).find('>error[type="auth"]>not-authorized[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]').length)
{
var ob = this;
window.setTimeout(function () {
var given = window.prompt('Password required');
if (given != null) {
ob.connection.send($pres({to: ob.myroomjid }).c('x', {xmlns: 'http://jabber.org/protocol/muc'}).c('password').t(given));
} else {
// user aborted
}
}, 50);
} else {
console.warn('onPresError ', pres);
}
......@@ -94,8 +110,6 @@ Strophe.addConnectionPlugin('emuc', {
// FIXME: this is a hack. but jingle on muc makes nickchanges hard
var nick = $(msg).find('>nick[xmlns="http://jabber.org/protocol/nick"]').text() || Strophe.getResourceFromJid(msg.getAttribute('from'));
if (txt) {
console.log('chat', nick, txt);
updateChatConversation(nick, txt);
}
return true;
......@@ -110,6 +124,8 @@ Strophe.addConnectionPlugin('emuc', {
formsubmit.c('x', {xmlns: 'jabber:x:data', type: 'submit'});
formsubmit.c('field', {'var': 'FORM_TYPE'}).c('value').t('http://jabber.org/protocol/muc#roomconfig').up().up();
formsubmit.c('field', {'var': 'muc#roomconfig_roomsecret'}).c('value').t(key).up().up();
formsubmit.c('field', {'var': 'muc#roomconfig_passwordprotectedroom'}).c('value').t('1').up().up();
// FIXME: is muc#roomconfig_passwordprotectedroom required?
this.connection.sendIQ(formsubmit,
function (res) {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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