Bug 1175827 - Fix warning about 'shouldRenderRemoteVideo: unexpected roomState' when opening a Loop conversation on desktop - add missing states. r=mikedeboer
authorMark Banner <standard8@mozilla.com>
Thu, 18 Jun 2015 12:39:52 +0100
changeset 249530 ad76805ea0fbdb7eaa857be5a1814c6f03559688
parent 249529 502391d38d886650ea71072c3d5ab9c50df8f5d6
child 249531 c150d89825a6978ceacc6162f92f37227297a42b
push id28929
push userryanvm@gmail.com
push dateThu, 18 Jun 2015 19:51:41 +0000
treeherdermozilla-central@d56a1257088e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmikedeboer
bugs1175827
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1175827 - Fix warning about 'shouldRenderRemoteVideo: unexpected roomState' when opening a Loop conversation on desktop - add missing states. r=mikedeboer
browser/components/loop/content/js/roomViews.js
browser/components/loop/content/js/roomViews.jsx
--- a/browser/components/loop/content/js/roomViews.js
+++ b/browser/components/loop/content/js/roomViews.js
@@ -659,24 +659,31 @@ loop.roomViews = (function(mozL10n) {
           if (this.state.mediaConnected) {
             // since the remoteVideo hasn't yet been enabled, if the
             // media is connected, then we should be displaying an avatar.
             return false;
           }
 
           return true;
 
+        case ROOM_STATES.READY:
+        case ROOM_STATES.INIT:
+        case ROOM_STATES.JOINING:
         case ROOM_STATES.SESSION_CONNECTED:
         case ROOM_STATES.JOINED:
+        case ROOM_STATES.MEDIA_WAIT:
           // this case is so that we don't show an avatar while waiting for
           // the other party to connect
           return true;
 
+        case ROOM_STATES.CLOSING:
+          return true;
+
         default:
-          console.warn("StandaloneRoomView.shouldRenderRemoteVideo:" +
+          console.warn("DesktopRoomConversationView.shouldRenderRemoteVideo:" +
             " unexpected roomState: ", this.state.roomState);
           return true;
       }
     },
 
     render: function() {
       if (this.state.roomName) {
         this.setTitle(this.state.roomName);
--- a/browser/components/loop/content/js/roomViews.jsx
+++ b/browser/components/loop/content/js/roomViews.jsx
@@ -659,24 +659,31 @@ loop.roomViews = (function(mozL10n) {
           if (this.state.mediaConnected) {
             // since the remoteVideo hasn't yet been enabled, if the
             // media is connected, then we should be displaying an avatar.
             return false;
           }
 
           return true;
 
+        case ROOM_STATES.READY:
+        case ROOM_STATES.INIT:
+        case ROOM_STATES.JOINING:
         case ROOM_STATES.SESSION_CONNECTED:
         case ROOM_STATES.JOINED:
+        case ROOM_STATES.MEDIA_WAIT:
           // this case is so that we don't show an avatar while waiting for
           // the other party to connect
           return true;
 
+        case ROOM_STATES.CLOSING:
+          return true;
+
         default:
-          console.warn("StandaloneRoomView.shouldRenderRemoteVideo:" +
+          console.warn("DesktopRoomConversationView.shouldRenderRemoteVideo:" +
             " unexpected roomState: ", this.state.roomState);
           return true;
       }
     },
 
     render: function() {
       if (this.state.roomName) {
         this.setTitle(this.state.roomName);