repo: janusweb action: commit revision: path_from: revision_from: b03cee4887948ee56876310549edb725dcaba76b: path_to: revision_to:
commit b03cee4887948ee56876310549edb725dcaba76b Author: James BaicoianuDate: Mon Feb 27 00:11:47 2017 -0800 Call room.start() on the first touch, to make sure videos start on mobile diff --git a/scripts/room.js b/scripts/room.js
--- a/scripts/room.js
+++ b/scripts/room.js
@@ -64,6 +64,7 @@ elation.require([
elation.events.add(this.engine.systems.admin, 'admin_edit_change', elation.bind(this, this.onRoomEdit));
}
//this.showDebug();
+ elation.events.add(window, 'touchstart', elation.bind(this, this.onTouchStart));
elation.events.add(window, 'keydown', elation.bind(this, this.onKeyDown));
elation.events.add(window, 'keyup', elation.bind(this, this.onKeyUp));
@@ -935,6 +936,12 @@ elation.require([
this.onMouseUp = function(ev) {
elation.events.fire({type: 'janus_room_mouseup', element: this, event: ev});
}
+ this.onTouchStart = function(ev) {
+ if (!this.firsttouch) {
+ this.firsttouch = true;
+ this.start();
+ }
+ }
this.onThingChange = function(ev) {
var thing = ev.target;
if (!this.applyingEdits && thing.js_id && this.jsobjects[thing.js_id]) {
-----END OF PAGE-----