|
@@ -171,7 +171,7 @@ export default class SharedVideoManager {
|
171
|
171
|
if(event.data.volume > 0 && !event.data.muted
|
172
|
172
|
&& !APP.conference.isLocalAudioMuted()){
|
173
|
173
|
self.emitter.emit(UIEvents.AUDIO_MUTED, true);
|
174
|
|
- self.notifyUserComfortableMicMute(true);
|
|
174
|
+ self.showMicMutedPopup(true);
|
175
|
175
|
}
|
176
|
176
|
};
|
177
|
177
|
|
|
@@ -236,7 +236,7 @@ export default class SharedVideoManager {
|
236
|
236
|
&& APP.conference.isLocalAudioMuted()) {
|
237
|
237
|
player.setVolume(attributes.volume);
|
238
|
238
|
console.info("Player change of volume:" + attributes.volume);
|
239
|
|
- this.notifyUserComfortableVideoMute(false);
|
|
239
|
+ this.showSharedVideoMutedPopup(false);
|
240
|
240
|
}
|
241
|
241
|
|
242
|
242
|
if(playerPaused)
|
|
@@ -363,6 +363,8 @@ export default class SharedVideoManager {
|
363
|
363
|
this.localAudioMutedListener);
|
364
|
364
|
this.localAudioMutedListener = null;
|
365
|
365
|
|
|
366
|
+ this.showSharedVideoMutedPopup(false);
|
|
367
|
+
|
366
|
368
|
VideoLayout.removeParticipantContainer(this.url);
|
367
|
369
|
|
368
|
370
|
VideoLayout.showLargeVideoContainer(SHARED_VIDEO_CONTAINER_TYPE, false)
|
|
@@ -403,35 +405,73 @@ export default class SharedVideoManager {
|
403
|
405
|
// to not pollute the conference
|
404
|
406
|
if(this.player.getVolume() > 0 || !this.player.isMuted()){
|
405
|
407
|
this.player.setVolume(0);
|
406
|
|
- this.notifyUserComfortableVideoMute(true);
|
|
408
|
+ this.showSharedVideoMutedPopup(true);
|
407
|
409
|
}
|
408
|
410
|
}
|
409
|
411
|
|
410
|
412
|
/**
|
411
|
|
- * Notifies user for muting its audio due to video is unmuted.
|
|
413
|
+ * Shows a popup under the microphone toolbar icon that notifies the user
|
|
414
|
+ * of automatic mute after a shared video has started.
|
412
|
415
|
* @param show boolean, show or hide the notification
|
413
|
416
|
*/
|
414
|
|
- notifyUserComfortableMicMute (show) {
|
|
417
|
+ showMicMutedPopup (show) {
|
|
418
|
+ var micMutedPopupSelector = $("#micMutedPopup");
|
415
|
419
|
if(show) {
|
416
|
|
- this.notifyUserComfortableVideoMute(false);
|
417
|
|
- console.log("Your audio was muted to enjoy the video");
|
|
420
|
+ this.showSharedVideoMutedPopup(false);
|
|
421
|
+
|
|
422
|
+ if (!micMutedPopupSelector.is(":visible"))
|
|
423
|
+ micMutedPopupSelector.css("display", "inline-block");
|
|
424
|
+
|
|
425
|
+ // FIXME: we need an utility method for that.
|
|
426
|
+ micMutedPopupSelector.fadeIn(300,
|
|
427
|
+ () => {micMutedPopupSelector.css({opacity: 1});}
|
|
428
|
+ );
|
|
429
|
+
|
|
430
|
+ setTimeout(
|
|
431
|
+ function () {
|
|
432
|
+ micMutedPopupSelector.fadeOut(300,
|
|
433
|
+ () => {micMutedPopupSelector.css({opacity: 0});}
|
|
434
|
+ );
|
|
435
|
+ }, 5000);
|
|
436
|
+ }
|
|
437
|
+ else {
|
|
438
|
+ micMutedPopupSelector.fadeOut(300,
|
|
439
|
+ () => {micMutedPopupSelector.css({opacity: 0});}
|
|
440
|
+ );
|
418
|
441
|
}
|
419
|
|
- else
|
420
|
|
- console.log("Hide notification local audio muted");
|
421
|
442
|
}
|
422
|
443
|
|
423
|
444
|
/**
|
424
|
|
- * Notifies user for muting the video due to audio is unmuted.
|
|
445
|
+ * Shows a popup under the shared video toolbar icon that notifies the user
|
|
446
|
+ * of automatic mute of the shared video after the user has unmuted their
|
|
447
|
+ * mic.
|
425
|
448
|
* @param show boolean, show or hide the notification
|
426
|
449
|
*/
|
427
|
|
- notifyUserComfortableVideoMute (show) {
|
|
450
|
+ showSharedVideoMutedPopup (show) {
|
|
451
|
+ var sharedVideoMutedPopupSelector = $("#sharedVideoMutedPopup");
|
428
|
452
|
if(show) {
|
429
|
|
- this.notifyUserComfortableMicMute(false);
|
430
|
|
- console.log(
|
431
|
|
- "Your shared video was muted in order to speak freely!");
|
|
453
|
+ this.showMicMutedPopup(false);
|
|
454
|
+
|
|
455
|
+ if (!sharedVideoMutedPopupSelector.is(":visible"))
|
|
456
|
+ sharedVideoMutedPopupSelector.css("display", "inline-block");
|
|
457
|
+
|
|
458
|
+ // FIXME: we need an utility method for that.
|
|
459
|
+ sharedVideoMutedPopupSelector.fadeIn(300,
|
|
460
|
+ () => {sharedVideoMutedPopupSelector.css({opacity: 1});}
|
|
461
|
+ );
|
|
462
|
+
|
|
463
|
+ setTimeout(
|
|
464
|
+ function () {
|
|
465
|
+ sharedVideoMutedPopupSelector.fadeOut(300,
|
|
466
|
+ () => {sharedVideoMutedPopupSelector.css({opacity: 0});}
|
|
467
|
+ );
|
|
468
|
+ }, 5000);
|
|
469
|
+ }
|
|
470
|
+ else {
|
|
471
|
+ sharedVideoMutedPopupSelector.fadeOut(300,
|
|
472
|
+ () => {sharedVideoMutedPopupSelector.css({opacity: 0});}
|
|
473
|
+ );
|
432
|
474
|
}
|
433
|
|
- else
|
434
|
|
- console.log("Hide notification share video muted");
|
435
|
475
|
}
|
436
|
476
|
}
|
437
|
477
|
|