浏览代码

Adds raise hand toggle state.

master
yanas 8 年前
父节点
当前提交
1853fa6fae
共有 6 个文件被更改,包括 28 次插入0 次删除
  1. 2
    0
      conference.js
  2. 4
    0
      css/_toolbars.scss
  3. 1
    0
      css/_variables.scss
  4. 4
    0
      modules/UI/UI.js
  5. 12
    0
      modules/UI/toolbars/Toolbar.js
  6. 5
    0
      service/UI/UIEvents.js

+ 2
- 0
conference.js 查看文件

1648
     setRaisedHand(raisedHand) {
1648
     setRaisedHand(raisedHand) {
1649
         if (raisedHand !== this.isHandRaised)
1649
         if (raisedHand !== this.isHandRaised)
1650
         {
1650
         {
1651
+            APP.UI.onRaiseHandChanged(raisedHand);
1652
+
1651
             this.isHandRaised = raisedHand;
1653
             this.isHandRaised = raisedHand;
1652
             // Advertise the updated status
1654
             // Advertise the updated status
1653
             room.setLocalParticipantProperty("raisedHand", raisedHand);
1655
             room.setLocalParticipantProperty("raisedHand", raisedHand);

+ 4
- 0
css/_toolbars.scss 查看文件

118
     cursor: default;
118
     cursor: default;
119
 }
119
 }
120
 
120
 
121
+.button.toggled {
122
+    color: $toolbarButtonToggled;
123
+}
124
+
121
 a.button.unclickable:hover,
125
 a.button.unclickable:hover,
122
 a.button.unclickable:active,
126
 a.button.unclickable:active,
123
 a.button.unclickable.selected{
127
 a.button.unclickable.selected{

+ 1
- 0
css/_variables.scss 查看文件

25
 
25
 
26
 // Toolbar
26
 // Toolbar
27
 $toolbarSelectBackground: rgba(0, 0, 0, .6);
27
 $toolbarSelectBackground: rgba(0, 0, 0, .6);
28
+$toolbarButtonToggled: #0091EA;
28
 
29
 
29
 // Main controls
30
 // Main controls
30
 $inputBackground: rgba(132, 132, 132, .5);
31
 $inputBackground: rgba(132, 132, 132, .5);

+ 4
- 0
modules/UI/UI.js 查看文件

1211
     SettingsMenu.updateStartMutedBox(startAudioMuted, startVideoMuted);
1211
     SettingsMenu.updateStartMutedBox(startAudioMuted, startVideoMuted);
1212
 };
1212
 };
1213
 
1213
 
1214
+UI.onRaiseHandChanged = function (isRaiseHand) {
1215
+    eventEmitter.emit(UIEvents.RAISE_HAND_CHANGED, isRaiseHand);
1216
+};
1217
+
1214
 /**
1218
 /**
1215
  * Update list of available physical devices.
1219
  * Update list of available physical devices.
1216
  * @param {object[]} devices new list of available devices
1220
  * @param {object[]} devices new list of available devices

+ 12
- 0
modules/UI/toolbars/Toolbar.js 查看文件

400
                                                             isVisible);
400
                                                             isVisible);
401
             });
401
             });
402
 
402
 
403
+        APP.UI.addListener(UIEvents.RAISE_HAND_CHANGED,
404
+            function(isRaisedHand) {
405
+                Toolbar._toggleRaiseHand(isRaisedHand);
406
+            });
407
+
403
         if(!APP.tokenData.isGuest) {
408
         if(!APP.tokenData.isGuest) {
404
             $("#toolbar_button_profile").addClass("unclickable");
409
             $("#toolbar_button_profile").addClass("unclickable");
405
         }
410
         }
565
         }
570
         }
566
     },
571
     },
567
 
572
 
573
+    /**
574
+     * Toggles / untoggles the view for raised hand.
575
+     */
576
+    _toggleRaiseHand(isRaisedHand) {
577
+        $('#toolbar_button_raisehand').toggleClass("toggled", isRaisedHand);
578
+    },
579
+
568
     /**
580
     /**
569
      * Marks video icon as muted or not.
581
      * Marks video icon as muted or not.
570
      * @param {boolean} muted if icon should look like muted or not
582
      * @param {boolean} muted if icon should look like muted or not

+ 5
- 0
service/UI/UIEvents.js 查看文件

107
      */
107
      */
108
     SIDE_TOOLBAR_CONTAINER_TOGGLED: "UI.side_container_toggled",
108
     SIDE_TOOLBAR_CONTAINER_TOGGLED: "UI.side_container_toggled",
109
 
109
 
110
+    /**
111
+     * Notifies that the raise hand has been changed.
112
+     */
113
+    RAISE_HAND_CHANGED: "UI.raise_hand_changed",
114
+
110
     /**
115
     /**
111
      * Notifies that the avatar is displayed or not on the largeVideo.
116
      * Notifies that the avatar is displayed or not on the largeVideo.
112
      */
117
      */

正在加载...
取消
保存