Ability to autojoin listen only on startup

This commit is contained in:
perroned 2015-04-14 09:05:32 -07:00
parent 6dd0e13632
commit 321ba43850
5 changed files with 19 additions and 18 deletions

View File

@ -188,6 +188,11 @@ Handlebars.registerHelper "visibility", (section) ->
str = str.replace http, "<a href='event:$1'><u>$1</u></a>"
str = str.replace www, "$1<a href='event:http://$2'><u>$2</u></a>"
@introToAudio = (event, {isListenOnly} = {}) ->
isListenOnly ?= true
joinVoiceCall event, isListenOnly: isListenOnly
displayWebRTCNotification()
# check the chat history of the user and add tabs for the private chats
@populateChatTabs = (msg) ->
myUserId = getInSession "userId"

View File

@ -7,7 +7,7 @@ safariIconPath = 'M16.154,5.135c-0.504,0-1,0.031-1.488,0.089l-0.036-0.18c-0.021-
# RaphaelJS "Internet Explorer" icon
ieIconPath = 'M27.998,2.266c-2.12-1.91-6.925,0.382-9.575,1.93c-0.76-0.12-1.557-0.185-2.388-0.185c-3.349,0-6.052,0.985-8.106,2.843c-2.336,2.139-3.631,4.94-3.631,8.177c0,0.028,0.001,0.056,0.001,0.084c3.287-5.15,8.342-7.79,9.682-8.487c0.212-0.099,0.338,0.155,0.141,0.253c-0.015,0.042-0.015,0,0,0c-2.254,1.35-6.434,5.259-9.146,10.886l-0.003-0.007c-1.717,3.547-3.167,8.529-0.267,10.358c2.197,1.382,6.13-0.248,9.295-2.318c0.764,0.108,1.567,0.165,2.415,0.165c5.84,0,9.937-3.223,11.399-7.924l-8.022-0.014c-0.337,1.661-1.464,2.548-3.223,2.548c-2.21,0-3.729-1.211-3.828-4.012l15.228-0.014c0.028-0.578-0.042-0.985-0.042-1.436c0-5.251-3.143-9.355-8.255-10.663c2.081-1.294,5.974-3.209,7.848-1.681c1.407,1.14,0.633,3.533,0.295,4.518c-0.056,0.254,0.24,0.296,0.296,0.057C28.814,5.573,29.026,3.194,27.998,2.266zM13.272,25.676c-2.469,1.475-5.873,2.539-7.539,1.289c-1.243-0.935-0.696-3.468,0.398-5.938c0.664,0.992,1.495,1.886,2.473,2.63C9.926,24.651,11.479,25.324,13.272,25.676zM12.714,13.046c0.042-2.435,1.787-3.49,3.617-3.49c1.928,0,3.49,1.112,3.49,3.49H12.714z'
displayWebRTCNotification = ->
@displayWebRTCNotification = ->
if getInSession('webrtc_notification_is_displayed') is false # prevents the notification from displaying until the previous one is hidden
if !isWebRTCAvailable() # verifies if the browser supports WebRTC
$('.notification').addClass('webrtc-support-notification')
@ -58,7 +58,7 @@ displayWebRTCNotification = ->
# this method gets called from either mobile or desktop UI
# this method will adjust the UI to compensate for the new audio button
introToAudio = ({isMobile} = {}) ->
displayAudioSelectionMenu = ({isMobile} = {}) ->
isMobile ?= false
$('.joinAudioButton').blur()
@ -66,15 +66,7 @@ introToAudio = ({isMobile} = {}) ->
toggleSlidingMenu()
if isMobile
if BBB.amISharingAudio()
$('.navbarTitle').css('width', '70%')
else
$('.navbarTitle').css('width', '55%')
else
if BBB.amISharingAudio()
$('.navbarTitle').css('width', $('#navbar').width() - 358.4)
else
$('.navbarTitle').css('width', $('#navbar').width() - 409.6)
$('.navbarTitle').css('width', '55%')
# pop open the dialog allowing users to choose the audio options
if isLandscapeMobile()
@ -83,6 +75,7 @@ introToAudio = ({isMobile} = {}) ->
$('.joinAudio-dialog').addClass('desktop-joinAudio-dialog')
$("#joinAudioDialog").dialog("open")
# Helper to load javascript libraries from the BBB server
loadLib = (libname) ->
successCallback = ->
@ -120,7 +113,7 @@ Template.footer.helpers
Template.header.events
"click .joinAudioButton": (event) ->
introToAudio(isMobile: false)
displayAudioSelectionMenu(isMobile: false)
"click .chatBarIcon": (event) ->
$(".tooltip").hide()
@ -193,7 +186,7 @@ Template.header.events
Template.slidingMenu.events
'click .joinAudioButton': (event) ->
introToAudio(isMobile: true)
displayAudioSelectionMenu(isMobile: true)
'click .chatBarIcon': (event) ->
$('.tooltip').hide()
@ -257,12 +250,10 @@ Template.main.rendered = ->
# jQuery click events are handled here. Meteor click handlers don't get called.
# we pass in a named boolean parameter the whether we wish to join audio as listen only or not
$("#microphone").click ->
joinVoiceCall @, isListenOnly: false
displayWebRTCNotification()
introToAudio @, isListenOnly: false
$("#listen_only").click ->
joinVoiceCall @, isListenOnly: true
displayWebRTCNotification()
introToAudio @, isListenOnly: true
$("#dialog").dialog(
modal: true
@ -323,6 +314,8 @@ Template.main.rendered = ->
$('#shield').click () ->
toggleSlidingMenu()
displayAudioSelectionMenu(isMobile:isMobile())
Template.makeButton.rendered = ->
$('button[rel=tooltip]').tooltip()

View File

@ -64,7 +64,7 @@
</div>
{{#if amIListenOnlyAudio}}
<!-- shows you are listen only. Will not handle clicks. Only for display -->
<i class="icon ion-speakerphone btn navbarButton audioButton listenOnlyIcon" rel="tooltip" data-placement="bottom" title="Listen Only"></i>
<i class="icon ion-speakerphone btn navbarButton audioButton listenOnlyIcon navbarIconToggleActive" rel="tooltip" data-placement="bottom" title="Listen Only"></i>
{{else}}
{{#if isCurrentUserMuted}}
<!-- if you are muted the button representing your status will show volume off -->

View File

@ -21,6 +21,9 @@ config.app = {}
config.app.mobileFont = 24
config.app.desktopFont = 12
# Will join the user into the listen only stream whenn the meeting has begun
config.app.joinListenOnlyOnLogin = true
# Configs for redis
config.redis = {}
config.redis.host = "127.0.0.1"

0
bigbluebutton-html5/app/lib/router.coffee Normal file → Executable file
View File