diff --git a/labs/meteor-client/client/globals.coffee b/labs/meteor-client/client/globals.coffee index e0ac979ca4..326cc9814d 100755 --- a/labs/meteor-client/client/globals.coffee +++ b/labs/meteor-client/client/globals.coffee @@ -80,20 +80,6 @@ Meteor.methods Handlebars.registerHelper "getMeetingName", -> window.getMeetingName() -Handlebars.registerHelper "isCurrentUserTalking", -> - u = Meteor.Users.findOne({'userId': getInSession("userId")}) - if u? - console.log u - u.user?.voiceUser?.talking - false - -Handlebars.registerHelper "isCurrentUserSharingAudio", -> - getInSession "isSharingAudio" - -Handlebars.registerHelper "isUserSharingAudio", (u) -> - if u? - u.user?.voiceUser?.talking? - Handlebars.registerHelper "isUserSharingVideo", (u) -> u.webcam_stream.length isnt 0 @@ -106,3 +92,14 @@ Handlebars.registerHelper "getUsersInMeeting", -> @getTime = -> # returns epoch in ms (new Date).valueOf() + +Handlebars.registerHelper "isUserTalking", (u) -> + console.log "inside isUserTalking" + console.log u + if u? + u.voiceUser?.talking + else + return false + +Handlebars.registerHelper "isUserSharingAudio", -> + getInSession "isSharingAudio" diff --git a/labs/meteor-client/client/main.html b/labs/meteor-client/client/main.html index 5a792bc94f..44313750f6 100755 --- a/labs/meteor-client/client/main.html +++ b/labs/meteor-client/client/main.html @@ -41,6 +41,12 @@ {{> makeButton id=user.externUserId btn_class="audioFeedIcon navbar-brand" i_class="volume-off" sharingAudio=false _id=_id}} {{/if}} + {{#if isUserTalking user}} + TALKING + {{else}} + NO TALKING + {{/if}} + {{> makeButton id="" btn_class="hideNavbarIcon pull-right navbar-brand" i_class="chevron-up"}} {{> makeButton id="user.externUserId" btn_class="signOutIcon pull-right navbar-brand" i_class="log-out"}} {{> makeButton id="user.externUserId" btn_class="settingsIcon pull-right navbar-brand" i_class="cog"}} diff --git a/labs/meteor-client/client/views/users/user_item.html b/labs/meteor-client/client/views/users/user_item.html index f3a37aaf79..777de6a858 100755 --- a/labs/meteor-client/client/views/users/user_item.html +++ b/labs/meteor-client/client/views/users/user_item.html @@ -28,8 +28,8 @@