|
|
@@ -40,7 +40,7 @@ SmallVideo.prototype.isVisible = function () {
|
|
40
|
40
|
};
|
|
41
|
41
|
|
|
42
|
42
|
SmallVideo.prototype.showDisplayName = function(isShow) {
|
|
43
|
|
- var nameSpan = $('#' + this.videoSpanId + '>span.displayname').get(0);
|
|
|
43
|
+ var nameSpan = $('#' + this.videoSpanId + ' .displayname').get(0);
|
|
44
|
44
|
if (isShow) {
|
|
45
|
45
|
if (nameSpan && nameSpan.innerHTML && nameSpan.innerHTML.length)
|
|
46
|
46
|
nameSpan.setAttribute("style", "display:inline-block;");
|
|
|
@@ -189,38 +189,54 @@ SmallVideo.prototype.hideIndicator = function () {
|
|
189
|
189
|
|
|
190
|
190
|
|
|
191
|
191
|
/**
|
|
192
|
|
- * Shows audio muted indicator over small videos.
|
|
193
|
|
- * @param {string} isMuted
|
|
|
192
|
+ * Shows / hides the audio muted indicator over small videos.
|
|
|
193
|
+ *
|
|
|
194
|
+ * @param {string} isMuted indicates if the muted element should be shown
|
|
|
195
|
+ * or hidden
|
|
194
|
196
|
*/
|
|
195
|
197
|
SmallVideo.prototype.showAudioIndicator = function(isMuted) {
|
|
196
|
|
- var audioMutedSpan = $('#' + this.videoSpanId + '>span.audioMuted');
|
|
|
198
|
+
|
|
|
199
|
+ var audioMutedIndicator = this.getAudioMutedIndicator();
|
|
197
|
200
|
|
|
198
|
201
|
if (!isMuted) {
|
|
199
|
|
- if (audioMutedSpan.length > 0) {
|
|
200
|
|
- audioMutedSpan.remove();
|
|
201
|
|
- this.updateIconPositions();
|
|
202
|
|
- }
|
|
|
202
|
+ audioMutedIndicator.hide();
|
|
203
|
203
|
}
|
|
204
|
204
|
else {
|
|
205
|
|
- if (!audioMutedSpan.length) {
|
|
206
|
|
- audioMutedSpan = document.createElement('span');
|
|
207
|
|
- audioMutedSpan.className = 'audioMuted';
|
|
208
|
|
- UIUtil.setTooltip(audioMutedSpan,
|
|
209
|
|
- "videothumbnail.mute",
|
|
210
|
|
- "top");
|
|
211
|
|
-
|
|
212
|
|
- this.container.appendChild(audioMutedSpan);
|
|
213
|
|
- APP.translation
|
|
214
|
|
- .translateElement($('#' + this.videoSpanId + " > span"));
|
|
215
|
|
- var mutedIndicator = document.createElement('i');
|
|
216
|
|
- mutedIndicator.className = 'icon-mic-disabled';
|
|
217
|
|
- audioMutedSpan.appendChild(mutedIndicator);
|
|
|
205
|
+ audioMutedIndicator.show();
|
|
|
206
|
+ }
|
|
|
207
|
+ this.isMuted = isMuted;
|
|
|
208
|
+};
|
|
218
|
209
|
|
|
219
|
|
- }
|
|
|
210
|
+/**
|
|
|
211
|
+ * Returns the audio muted indicator jquery object. If it doesn't exists -
|
|
|
212
|
+ * creates it.
|
|
|
213
|
+ *
|
|
|
214
|
+ * @returns {jQuery|HTMLElement}
|
|
|
215
|
+ */
|
|
|
216
|
+SmallVideo.prototype.getAudioMutedIndicator = function () {
|
|
|
217
|
+ var audioMutedSpan = $('#' + this.videoSpanId + ' .audioMuted');
|
|
220
|
218
|
|
|
221
|
|
- this.updateIconPositions();
|
|
|
219
|
+ if (audioMutedSpan.length) {
|
|
|
220
|
+ return audioMutedSpan;
|
|
222
|
221
|
}
|
|
223
|
|
- this.isMuted = isMuted;
|
|
|
222
|
+
|
|
|
223
|
+ audioMutedSpan = document.createElement('span');
|
|
|
224
|
+ audioMutedSpan.className = 'audioMuted toolbar-icon';
|
|
|
225
|
+
|
|
|
226
|
+ UIUtil.setTooltip(audioMutedSpan,
|
|
|
227
|
+ "videothumbnail.mute",
|
|
|
228
|
+ "top");
|
|
|
229
|
+
|
|
|
230
|
+ this.container
|
|
|
231
|
+ .querySelector('.videocontainer__toolbar')
|
|
|
232
|
+ .appendChild(audioMutedSpan);
|
|
|
233
|
+
|
|
|
234
|
+
|
|
|
235
|
+ var mutedIndicator = document.createElement('i');
|
|
|
236
|
+ mutedIndicator.className = 'icon-mic-disabled';
|
|
|
237
|
+ audioMutedSpan.appendChild(mutedIndicator);
|
|
|
238
|
+
|
|
|
239
|
+ return $('#' + this.videoSpanId + ' .audioMuted');
|
|
224
|
240
|
};
|
|
225
|
241
|
|
|
226
|
242
|
/**
|
|
|
@@ -231,53 +247,41 @@ SmallVideo.prototype.setMutedView = function(isMuted) {
|
|
231
|
247
|
this.isVideoMuted = isMuted;
|
|
232
|
248
|
this.updateView();
|
|
233
|
249
|
|
|
234
|
|
- var videoMutedSpan = $('#' + this.videoSpanId + '>span.videoMuted');
|
|
|
250
|
+ var videoMutedSpan = this.getVideoMutedIndicator();
|
|
235
|
251
|
|
|
236
|
|
- if (isMuted === false) {
|
|
237
|
|
- if (videoMutedSpan.length > 0) {
|
|
238
|
|
- videoMutedSpan.remove();
|
|
239
|
|
- this.updateIconPositions();
|
|
240
|
|
- }
|
|
241
|
|
- }
|
|
242
|
|
- else {
|
|
243
|
|
- if (!videoMutedSpan.length) {
|
|
244
|
|
- videoMutedSpan = document.createElement('span');
|
|
245
|
|
- videoMutedSpan.className = 'videoMuted';
|
|
246
|
|
-
|
|
247
|
|
- this.container.appendChild(videoMutedSpan);
|
|
248
|
|
-
|
|
249
|
|
- var mutedIndicator = document.createElement('i');
|
|
250
|
|
- mutedIndicator.className = 'icon-camera-disabled';
|
|
251
|
|
- UIUtil.setTooltip(mutedIndicator,
|
|
252
|
|
- "videothumbnail.videomute",
|
|
253
|
|
- "top");
|
|
254
|
|
- videoMutedSpan.appendChild(mutedIndicator);
|
|
255
|
|
- //translate texts for muted indicator
|
|
256
|
|
- APP.translation
|
|
257
|
|
- .translateElement($('#' + this.videoSpanId + " > span > i"));
|
|
258
|
|
- }
|
|
259
|
|
-
|
|
260
|
|
- this.updateIconPositions();
|
|
261
|
|
- }
|
|
|
252
|
+ videoMutedSpan[isMuted ? 'show' : 'hide']();
|
|
262
|
253
|
};
|
|
263
|
254
|
|
|
264
|
|
-SmallVideo.prototype.updateIconPositions = function () {
|
|
265
|
|
- let audioMutedSpan = $('#' + this.videoSpanId + '>span.audioMuted');
|
|
266
|
|
- let videoMutedSpan = $('#' + this.videoSpanId + '>span.videoMuted');
|
|
267
|
|
- audioMutedSpan.css({left: "0px"});
|
|
268
|
|
- videoMutedSpan.css({left: (audioMutedSpan.length > 0? 25 : 0) + "px"});
|
|
269
|
|
-
|
|
270
|
|
- var connectionIndicator
|
|
271
|
|
- = $('#' + this.videoSpanId + '>div.connectionindicator');
|
|
272
|
|
- if(connectionIndicator.length > 0 &&
|
|
273
|
|
- connectionIndicator[0].style.display != "none") {
|
|
274
|
|
- audioMutedSpan.css({right: "23px"});
|
|
275
|
|
- videoMutedSpan.css({right:
|
|
276
|
|
- ((audioMutedSpan.length > 0? 23 : 0) + 30) + "px"});
|
|
277
|
|
- } else {
|
|
278
|
|
- audioMutedSpan.css({right: "0px"});
|
|
279
|
|
- videoMutedSpan.css({right: (audioMutedSpan.length > 0? 30 : 0) + "px"});
|
|
|
255
|
+/**
|
|
|
256
|
+ * Returns the video muted indicator jquery object. If it doesn't exists -
|
|
|
257
|
+ * creates it.
|
|
|
258
|
+ *
|
|
|
259
|
+ * @returns {jQuery|HTMLElement}
|
|
|
260
|
+ */
|
|
|
261
|
+SmallVideo.prototype.getVideoMutedIndicator = function () {
|
|
|
262
|
+ var videoMutedSpan = $('#' + this.videoSpanId + ' .videoMuted');
|
|
|
263
|
+
|
|
|
264
|
+ if (videoMutedSpan.length) {
|
|
|
265
|
+ return videoMutedSpan;
|
|
280
|
266
|
}
|
|
|
267
|
+
|
|
|
268
|
+ videoMutedSpan = document.createElement('span');
|
|
|
269
|
+ videoMutedSpan.className = 'videoMuted toolbar-icon';
|
|
|
270
|
+
|
|
|
271
|
+ this.container
|
|
|
272
|
+ .querySelector('.videocontainer__toolbar')
|
|
|
273
|
+ .appendChild(videoMutedSpan);
|
|
|
274
|
+
|
|
|
275
|
+ var mutedIndicator = document.createElement('i');
|
|
|
276
|
+ mutedIndicator.className = 'icon-camera-disabled';
|
|
|
277
|
+
|
|
|
278
|
+ UIUtil.setTooltip(mutedIndicator,
|
|
|
279
|
+ "videothumbnail.videomute",
|
|
|
280
|
+ "top");
|
|
|
281
|
+
|
|
|
282
|
+ videoMutedSpan.appendChild(mutedIndicator);
|
|
|
283
|
+
|
|
|
284
|
+ return $('#' + this.videoSpanId + ' .videoMuted');
|
|
281
|
285
|
};
|
|
282
|
286
|
|
|
283
|
287
|
/**
|
|
|
@@ -287,27 +291,25 @@ SmallVideo.prototype.createModeratorIndicatorElement = function () {
|
|
287
|
291
|
// Show moderator indicator
|
|
288
|
292
|
var indicatorSpan = $('#' + this.videoSpanId + ' .focusindicator');
|
|
289
|
293
|
|
|
290
|
|
- if (!indicatorSpan || indicatorSpan.length === 0) {
|
|
291
|
|
- indicatorSpan = document.createElement('span');
|
|
292
|
|
- indicatorSpan.className = 'focusindicator';
|
|
293
|
|
-
|
|
294
|
|
- this.container.appendChild(indicatorSpan);
|
|
295
|
|
- indicatorSpan = $('#' + this.videoSpanId + ' .focusindicator');
|
|
|
294
|
+ if (indicatorSpan.length) {
|
|
|
295
|
+ return;
|
|
296
|
296
|
}
|
|
297
|
297
|
|
|
298
|
|
- if (indicatorSpan.children().length !== 0)
|
|
299
|
|
- return;
|
|
|
298
|
+ indicatorSpan = document.createElement('span');
|
|
|
299
|
+ indicatorSpan.className = 'focusindicator toolbar-icon right';
|
|
|
300
|
+
|
|
|
301
|
+ this.container
|
|
|
302
|
+ .querySelector('.videocontainer__toolbar')
|
|
|
303
|
+ .appendChild(indicatorSpan);
|
|
|
304
|
+
|
|
300
|
305
|
var moderatorIndicator = document.createElement('i');
|
|
301
|
306
|
moderatorIndicator.className = 'icon-star';
|
|
302
|
|
- indicatorSpan[0].appendChild(moderatorIndicator);
|
|
303
|
307
|
|
|
304
|
|
- UIUtil.setTooltip(indicatorSpan[0],
|
|
|
308
|
+ UIUtil.setTooltip(moderatorIndicator,
|
|
305
|
309
|
"videothumbnail.moderator",
|
|
306
|
310
|
"top-left");
|
|
307
|
311
|
|
|
308
|
|
- //translates text in focus indicators
|
|
309
|
|
- APP.translation
|
|
310
|
|
- .translateElement($('#' + this.videoSpanId + ' .focusindicator'));
|
|
|
312
|
+ indicatorSpan.appendChild(moderatorIndicator);
|
|
311
|
313
|
};
|
|
312
|
314
|
|
|
313
|
315
|
/**
|