repo: janusweb
action: commit
revision: 
path_from: 
revision_from: 14477683540872f11fd72c48c2833923f9b73c2b:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit 14477683540872f11fd72c48c2833923f9b73c2b
Author: James Baicoianu 
Date:   Sat May 26 09:47:30 2018 -0700

    Dispatch event for room prints

diff --git a/scripts/janusweb.js b/scripts/janusweb.js
index 90494a92ef84442ba7b95d1f76d02e5102a258eb..
index ..cf79c9080903f3e150cb7514574f79cb92a658f3 100644
--- a/scripts/janusweb.js
+++ b/scripts/janusweb.js
@@ -235,10 +235,10 @@ elation.require([
       window.scale = function(v1, s) {
         return v1.multiplyScalar(s);
       }
-      window.print = function() {
-        console.log.apply(console, arguments);
-        janus._target.chat.addmessage({userId: 'room', message: arguments[0]});
-      }
+      window.print = function(...args) {
+        console.log.apply(console, args);
+        elation.events.fire({type: 'clientprint', element: this, data: args});
+      }.bind(this);
       window.debug = function() {
         console.log.apply(console, arguments);
       }

-----END OF PAGE-----