Skip to content

Commit

Permalink
stream.py: BBB_HIDE_MEETING_TITLE and BBB_HIDE_WHO_TALKS
Browse files Browse the repository at this point in the history
Flags to hide both the meeting's title as well as who is currently
talking. Those are separate flags, as one might only want one of those,
depending on the specific kind of meeting.
  • Loading branch information
oxzi committed May 11, 2022
1 parent c941aa3 commit b0adf8b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ You need to set some environment variables to run the container.
* BBB_SHOW_CHAT - shows the chat on the left side of the window (Default: false)
* BBB_RESOLUTION - the streamed/downloaded resolution (Default: 1920x1080)
* 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)
* TZ - Timezone (Default: Europe/Vienna)

#### Chat settings
Expand Down
18 changes: 18 additions & 0 deletions stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from selenium.webdriver.common.by import By

from datetime import datetime
from distutils.util import strtobool
import time

browser = None
Expand Down Expand Up @@ -72,6 +73,18 @@
'--browser-disable-dev-shm-usage', action='store_true', default=False,
help='do not use /dev/shm',
)
parser.add_argument(
'--bbb-hide-meeting-title',
type=bool,
help='hide the meetings title in the top bar (can be set using env)',
default=bool(strtobool(os.environ.get('BBB_HIDE_MEETING_TITLE', '0')))
)
parser.add_argument(
'--bbb-hide-who-talks',
type=bool,
help='hide the annotation who is currently talking (can be set using env)',
default=bool(strtobool(os.environ.get('BBB_HIDE_WHO_TALKS', '0')))
)

args = parser.parse_args()
# some ugly hacks for additional options
Expand Down Expand Up @@ -196,6 +209,11 @@ def bbb_browser():
browser.execute_script("document.querySelectorAll('div[class^=\"navbar\"] > div[class^=\"top\"] > div[class^=\"center\"] > :not(h1)').forEach((ele) => ele.style.display='none');")
browser.execute_script("document.querySelector('div[class^=\"navbar\"] > div[class^=\"top\"] > div[class^=\"right\"]').style.display='none';")

if args.bbb_hide_meeting_title:
browser.execute_script("document.querySelector('div[class^=\"navbar\"] > div[class^=\"top\"]').style.display='none';")
if args.bbb_hide_who_talks:
browser.execute_script("document.querySelector('div[class^=\"navbar\"] > div[class^=\"bottom\"]').style.display='none';")

browser.execute_script("document.querySelector('[aria-label=\"Actions bar\"]').style.display='none';")

browser.execute_script("""
Expand Down

0 comments on commit b0adf8b

Please sign in to comment.