Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

ishan-open/bigbluebutton_api

Repository files navigation

#BigBlueButton BigBlueButton is an open source web conferencing system for online learning. This means : Open source - you have full access to BigBlueButton’s source code under an open source license. With the source code, installation steps, and community support, you can easily deploy your own BigBlueButton server (or 10 servers if you want).

For each server you can customize it, modify it and integrate it into your products and services. Cool.
Web conferencing system - you get the core features you would expect from a commercial web conferencing system
(but under an open source license). These features include real-time sharing of audio, video, presentation,
and screen – along with collaboration tools such as whiteboard, shared notes, polling, and breakout rooms.
BigBlueButton can record your sessions for later playback.

Online learning - BigBlueButton extends these core features to enable a teacher to engage students for learning.
For example, a tutor can use BigBlueButton’s multi-user whiteboard to help a student with solving a difficult math
problem. BigBlueButton has built-in integrations with all the major learning management systems (LMS),
including Canvas, Jenzabar, Moodle, Sakai, and Schoology.

It also supports Learning Tools Interoperability (LTI) 1.0 for integration
with other LMS systems (such as Blackboard and D2L).

Usage:

instantiate:

>>> from bigbluebutton_api import BigBlueButton
>>> B = BigBlueButton("https://example.com/bigbluebutton/api/", "secret key")

Note:

here are "return_code", "message_key", "message" and "response" arguments in all responses received from the server.

You can access these arguments as follows:

>>> B.craete_room().return_code
>>> B.end_meeting(meeting_id,password).messageKey
>>> B.is_meeting_running(meeting_id).message
>>> B.create_room().response

Available Methods:

Create (create_meeting):

Creates a BigBlueButton meeting.
The create call is idempotent: you can call it multiple times with the same parameters without side effects.
simplifies the logic for joining a user into a session as your application can always call create before returning the join URL to the user.
This way, regardless of the order in which users join, the meeting will always exist when the user tries to join (the first create call actually creates the meeting; subsequent calls to create simply return SUCCESS).
The BigBlueButton server will automatically remove empty meetings that were created but have never had any users after a number of minutes specified by meetingExpireIfNoUserJoinedInMinutes defined in bigbluebutton.properties.

parameters :

name : A name for the meeting. This is now required as of BigBlueButton 2.4.

meeting_id : A meeting ID that can be used to identify this meeting by the 3rd-party application.

attendee_pw : The password that the join URL can later provide as its password parameter to indicate the user will join as a viewer.

moderator_pw : The password that will join URL can later provide as its password parameter to indicate the user will as a moderator.

welcome : A welcome message that gets displayed on the chat window when the participant joins.

dial_number : The dial access number that participants can call in using regular phone.

voice_bridge : Voice conference number for the FreeSWITCH voice conference associated with this meeting.

max_participants: Set the maximum number of users allowed to joined the conference at the same time.

logout_url: The URL that the BigBlueButton client will go to after users click the OK button on the ‘You have been logged out message’.

record: Setting ‘record=true’ instructs the BigBlueButton server to record the media and events in the session for later playback. The default is false.

duration: The maximum length (in minutes) for the meeting.

is_breakout: Must be set to true to create a breakout room.

parent_meeting_id: Must be provided when creating a breakout room, the parent room must be running.

sequence: The sequence number of the breakout room.

free_join: If set to true, the client will give the user the choice to choose the breakout rooms he wants to join.

breakout_rooms_enabled: If set to false, breakout rooms will be disabled. Default: true

breakout_rooms_private_chat_enabled: If set to false, the private chat will be disabled in breakout rooms. Default: true

breakout_rooms_record: If set to false, breakout rooms will not be recorded. Default: true

meta: This is a special parameter type (there is no parameter named just meta).

moderator_only_message: Display a message to all moderators in the public chat.

auto_start_recording: Whether to automatically start recording when first user joins (default false).

allow_start_stop_recording: Allow the user to start/stop recording. (default true)

webcams_only_for_moderator: Setting webcamsOnlyForModerator=true will cause all webcams shared by viewers during this meeting to only appear for moderators (added 1.1)

logo: Setting logo=http://www.example.com/my-custom-logo.png will replace the default logo in the Flash client. (added 2.0)

banner_text: Will set the banner text in the client. (added 2.0)

banner_color: Will set the banner background color in the client. The required format is color hex #FFFFFF. (added 2.0)

copyright: Setting copyright=My custom copyright will replace the default copyright on the footer of the Flash client. (added 2.0)

mute_on_start: Setting true will mute all users when the meeting starts. (added 2.0)

allow_mods_to_unmute_users: Setting to true will allow moderators to unmute other users in the meeting. (added 2.2) Default: false

lock_settings_disable_cam: Setting to true will allow moderators to unmute other users in the meeting. (added 2.2) Default: false

lock_settings_disable_mic: Setting to true will only allow user to join listen only. (added 2.2) Default: false

lock_settings_disable_private_chat: Setting to true will disable private chats in the meeting. (added 2.2) Default: false

lock_settings_disable_public_chat: Setting to true will disable public chat in the meeting. (added 2.2) Default: false

lock_settings_disable_note : Setting to true will disable notes in the meeting. (added 2.2) Default: false

lock_settings_locked_layout: Setting to true will lock the layout in the meeting. (added 2.2) Default: false

lock_settings_lock_on_join : Setting to false will not apply lock setting to users when they join. (added 2.2) Default: true

lock_settings_lock_on_join_configurable : Setting to lockSettingsLockOnJoinConfigurable=true` will allow applying of `lockSettingsLockOnJoin. Default: false

guest_policy: Will set the guest policy for the meeting. The guest policy determines whether or not users who send a join request with guest=true will be allowed to join the meeting. Possible values are ALWAYS_ACCEPT, ALWAYS_DENY, and ASK_MODERATOR. Default: ALWAYS_ACCEPT

meeting_keep_events: Defaults to the value of defaultKeepEvents. If meetingKeepEvents is true BigBlueButton saves meeting events even if the meeting is not recorded (added in 2.3) Default: false

end_when_no_moderator: Default endWhenNoModerator=false. If endWhenNoModerator is true the meeting will end automatically after a delay - see endWhenNoModeratorDelayInMinutes (added in 2.3) Default: false

end_when_no_moderator_delay_in_minutes: Defaults to the value of endWhenNoModeratorDelayInMinutes=1. If endWhenNoModerator is true, the meeting will be automatically ended after this many minutes (added in 2.2) Default: 1

meeting_layout: Will set the default layout for the meeting. Possible values are: CUSTOM_LAYOUT, SMART_LAYOUT, PRESENTATION_FOCUS, VIDEO_FOCUS. (added 2.4) Default: SMART_LAYOUT

learning_dashboard_enabled: Default learningDashboardEnabled=true. When this option is enabled BigBlueButton generates a Dashboard where moderators can view a summary of the activities of the meeting. (added 2.4) Default: true

learning_dashboard_cleanup_delay_in_minutes: Default learningDashboardCleanupDelayInMinutes=2. This option set the delay (in minutes) before the Learning Dashboard become unavailable after the end of the meeting. If this value is zero, the Learning Dashboard will keep available permanently. (added 2.4) Default: 2

allow_mods_to_eject_cameras: Setting to true will allow moderators to close other users cameras in the meeting. (added 2.4) Default: false

example

>>> meeting = B.create_meeting("first meeting").meeting
>>> print(meeting.meeting_id)
>>> print(meeting.meeting_name)
>>> print(meeting.moderator_pw)

Join (join_meeting)

Joins a user to the meeting specified in the meetingID parameter.

parameters

full_name: The full name that is to be used to identify this user to other conference attendees.

meeting_id: The meeting ID that identifies the meeting you are attempting to join.

password: The password that this attendee is using. If the moderator password is supplied, he will be given moderator status (and the same for attendee password, etc)

create_time: Third-party apps using the API can now pass createTime parameter (which was created in the create call), BigBlueButton will ensure it matches the ‘createTime’ for the session. If they differ, BigBlueButton will not proceed with the join request. This prevents a user from reusing their join URL for a subsequent session with the same meetingID.

user_id: An identifier for this user that will help your application to identify which person this is. This user ID will be returned for this user in the getMeetingInfo API call so that you can check

web_voice_conf: If you want to pass in a custom voice-extension when a user joins the voice conference using voip. This is useful if you want to collect more info in you Call Detail Records about the user joining the conference.

config_token: If you want to pass in a custom voice-extension when a user joins the voice conference using voip. This is useful if you want to collect more info in you Call Detail Records about the user joining the conference.

default_layout: The layout name to be loaded first when the application is loaded.

avatar_url: The link for the user’s avatar to be displayed (default can be enabled/disabled and set with “useDefaultAvatar“ and “defaultAvatarURL“ in bbb-web.properties).

redirect: The default behaviour of the JOIN API is to redirect the browser to the Flash client when the JOIN call succeeds.

client_url: Some third party apps what to display their own custom client. These apps can pass the URL containing the custom client and when redirect is not set to false, the browser will get redirected to the value of clientURL.

guest: Set to “true” to indicate that the user is a guest, otherwise do NOT send this parameter.

role: Define user role for the meeting. Accept the values(case insensitive) MODERATOR or VIEWER. If the role parameter is present and it's a valid option, it will take over of any password parameter provided. Added in BBB 2.4

exclude_from_dashboard: If the parameter is passed on JOIN with value `true`, the user will be omitted from being displayed in the Learning Dashboard. The use case is for support agents who drop by to support the meeting / resolve tech difficulties. Added in BBB 2.4

example

>>> print(B.join_meeting("fname lname", "meeting_id", "moderator password"))
>>> print(B.join_meeting("fname lname", "meeting_id", "attendee password"))

isMeetingRunning (is_meeting_running)

This call enables you to simply check on whether or not a meeting is running by looking it up with your meeting ID.

parameters

meeting_id: The meeting ID that identifies the meeting you are attempting to check on.

example

>>> print(B.is_meeting_running("meeting_id").running)

End (end_meeting)

Use this to forcibly end a meeting and kick all participants out of the meeting.

parameters

meeting_id: The meeting ID that identifies the meeting you are attempting to end.

password: The moderator password for this meeting. You can not end a meeting using the attendee password.

example

>>> print(B.end_meeting("meeting_id", "moderator pw").message_key)

getMeetingInfo (get_meeting_info)

This call will return all of a meeting’s information, including the list of attendees as well as start and end times.

parameters

meeting_id: The meeting ID that identifies the meeting you are attempting to check on.

example

>>> meeting = B.get_meeting_info("meeting_id").info
>>> print(meeting.meeting_name)
>>> print(meeting.moderator_pw)
>>> print(meeting.has_user_joined)

getMeetings (get_meetings)

This call will return a list of all the meetings found on this server.

example

>>> meetings = B.get_meetings().meetings
>>> for meeting in meetings:
>>>     print(meeting.meeting_name)
>>>     print(meeting.meeting_id)

getRecordings (get_recordings)

Retrieves the recordings that are available for playback for a given meetingID (or set of meeting IDs).

example

>>> recordings = B.get_recordings().recordings
>>> for rec in recordings:
>>>    print(rec.record_id)
>>>    print(rec.meeting_id)

publishRecordings (publish_recordings)

Publish and unpublish recordings for a given recordID (or set of record IDs).

parameters

record_id: A record ID for specify the recordings to apply the publish action. It can be a set of record IDs separated by commas.

publish: The value for publish or unpublish the recording(s). Available values: true or false.

example

>>> print(B.publish_recordings("record_id1,record_id2").published)

deleteRecordings (delete_recordings)

Delete one or more recordings for a given recordID (or set of record IDs).

parameters

record_id: A record ID for specify the recordings to delete. It can be a set of record IDs separated by commas.

example

print(B.delete_recordings("record_id1,record_id2").deleted)

updateRecordings (update_recordings)

Update metadata for a given recordID (or set of record IDs)

parameters

record_id: A record ID for specify the recordings to apply the publish action. It can be a set of record IDs separated by commas.

meta: You can pass one or more metadata values to be updated. The format of these parameters is the same as the metadata passed to the create call. For more information see the docs for the create call. When meta_parameter=NOT EMPTY and meta_parameter exists its value is updated, if it doesn’t exist, the parameter is added. When meta_parameter=, and meta_parameter exists the key is removed, when it doesn’t exist the action is ignored.

example

print(B.update_recordings("record_id1,record_id2", {"new": "value"}).updated)

getDefaultConfigXML (get_default_config_xml)

Retrieve the default config.xml. This call enables a 3rd party application to get the current config.xml, modify it’s parameters, and use setConfigXML to store it on the BigBlueButton server (getting a reference token to the new config.xml), then using the token in as a parameter in the join URL to override the default config.xml.

example

print(B.get_default_config_xml()) # will returns configs as a dict

setConfigXML (set_config_xml)

Associate a custom config.xml file with the current session. This call returns a token that can later be passed as a parameter to a join URL. When passed as a parameter, the BigBlueButton client will use the associated config.xml for the user instead of using the default config.xml. This enables 3rd party applications to provide user-specific config.xml files.

parameters

meeting_id: A meetingID to an active meeting

confix_xml: A valid config.xml file as string

example

print(B.set_config_xml("meeting_id", "some xml config").token)

About

python wrapper for BigBlueButton api

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages