repo: janusweb action: commit revision: path_from: revision_from: c158b114f7839efaabc11be4ee6e11fc98a2f3c3: path_to: revision_to:
commit c158b114f7839efaabc11be4ee6e11fc98a2f3c3 Author: James BaicoianuDate: Wed May 16 17:37:09 2018 -0700 Added room.pauseSound and room.pauseVideo diff --git a/scripts/room.js b/scripts/room.js
--- a/scripts/room.js
+++ b/scripts/room.js
@@ -1181,6 +1181,11 @@ elation.require([
this.sounds[name].play();
}
}
+ this.pauseSound = function(name) {
+ if (this.sounds[name]) {
+ this.sounds[name].pause();
+ }
+ }
this.stopSound = function(name) {
if (this.sounds[name]) {
this.sounds[name].stop();
@@ -1206,6 +1211,11 @@ elation.require([
this.videos[name].play();
}
}
+ this.pauseVideo = function(name) {
+ if (this.videos[name]) {
+ this.videos[name].pause();
+ }
+ }
this.stopVideo = function(name) {
if (this.videos[name]) {
this.videos[name].pause();
@@ -1528,9 +1538,11 @@ elation.require([
playSound: ['function', 'playSound'],
stopSound: ['function', 'stopSound'],
seekSound: ['function', 'seekSound'],
+ pauseSound: ['function', 'pauseSound'],
playVideo: ['function', 'playVideo'],
stopVideo: ['function', 'stopVideo'],
seekVideo: ['function', 'seekVideo'],
+ pauseVideo: ['function', 'pauseVideo'],
openLink: ['function', 'openLink'],
raycast: ['function', 'raycast'],
-----END OF PAGE-----