Skip to content

Commit

Permalink
stream.py: BBB_BACKGROUND_COLOR
Browse files Browse the repository at this point in the history
Override the default background color within the stream.
  • Loading branch information
oxzi committed May 11, 2022
1 parent b0adf8b commit 8a17587
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ You need to set some environment variables to run the container.
* BBB_CHAT_MESSAGE - prefix for the message that would be posted to BBB chat, while joining a conference (Default: "This meeting is streamed to")
* BBB_HIDE_MEETING_TITLE - hide the meeting title in the top bar (Default: false)
* BBB_HIDE_WHO_TALKS - hide the annotation who is currently talking (Default: false)
* BBB_BACKGROUND_COLOR - override background color by a CSS color, e.g., "black" or "#ffffff"
* TZ - Timezone (Default: Europe/Vienna)

#### Chat settings
Expand Down
8 changes: 8 additions & 0 deletions stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@
help='hide the annotation who is currently talking (can be set using env)',
default=bool(strtobool(os.environ.get('BBB_HIDE_WHO_TALKS', '0')))
)
parser.add_argument(
'--bbb-background-color',
help='override background color by a CSS color, e.g., "black" or "#ffffff" (can be set using env)',
default=os.environ.get('BBB_BACKGROUND_COLOR', '')
)

args = parser.parse_args()
# some ugly hacks for additional options
Expand Down Expand Up @@ -240,6 +245,9 @@ def bbb_browser():
except JavascriptException:
browser.execute_script("document.getElementById('app').setAttribute('style','margin-bottom:30px');")

if args.bbb_background_color:
browser.execute_script("document.querySelector('body').setAttribute('style','background-color: %s;');" % args.bbb_background_color)

def create_meeting():
create_params = {}
if args.moderatorPassword:
Expand Down

0 comments on commit 8a17587

Please sign in to comment.