Commit ac8d74a6 authored by Dele Olajide's avatar Dele Olajide

Implemented PDF presentation pointer/cursor sharing

parent 8a0af61c
...@@ -49,6 +49,12 @@ ...@@ -49,6 +49,12 @@
Openfire Meetings Plugin Changelog Openfire Meetings Plugin Changelog
</h1> </h1>
<p><b>0.0.7</b> -- Jan 5th, 2015</p>
<ul>
<li>Implemented PDF cursor sharing</li>
</ul>
<p><b>0.0.6</b> -- Dec 29th, 2014</p> <p><b>0.0.6</b> -- Dec 29th, 2014</p>
<ul> <ul>
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<name>Openfire Meetings</name> <name>Openfire Meetings</name>
<description>Provides high quality, scalable video conferences using Jitsi Meet and Jitsi Videobridge</description> <description>Provides high quality, scalable video conferences using Jitsi Meet and Jitsi Videobridge</description>
<author>Ignite Realtime</author> <author>Ignite Realtime</author>
<version>0.0.6</version> <version>0.0.7</version>
<date>12/29/2014</date> <date>01/05/2014</date>
<minServerVersion>3.9.9</minServerVersion> <minServerVersion>3.9.9</minServerVersion>
<adminconsole> <adminconsole>
......
...@@ -5,7 +5,7 @@ $(document).ready(function () ...@@ -5,7 +5,7 @@ $(document).ready(function ()
for (var i=0; i<config.conferences.length; i++) for (var i=0; i<config.conferences.length; i++)
{ {
conferenceList = conferenceList + '<option value="' + Strophe.getNodeFromJid(config.conferences[i].jid) + '"/>' conferenceList = conferenceList + '<option value="' + Strophe.getNodeFromJid(config.conferences[i].jid) + '">' + config.conferences[i].name + '</option>'
} }
conferenceList = conferenceList + '</datalist>' conferenceList = conferenceList + '</datalist>'
...@@ -184,9 +184,14 @@ Strophe.addConnectionPlugin('ofmuc', { ...@@ -184,9 +184,14 @@ Strophe.addConnectionPlugin('ofmuc', {
{ {
var action = $(this).attr('action'); var action = $(this).attr('action');
var url = $(this).attr('url'); var url = $(this).attr('url');
that.roomJid = Strophe.getBareJidFromJid(from);
that.roomJid = Strophe.getBareJidFromJid(from) if (Strophe.getResourceFromJid(from) != Strophe.getResourceFromJid(that.connection.jid))
that.handlePdfShare(action, url); {
var farparty = SettingsMenu.getDisplayName();
if (!farparty) farparty = Strophe.getResourceFromJid(from);
that.handlePdfShare(action, url, farparty);
}
}); });
$(msg).find('avatarshare').each(function() $(msg).find('avatarshare').each(function()
...@@ -282,9 +287,9 @@ Strophe.addConnectionPlugin('ofmuc', { ...@@ -282,9 +287,9 @@ Strophe.addConnectionPlugin('ofmuc', {
//console.log("handleAppShare", url, action); //console.log("handleAppShare", url, action);
}, },
handlePdfShare: function (action, url) handlePdfShare: function (action, url, from)
{ {
//console.log("handlePdfShare", url, action); //console.log("local handlePdfShare", url, action, from);
if (this.sharePDF == null) if (this.sharePDF == null)
{ {
...@@ -298,6 +303,12 @@ Strophe.addConnectionPlugin('ofmuc', { ...@@ -298,6 +303,12 @@ Strophe.addConnectionPlugin('ofmuc', {
if (action == "goto") this.appFrame.contentWindow.location.href = "/ofmeet/pdf/index.html?pdf=" + url; if (action == "goto") this.appFrame.contentWindow.location.href = "/ofmeet/pdf/index.html?pdf=" + url;
} }
} }
if (this.appFrame && this.appFrame.contentWindow.handlePdfShare && action == "message")
{
this.appFrame.contentWindow.handlePdfShare(url, from);
}
}, },
pdfReady: function() { pdfReady: function() {
...@@ -370,6 +381,16 @@ Strophe.addConnectionPlugin('ofmuc', { ...@@ -370,6 +381,16 @@ Strophe.addConnectionPlugin('ofmuc', {
} }
}, },
pfdMessage: function(msg) {
//console.log("pfdMessage", msg);
if (this.appFrame)
{
this.pdfShare("message", JSON.stringify(msg));
}
},
openPDFDialog: function() { openPDFDialog: function() {
//console.log("openPDFDialog"); //console.log("openPDFDialog");
var that = this; var that = this;
...@@ -427,7 +448,7 @@ Strophe.addConnectionPlugin('ofmuc', { ...@@ -427,7 +448,7 @@ Strophe.addConnectionPlugin('ofmuc', {
for (var i=0; i<that.urls.length; i++) for (var i=0; i<that.urls.length; i++)
{ {
urlsList = urlsList + '<option value="' + that.urls[i].url + '"/>' urlsList = urlsList + '<option value="' + that.urls[i].url + '">' + that.urls[i].name + '</option>'
} }
urlsList = urlsList + '</datalist>' urlsList = urlsList + '</datalist>'
......
.togetherjs * {
-webkit-box-sizing: content-box !important;
-moz-box-sizing: content-box !important;
box-sizing: content-box !important;
}
.togetherjs-cursor svg {
-webkit-filter: drop-shadow(1px 3px 2px rgba(0, 0, 0, 0.3));
-webkit-transform: rotate(-10deg);
}
.togetherjs-cursor-img {
position: relative;
top: 0;
}
.togetherjs-cursor img {
width: 20px;
-webkit-filter: drop-shadow(0px 2px 1px rgba(0, 0, 0, 0.2));
/*FIX ME, moz filter not working...*/
-moz-filter: drop-shadow(0px 2px 1px rgba(0, 0, 0, 0.2));
filter: drop-shadow(0px 2px 1px rgba(0, 0, 0, 0.2));
}
.togetherjs-cursor {
position: absolute;
z-index: 9999;
font-size: 28px;
font-weight: bolder;
/* This magic CSS rule makes this element basically invisible to clicks/etc:
(good on all but IE: http://caniuse.com/pointer-events */
pointer-events: none;
/*FIXME: maybe these should use position: fixed so the cursor
stays stuck to the top of the screen until the appropriate time
(when .togetherjs-scrolled-above/below is removed)?*/
}
.togetherjs-cursor:hover {
cursor: pointer;
}
.togetherjs-cursor.togetherjs-scrolled-above {
position: fixed;
}
.togetherjs-cursor.togetherjs-scrolled-above svg {
-webkit-transition-duration: 0.8s;
-webkit-transition-property: -webkit-transform;
-webkit-transform: rotate(20deg);
transition-duration: 0.8s;
transition-property: transform;
transform: rotate(20deg);
}
.togetherjs-cursor.togetherjs-scrolled-above .togetherjs-cursor-down {
display: none;
}
.togetherjs-cursor.togetherjs-scrolled-below {
position: fixed;
}
.togetherjs-cursor.togetherjs-scrolled-below svg {
-webkit-transition-duration: 0.8s;
-webkit-transition-property: -webkit-transform;
-webkit-transform: rotate(-150deg);
transition-duration: 0.8s;
transition-property: transform;
transform: rotate(-150deg);
}
.togetherjs-cursor.togetherjs-scrolled-below .togetherjs-cursor-up {
display: none;
}
.togetherjs-cursor.togetherjs-scrolled-normal svg {
-webkit-transition-duration: 0.8s;
-webkit-transition-property: -webkit-transform;
-webkit-transform: rotate(-10deg);
transition-duration: 0.8s;
transition-property: transform;
transform: rotate(-10deg);
}
.togetherjs-cursor.togetherjs-scrolled-normal .togetherjs-cursor-up,
.togetherjs-cursor.togetherjs-scrolled-normal .togetherjs-cursor-down {
display: none;
}
.togetherjs-cursor .togetherjs-cursor-container {
opacity: 0.9;
white-space: nowrap;
font-family: openSansLight, Helvetica, 'Helvetica Neue', Arial, sans-serif;
font-size: 40%;
position: relative;
top: 5px;
left: 15px;
padding: 8px;
border-radius: 4px;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
border: 1px solid rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5);
-webkit-box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5);
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5);
}
.togetherjs-click {
position: absolute;
z-index: 9998;
pointer-events: none;
width: 10px;
height: 10px;
margin: -5px 0 0 -5px;
border-radius: 5px;
border: 3px solid #ff3a29;
/* Note, you must call this like:
.transition(~"value, value, value")*/
transition: width 2s, height 2s, margin 2s, border 2s;
-moz-transition: width 2s, height 2s, margin 2s, border 2s;
-webkit-transition: width 2s, height 2s, margin 2s, border 2s;
-o-transition: width 2s, height 2s, margin 2s, border 2s;
}
.togetherjs-click.togetherjs-clicking {
width: 40px;
height: 40px;
margin: -20px 0 0 -20px;
border-radius: 20px;
border: 3px solid rgba(0, 0, 0, 0);
}
This diff is collapsed.
...@@ -4,7 +4,11 @@ ...@@ -4,7 +4,11 @@
<head> <head>
<!-- In production, only one script (pdf.js) is necessary --> <!-- In production, only one script (pdf.js) is necessary -->
<!-- In production, change the content of PDFJS.workerSrc below --> <!-- In production, change the content of PDFJS.workerSrc below -->
<link rel="stylesheet" type="text/css" href="cursor.css" />
<script type="text/javascript" src="pdf.js"></script> <script type="text/javascript" src="pdf.js"></script>
<script type="text/javascript" src="jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="tinycolor.js"></script>
<script type="text/javascript" src="cursor.js"></script>
</head> </head>
<body onload="start();"> <body onload="start();">
......
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