Add avatar when video hidden

This commit is contained in:
Ben Ogle
2013-07-26 17:08:52 -07:00
parent 86d1990894
commit 492fc46fb8
2 changed files with 6 additions and 5 deletions

View File

@@ -18,11 +18,11 @@ class ParticipantView extends View
@participant.getMediaConnection().getInboundStreamPromise().done (stream) =>
@video[0].src = URL.createObjectURL(stream)
@video.click =>
@toggleClass('large')
@video.click => @toggleClass('large')
@avatar.click => @toggleClass('large')
#emailMd5 = crypto.createHash('md5').update(@participant.email).digest('hex')
#@avatar.css('background-image': "http://www.gravatar.com/avatar/#{emailMd5}?s=160")
emailMd5 = crypto.createHash('md5').update(@participant.state.email).digest('hex')
@avatar.css('background-image': "url(http://www.gravatar.com/avatar/#{emailMd5}?s=160)")
@removeButton.click @onClickRemove
@toggleVideoButton.click @onClickToggleVideo

View File

@@ -49,12 +49,13 @@
width: @small-width;
height: @small-width;
background-size: cover;
background-position: 0 center;
}
&.large {
.avatar {
width: @large-width;
height: @large-width;
height: @large-width / 1.333;
}
}
}