diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2019-09-25 16:12:03 +0300 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2019-09-26 11:54:28 +0300 |
commit | 891a73f05dacdb7fadebf11e9f3d1d38f6817598 (patch) | |
tree | b1b0a8cda4f133dbdd6feba35a26010895cbe1ed /js | |
parent | c1e66878fe4e77937615b5a4260b689d22491845 (diff) |
Fix guest avatars in public share page
The default avatar size in VideoView is 128px, but due to the limited
space available in the public share page it is reduced to 64px in the
CSS. However, as "imageplaceholder()" is called while the element is
still hidden it does not get the size set in CSS, but the one given to
the function. This causes a mismatch in the text size once the element
is shown with a expected size of 128px on an avatar of only 64px, so the
same size should be used in both cases.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'js')
-rw-r--r-- | js/publicshare.js | 3 | ||||
-rw-r--r-- | js/views/videoview.js | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/js/publicshare.js b/js/publicshare.js index 8cc685b7c..2778dc7f8 100644 --- a/js/publicshare.js +++ b/js/publicshare.js @@ -28,6 +28,9 @@ init: function() { this._boundHideCallUi = this._hideCallUi.bind(this); + // Match the size set in the CSS. + OCA.Talk.Views.VideoView.prototype.participantAvatarSize = 64; + this.setupLayoutForTalkSidebar(); this.setupSignalingEventHandlers(); diff --git a/js/views/videoview.js b/js/views/videoview.js index 9b7411ee6..2e62f502a 100644 --- a/js/views/videoview.js +++ b/js/views/videoview.js @@ -53,6 +53,8 @@ template: OCA.Talk.Views.Templates['videoview'], + participantAvatarSize: 128, + ui: { 'audio': 'audio', 'video': 'video', @@ -129,9 +131,9 @@ this._participantName = participantName; if (userId && userId.length) { - this.getUI('avatar').avatar(userId, 128); + this.getUI('avatar').avatar(userId, this.participantAvatarSize); } else { - this.getUI('avatar').imageplaceholder('?', rawParticipantName, 128); + this.getUI('avatar').imageplaceholder('?', rawParticipantName, this.participantAvatarSize); this.getUI('avatar').css('background-color', '#b9b9b9'); } |