Przeglądaj źródła

Reverts hover over small video to show display name.

master
damencho 8 lat temu
rodzic
commit
5cead57723

+ 1
- 0
modules/UI/videolayout/LocalVideo.js Wyświetl plik

@@ -11,6 +11,7 @@ function LocalVideo(VideoLayout, emitter) {
11 11
     this.videoSpanId = "localVideoContainer";
12 12
     this.container = $("#localVideoContainer").get(0);
13 13
     this.localVideoId = null;
14
+    this.bindHoverHandler();
14 15
     if(config.enableLocalVideoFlip)
15 16
         this._buildContextMenu();
16 17
     this.isLocal = true;

+ 1
- 0
modules/UI/videolayout/RemoteVideo.js Wyświetl plik

@@ -31,6 +31,7 @@ function RemoteVideo(user, VideoLayout, emitter) {
31 31
     this.addRemoteVideoContainer();
32 32
     this.connectionIndicator = new ConnectionIndicator(this, this.id);
33 33
     this.setDisplayName();
34
+    this.bindHoverHandler();
34 35
     this.flipX = false;
35 36
     this.isLocal = false;
36 37
     /**

+ 20
- 0
modules/UI/videolayout/SmallVideo.js Wyświetl plik

@@ -155,6 +155,26 @@ SmallVideo.getStreamElementID = function (stream) {
155 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 179
  * Updates the data for the indicator
160 180
  * @param id the id of the indicator

Ładowanie…
Anuluj
Zapisz