Skip to content
Snippets Groups Projects
Commit 55de28c9 authored by Sergio Vergata's avatar Sergio Vergata
Browse files

Adding StreamView_URL to display in the chat

parent 1008930b
Branches master
No related tags found
No related merge requests found
......@@ -33,6 +33,7 @@ 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_STREAMVIEW_URL - post the viewing URL for the STREAM in the BBB chat (Default: "Secret URL")
* TZ - Timezone (Default: Europe/Vienna)
#### Chat settings
......
......@@ -31,6 +31,8 @@ services:
- BBB_STREAM_URL=rtmp://media_server_url/stream/stream_key
# Message to post in BBB Chat when joining a conference
- BBB_CHAT_MESSAGE=This meeting is streamed to
# post the viewing URL for the STREAM in the BBB chat (Default: "Secret URL")
- BBB_STREAMVIEW_URL=https://yourStream.url
# Resolution to be streamed/downloaded in format WxH (default 1920x1080)
- BBB_RESOLUTION=1920x1080
# stream video bitrate
......
......@@ -86,10 +86,17 @@ then
DEV_SHM_USAGE='--browser-disable-dev-shm-usage'
fi
STREAMVIEW_URL="";
if [ "${BBB_STREAMVIEW_URL}" != "" ]
then
STREAMVIEW_URL="--streamviewUrl ${BBB_STREAMVIEW_URL}";
fi
if [ "${BBB_ENABLE_CHAT}" = "true" ]
then
xvfb-run -n 133 --server-args="-screen 0 1280x720x24" python3 chat.py -s ${BBB_URL} -p ${BBB_SECRET} -i "${BBB_MEETING_ID}" -r ${BBB_REDIS_HOST} -u "${BBB_CHAT_NAME}" -c ${BBB_REDIS_CHANNEL} $START_MEETING $ATTENDEE_PASSWORD $MODERATOR_PASSWORD $DEV_SHM_USAGE -T "$MEETING_TITLE" &
sleep 10
fi
xvfb-run -n 122 --server-args="-screen 0 ${RESOLUTION}x24" python3 stream.py -s ${BBB_URL} -p ${BBB_SECRET} -i "${BBB_MEETING_ID}" -u "${BBB_USER_NAME}" -r "${RESOLUTION}" ${SHOW_CHAT} $START_MEETING $ATTENDEE_PASSWORD $MODERATOR_PASSWORD $DEV_SHM_USAGE -T "$MEETING_TITLE" $STREAM_MEETING $CHAT_STREAM_URL $CHAT_STREAM_MESSAGE $INTRO $BEGIN_INTRO $END_INTRO $DOWNLOAD_MEETING;
xvfb-run -n 122 --server-args="-screen 0 ${RESOLUTION}x24" python3 stream.py -s ${BBB_URL} -p ${BBB_SECRET} -i "${BBB_MEETING_ID}" -u "${BBB_USER_NAME}" -r "${RESOLUTION}" ${SHOW_CHAT} $START_MEETING $ATTENDEE_PASSWORD $MODERATOR_PASSWORD $DEV_SHM_USAGE -T "$MEETING_TITLE" $STREAM_MEETING $CHAT_STREAM_URL $CHAT_STREAM_MESSAGE $INTRO $BEGIN_INTRO $END_INTRO $DOWNLOAD_MEETING $STREAMVIEW_URL;
......@@ -42,6 +42,7 @@ parser.add_argument("-u","--user", help="Name to join the meeting",default="Live
parser.add_argument("-t","--target", help="RTMP Streaming URL")
parser.add_argument("--chatUrl", help="Streaming URL to display in the chat", default=False)
parser.add_argument("--chatMsg", nargs='+', help="Message to display in the chat before Streaming URL", default=False)
parser.add_argument("--streamviewUrl", help="Streaming View URL do display in the chat", default=False)
parser.add_argument("-c","--chat", help="Show the chat",action="store_true")
parser.add_argument("-r","--resolution", help="Resolution as WxH", default='1920x1080')
parser.add_argument('--ffmpeg-stream-threads', help='Threads to use for ffmpeg streaming', type=int,
......@@ -148,13 +149,16 @@ 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_streamviewUrl = os.environ.get('BBB_STREAMVIEW_URL', "Secret URL")
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.streamviewUrl:
tmp_streamviewUrl = args.streamviewUrl
if args.chatMsg:
tmp_chatMsg = ' '.join(args.chatMsg).strip('"')
element.send_keys("{0}: {1}".format(tmp_chatMsg, tmp_chatUrl))
element.send_keys("{0}: {1} {2}".format(tmp_chatMsg, tmp_chatUrl, tmp_streamviewUrl))
chat_send.click()
if args.chat:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment