Bläddra i källkod

Reverts hover over small video to show display name.

master
damencho 9 år sedan
förälder
incheckning
5cead57723

+ 1
- 0
modules/UI/videolayout/LocalVideo.js Visa fil

11
     this.videoSpanId = "localVideoContainer";
11
     this.videoSpanId = "localVideoContainer";
12
     this.container = $("#localVideoContainer").get(0);
12
     this.container = $("#localVideoContainer").get(0);
13
     this.localVideoId = null;
13
     this.localVideoId = null;
14
+    this.bindHoverHandler();
14
     if(config.enableLocalVideoFlip)
15
     if(config.enableLocalVideoFlip)
15
         this._buildContextMenu();
16
         this._buildContextMenu();
16
     this.isLocal = true;
17
     this.isLocal = true;

+ 1
- 0
modules/UI/videolayout/RemoteVideo.js Visa fil

31
     this.addRemoteVideoContainer();
31
     this.addRemoteVideoContainer();
32
     this.connectionIndicator = new ConnectionIndicator(this, this.id);
32
     this.connectionIndicator = new ConnectionIndicator(this, this.id);
33
     this.setDisplayName();
33
     this.setDisplayName();
34
+    this.bindHoverHandler();
34
     this.flipX = false;
35
     this.flipX = false;
35
     this.isLocal = false;
36
     this.isLocal = false;
36
     /**
37
     /**

+ 20
- 0
modules/UI/videolayout/SmallVideo.js Visa fil

155
     return (isVideo ? 'remoteVideo_' : 'remoteAudio_') + stream.getId();
155
     return (isVideo ? 'remoteVideo_' : 'remoteAudio_') + stream.getId();
156
 };
156
 };
157
 
157
 
158
+/**
159
+ * Configures hoverIn/hoverOut handlers.
160
+ */
161
+SmallVideo.prototype.bindHoverHandler = function () {
162
+    // Add hover handler
163
+    var self = this;
164
+    $(this.container).hover(
165
+        function () {
166
+            self.showDisplayName(true);
167
+        },
168
+        function () {
169
+            // If the video has been "pinned" by the user we want to
170
+            // keep the display name on place.
171
+            if (!self.VideoLayout.isLargeVideoVisible() ||
172
+                !self.VideoLayout.isCurrentlyOnLarge(self.id))
173
+                self.showDisplayName(false);
174
+        }
175
+    );
176
+};
177
+
158
 /**
178
 /**
159
  * Updates the data for the indicator
179
  * Updates the data for the indicator
160
  * @param id the id of the indicator
180
  * @param id the id of the indicator

Laddar…
Avbryt
Spara