Skip to content

Commit

Permalink
Merge pull request #136 from Mte90/patch-2
Browse files Browse the repository at this point in the history
Don't crash if RTMP value is not passed
  • Loading branch information
mtsonline authored Feb 7, 2022
2 parents e63c29c + 3d33368 commit 60ca050
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,21 @@ def bbb_browser():
# ensure chat is enabled (might be locked by moderator)
if element.is_enabled() and chat_send.is_enabled():
tmp_chatMsg = os.environ.get('BBB_CHAT_MESSAGE', "This meeting is streamed to")
tmp_chatCustomMsg = os.environ.get('BBB_CHAT_CUSTOM_MESSAGE', "This meeting is streamed to")
if not tmp_chatMsg in [ 'false', 'False', 'FALSE' ]:
tmp_chatUrl = args.target.partition('//')[2].partition('/')[0]
if args.chatUrl:
tmp_chatUrl = args.chatUrl
if args.chatMsg:
tmp_chatMsg = ' '.join(args.chatMsg).strip('"')
element.send_keys("{0}: {1}".format(tmp_chatMsg, tmp_chatUrl))
if args.target is not None:
tmp_chatUrl = args.target.partition('//')[2].partition('/')[0]
if args.chatUrl:
tmp_chatUrl = args.chatUrl
if args.chatMsg:
tmp_chatMsg = ' '.join(args.chatMsg).strip('"')
tmp_chatMsg = "{0}: {1}".format(tmp_chatMsg, tmp_chatUrl)
else if tmp_chatCustomMsg != '':
tmp_chatMsg = tmp_chatCustomMsg
else:
tmp_chatMsg = "Recording in progress!"

element.send_keys(tmp_chatMsg)
chat_send.click()

if args.chat:
Expand Down

0 comments on commit 60ca050

Please sign in to comment.