Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Adds mousemove listeners to the etherpad iframes. Adds css styles so the etherpad buttons beneath the header are accessible.

foc5869b79b6a1
diff --git a/css/videolayout_default.css b/css/videolayout_default.css
index 2f60155781..ffed256edb 100644
--- a/css/videolayout_default.css
+++ b/css/videolayout_default.css
@@ -280,6 +280,7 @@
left:0;
right:0;
z-index:10;
+ pointer-events: none;
}
#toolbar {
@@ -295,7 +296,7 @@
background-color: rgba(0,0,0,0.8);
border: 1px solid rgba(256, 256, 256, 0.2);
border-radius: 6px;
-
+ pointer-events: auto;
}
#subject {
diff --git a/etherpad.js b/etherpad.js
index bb273e5143..f7a0b3ec24 100644
--- a/etherpad.js
+++ b/etherpad.js
@@ -46,7 +46,6 @@ var Etherpad = (function (my) {
largeVideo.css({opacity: '0'});
} else {
VideoLayout.setLargeVideoVisible(false);
- ToolbarToggler.dockToolbar(true);
}
$('#etherpad>iframe').fadeIn(300, function () {
@@ -64,7 +63,6 @@ var Etherpad = (function (my) {
if (!isPresentation) {
$('#largeVideo').fadeIn(300, function () {
VideoLayout.setLargeVideoVisible(true);
- ToolbarToggler.dockToolbar(false);
});
}
});
@@ -116,6 +114,46 @@ var Etherpad = (function (my) {
etherpadIFrame.setAttribute('style', 'visibility: hidden;');
document.getElementById('etherpad').appendChild(etherpadIFrame);
+
+ etherpadIFrame.onload = function() {
+
+ document.domain = document.domain;
+ bubbleIframeMouseMove(etherpadIFrame);
+ setTimeout(function() {
+ //the iframes inside of the etherpad are not yet loaded when the etherpad iframe is loaded
+ var outer = etherpadIFrame.contentDocument.getElementsByName("ace_outer")[0];
+ bubbleIframeMouseMove(outer);
+ var inner = outer.contentDocument.getElementsByName("ace_inner")[0];
+ bubbleIframeMouseMove(inner);
+ }, 2000);
+ };
+ }
+
+ function bubbleIframeMouseMove(iframe){
+ var existingOnMouseMove = iframe.contentWindow.onmousemove;
+ iframe.contentWindow.onmousemove = function(e){
+ if(existingOnMouseMove) existingOnMouseMove(e);
+ var evt = document.createEvent("MouseEvents");
+ var boundingClientRect = iframe.getBoundingClientRect();
+ evt.initMouseEvent(
+ "mousemove",
+ true, // bubbles
+ false, // not cancelable
+ window,
+ e.detail,
+ e.screenX,
+ e.screenY,
+ e.clientX + boundingClientRect.left,
+ e.clientY + boundingClientRect.top,
+ e.ctrlKey,
+ e.altKey,
+ e.shiftKey,
+ e.metaKey,
+ e.button,
+ null // no related element
+ );
+ iframe.dispatchEvent(evt);
+ };
}
/**