repo: janusweb
action: commit
revision: 
path_from: 
revision_from: c158b114f7839efaabc11be4ee6e11fc98a2f3c3:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit c158b114f7839efaabc11be4ee6e11fc98a2f3c3
Author: James Baicoianu 
Date:   Wed May 16 17:37:09 2018 -0700

    Added room.pauseSound and room.pauseVideo

diff --git a/scripts/room.js b/scripts/room.js
index af270433c979418ca0a1aebee4fbc2fa5a848df7..
index ..5c914110661bb5d8557836c98b1b7fc605af7904 100644
--- 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-----