Class: BigbluebuttonRails::Configuration
- Inherits:
-
Object
- Object
- BigbluebuttonRails::Configuration
- Defined in:
- lib/bigbluebutton_rails/configuration.rb
Instance Attribute Summary collapse
-
#api_secret ⇒ Object
Returns the value of attribute api_secret.
-
#controllers ⇒ Object
Returns the value of attribute controllers.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#downloadable_playback_types ⇒ Object
Returns the value of attribute downloadable_playback_types.
-
#get_create_options ⇒ Object
Returns the value of attribute get_create_options.
-
#get_invitation_url ⇒ Object
Returns the value of attribute get_invitation_url.
-
#get_join_options ⇒ Object
Returns the value of attribute get_join_options.
-
#guest_support ⇒ Object
Returns the value of attribute guest_support.
-
#match_room_recording ⇒ Object
Returns the value of attribute match_room_recording.
-
#metadata_invalid_keys ⇒ Object
Returns the value of attribute metadata_invalid_keys.
-
#metadata_invitation_url ⇒ Object
Returns the value of attribute metadata_invitation_url.
-
#metadata_room_id ⇒ Object
Returns the value of attribute metadata_room_id.
-
#metadata_user_id ⇒ Object
Returns the value of attribute metadata_user_id.
-
#metadata_user_name ⇒ Object
Returns the value of attribute metadata_user_name.
-
#playback_iframe ⇒ Object
Returns the value of attribute playback_iframe.
-
#playback_url_authentication ⇒ Object
Returns the value of attribute playback_url_authentication.
-
#routing_scope ⇒ Object
Returns the value of attribute routing_scope.
-
#select_server ⇒ Object
methods.
-
#use_local_voice_bridges ⇒ Object
Returns the value of attribute use_local_voice_bridges.
-
#user_attr_id ⇒ Object
Returns the value of attribute user_attr_id.
-
#user_attr_name ⇒ Object
Returns the value of attribute user_attr_name.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #set_controllers(options) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 27 def initialize @controllers = { servers: 'bigbluebutton/servers', rooms: 'bigbluebutton/rooms', recordings: 'bigbluebutton/recordings', playback_types: 'bigbluebutton/playback_types' } @routing_scope = 'bigbluebutton' @debug = false @metadata_room_id = :'bbbrails-room-id' @metadata_user_id = :'bbbrails-user-id' @metadata_user_name = :'bbbrails-user-name' @metadata_invitation_url = :'invitation-url' @metadata_invalid_keys = [ @metadata_room_id, @metadata_user_id, @metadata_user_name, @metadata_invitation_url ] @user_attr_name = :'name' @user_attr_id = :'id' @use_local_voice_bridges = false @guest_support = false # Flag to use authentication on playback url @playback_url_authentication = false # If true, show all non downloadable playbacks inside an iframe instead of # redirecting to their URL @playback_iframe = false # Name of the playback formats that can be downloaded. They are treated differently # from those that play in a web page, for example. @downloadable_playback_types = ['presentation_video', 'presentation_export'] # How to find the room of a recording using the `data` returned by # a `getRecordings`. @match_room_recording = Proc.new do |data, *args| BigbluebuttonRoom.find_by_meetingid(data[:meetingid]) end # Default method to return the invitation URL of a room. By default # returns nil (disable the feature). @get_invitation_url = Proc.new{ |room| nil } # Define this method to return extra parameters to be passed to a `create` call. # `user` is the user creating the meeting, if any. @get_create_options = Proc.new{ |room, user| nil } # Define this method to return extra parameters to be passed to a `join` call. # `user` is the user joining the meeting, if any. @get_join_options = Proc.new{ |room, user| nil } # Selects a server to be used by `room` whenever it needs to make API calls. # By default, if no servers are available an exception is raised. # # This method can be overwritten to change the way the server is selected # before a room is used. `api_method` contains the API method that is being # called. Any server returned here will be used. It *must* return a server, # otherwise the API calls will fail and the code will probably break. # # One good example is to always select a new server when a meeting is being # created (in case `api_method` is `:create`), making this a simple load # balancing tool that can work well in simple cases. @select_server = Proc.new do |room, api_method=nil| room.select_server(api_method) end # Secret used to authenticate API calls. API calls received are expected to set # the HTTP header "Authorization" with a value "Bearer 123123123123", where # "123123123123" is the secret set in `api_secret`. # Notice that this header has the secret in clear text in the HTTP request, so # only use it if your application is hosted with HTTPS. # Set it to an empty string to disable authentication. Set it to nil to deny all # requests (disable the API). @api_secret = nil end |
Instance Attribute Details
#api_secret ⇒ Object
Returns the value of attribute api_secret.
14 15 16 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 14 def api_secret @api_secret end |
#controllers ⇒ Object
Returns the value of attribute controllers.
4 5 6 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 4 def controllers @controllers end |
#debug ⇒ Object
Returns the value of attribute debug.
18 19 20 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 18 def debug @debug end |
#downloadable_playback_types ⇒ Object
Returns the value of attribute downloadable_playback_types.
17 18 19 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 17 def downloadable_playback_types @downloadable_playback_types end |
#get_create_options ⇒ Object
Returns the value of attribute get_create_options.
24 25 26 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 24 def @get_create_options end |
#get_invitation_url ⇒ Object
Returns the value of attribute get_invitation_url.
23 24 25 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 23 def get_invitation_url @get_invitation_url end |
#get_join_options ⇒ Object
Returns the value of attribute get_join_options.
25 26 27 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 25 def @get_join_options end |
#guest_support ⇒ Object
Returns the value of attribute guest_support.
3 4 5 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 3 def guest_support @guest_support end |
#match_room_recording ⇒ Object
Returns the value of attribute match_room_recording.
22 23 24 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 22 def match_room_recording @match_room_recording end |
#metadata_invalid_keys ⇒ Object
Returns the value of attribute metadata_invalid_keys.
10 11 12 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 10 def @metadata_invalid_keys end |
#metadata_invitation_url ⇒ Object
Returns the value of attribute metadata_invitation_url.
9 10 11 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 9 def @metadata_invitation_url end |
#metadata_room_id ⇒ Object
Returns the value of attribute metadata_room_id.
6 7 8 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 6 def @metadata_room_id end |
#metadata_user_id ⇒ Object
Returns the value of attribute metadata_user_id.
7 8 9 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 7 def @metadata_user_id end |
#metadata_user_name ⇒ Object
Returns the value of attribute metadata_user_name.
8 9 10 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 8 def @metadata_user_name end |
#playback_iframe ⇒ Object
Returns the value of attribute playback_iframe.
16 17 18 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 16 def playback_iframe @playback_iframe end |
#playback_url_authentication ⇒ Object
Returns the value of attribute playback_url_authentication.
15 16 17 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 15 def playback_url_authentication @playback_url_authentication end |
#routing_scope ⇒ Object
Returns the value of attribute routing_scope.
5 6 7 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 5 def routing_scope @routing_scope end |
#select_server ⇒ Object
methods
21 22 23 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 21 def select_server @select_server end |
#use_local_voice_bridges ⇒ Object
Returns the value of attribute use_local_voice_bridges.
13 14 15 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 13 def use_local_voice_bridges @use_local_voice_bridges end |
#user_attr_id ⇒ Object
Returns the value of attribute user_attr_id.
12 13 14 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 12 def user_attr_id @user_attr_id end |
#user_attr_name ⇒ Object
Returns the value of attribute user_attr_name.
11 12 13 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 11 def user_attr_name @user_attr_name end |
Instance Method Details
#set_controllers(options) ⇒ Object
105 106 107 108 109 |
# File 'lib/bigbluebutton_rails/configuration.rb', line 105 def set_controllers() unless .nil? || .empty? @controllers.merge!().slice!(:servers, :rooms, :recordings, :playback_types) end end |