Commit 23a0680a authored by Samuel MARTIN MORO's avatar Samuel MARTIN MORO
Browse files

Merge remote-tracking branch 'origin/master' into k8s

parents 2886cad6 2fae7d2d
......@@ -39,6 +39,7 @@ You need to set some environment variables to run the container.
* BBB_REDIS_HOST - Set REDIS host (Default: redis)
* BBB_REDIS_CHANNEL - Set REDIS channel (Default: chat)
* BBB_CHAT_NAME - the username to join the meeting for chatting. (Default: Chat)
* BBB_CHAT_STREAM_URL - The URL of the stream that should be displayed in the chat (Default: rtmp:// destination)
#### Debug
* DEBUG - settings this to non-empty value will result in more verbose output
......
......@@ -8,6 +8,12 @@ then
STREAM_MEETING="-l -t ${BBB_STREAM_URL}";
fi
CHAT_STREAM_URL="";
if [ "${BBB_CHAT_STREAM_URL}" != "" ]
then
CHAT_STREAM_URL="--chatUrl ${BBB_CHAT_STREAM_URL}";
fi
DOWNLOAD_MEETING="";
if [ "${BBB_DOWNLOAD_MEETING}" = "true" ]
then
......@@ -80,4 +86,4 @@ then
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 $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 $INTRO $BEGIN_INTRO $END_INTRO $DOWNLOAD_MEETING;
......@@ -14,6 +14,7 @@ from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from datetime import datetime
import time
downloadProcess = None
browser = None
......@@ -37,6 +38,7 @@ parser.add_argument("-M","--moderatorPassword", help="moderator password (requir
parser.add_argument("-T","--meetingTitle", help="meeting title (required to create a meeting)")
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("-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,
......@@ -142,7 +144,10 @@ def bbb_browser():
chat_send = browser.find_elements_by_css_selector('[aria-label="Send message"]')[0]
# ensure chat is enabled (might be locked by moderator)
if element.is_enabled() and chat_send.is_enabled():
element.send_keys("This meeting is streamed to: %s" % args.target.partition('//')[2].partition('/')[0])
tmp_chatUrl = args.target.partition('//')[2].partition('/')[0]
if args.chatUrl:
tmp_chatUrl = args.chatUrl
element.send_keys("This meeting is streamed to: %s" % tmp_chatUrl)
chat_send.click()
if args.chat:
......@@ -155,6 +160,7 @@ def bbb_browser():
# ignore (chat might be disabled)
logging.info("could not find chat input or chat toggle")
time.sleep(10)
if not args.chat:
try:
element = browser.find_elements_by_css_selector('button[aria-label="Users and messages toggle"]')[0]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment