forked from External/greenlight
Removed code for autoclose as the bbb session will be open in the same tab/window
This commit is contained in:
parent
cd867f9e20
commit
f8ff8cdd28
|
@ -6,23 +6,27 @@ module BbbHelper
|
||||||
else
|
else
|
||||||
meeting_id = (Digest::SHA1.hexdigest(Rails.application.secrets[:secret_key_base]+meeting_token)).to_s
|
meeting_id = (Digest::SHA1.hexdigest(Rails.application.secrets[:secret_key_base]+meeting_token)).to_s
|
||||||
|
|
||||||
#See if the meeting is running
|
# See if the meeting is running
|
||||||
begin
|
begin
|
||||||
bbb_meeting_info = bbb.get_meeting_info( meeting_id, nil )
|
bbb_meeting_info = bbb.get_meeting_info( meeting_id, nil )
|
||||||
rescue BigBlueButton::BigBlueButtonException => exc
|
rescue BigBlueButton::BigBlueButtonException => exc
|
||||||
|
# This means that is not created
|
||||||
logger.info "Message for the log file #{exc.key}: #{exc.message}"
|
logger.info "Message for the log file #{exc.key}: #{exc.message}"
|
||||||
#This means that is not created, so create the meeting
|
|
||||||
logout_url = "#{request.base_url}/bbb/close" #Closes the window after correct logout
|
# Prepare parameters for create
|
||||||
|
logout_url = "#{request.base_url}/meeting/#{meeting_token}"
|
||||||
moderator_password = random_password(12)
|
moderator_password = random_password(12)
|
||||||
viewer_password = random_password(12)
|
viewer_password = random_password(12)
|
||||||
meeting_options = {:record => meeting_recorded.to_s, :logoutURL => logout_url, :moderatorPW => moderator_password, :attendeePW => viewer_password }
|
meeting_options = {:record => meeting_recorded.to_s, :logoutURL => logout_url, :moderatorPW => moderator_password, :attendeePW => viewer_password }
|
||||||
|
|
||||||
|
# Create the meeting
|
||||||
bbb.create_meeting(meeting_token, meeting_id, meeting_options)
|
bbb.create_meeting(meeting_token, meeting_id, meeting_options)
|
||||||
|
|
||||||
#And then get meeting info
|
# And then get meeting info
|
||||||
bbb_meeting_info = bbb.get_meeting_info( meeting_id, nil )
|
bbb_meeting_info = bbb.get_meeting_info( meeting_id, nil )
|
||||||
end
|
end
|
||||||
|
|
||||||
#Get the join url
|
# Get the join url
|
||||||
if (user_is_moderator)
|
if (user_is_moderator)
|
||||||
password = bbb_meeting_info[:moderatorPW]
|
password = bbb_meeting_info[:moderatorPW]
|
||||||
else
|
else
|
||||||
|
|
|
@ -57,8 +57,6 @@ $(document).ready(function($) {
|
||||||
$(location).attr("href", data.response.join_url);
|
$(location).attr("href", data.response.join_url);
|
||||||
},
|
},
|
||||||
error : function(xhr, status, error) {
|
error : function(xhr, status, error) {
|
||||||
console.info(status);
|
|
||||||
console.info(error);
|
|
||||||
},
|
},
|
||||||
complete : function(xhr, status) {
|
complete : function(xhr, status) {
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
get 'bbb/join/:id', to: 'bbb#join', as: :bbb_join
|
get 'bbb/join/:id', to: 'bbb#join', as: :bbb_join
|
||||||
get 'bbb/close'
|
|
||||||
|
|
||||||
get 'meeting(/:id)', to: 'landing#index'
|
get 'meeting(/:id)', to: 'landing#index'
|
||||||
get '/auth/:provider/callback', to: 'sessions#create'
|
get '/auth/:provider/callback', to: 'sessions#create'
|
||||||
|
|
Loading…
Reference in New Issue