Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ENV_VARIABLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@
| SE_NODE_GRACEFUL_SHUTDOWN | | | |
| SE_VIDEO_CONTAINER_NAME | | | |
| SE_RECORD_VIDEO | false | | |
| SE_VIDEO_READY_ENABLED | (derived) | Controls whether `video_ready.py` (the video-readiness HTTP server, `VIDEO_READY_PORT`, default 9000) starts at all. Defaults to `true` whenever `SE_RECORD_VIDEO` or `SE_VIDEO_EVENT_DRIVEN` is `true` - the Node image default (`SE_VIDEO_EVENT_DRIVEN=true`) keeps it running even with `SE_RECORD_VIDEO=false`, so a session can still turn recording on via the `se:recordVideo` capability. Set this directly to `false` to force the server off (e.g. to free the port under `network_mode: host`) regardless of the other two, or `true` to force it on. | |
| VIDEO_READY_PORT | 9000 | Port `video_ready.py` listens on for readiness checks | |
| SE_ENABLE_BROWSER_LEFTOVERS_CLEANUP | false | | |
| SE_NODE_MAX_SESSIONS | 1 | Set the number of maximum concurrent sessions per browser Node, by default is 1 | --max-sessions |
| SE_NODE_OVERRIDE_MAX_SESSIONS | false | By default is false, enable this flag for setting max session take effect in browser Node | --override-max-sessions |
Expand Down
19 changes: 19 additions & 0 deletions Video/entry_point.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,25 @@ if [ -n "${VIRTUAL_ENV}" ]; then
python3 --version
fi

#==============================================
# video-ready (video_ready.py) binds VIDEO_READY_PORT (default 9000) to serve
# readiness status. It only needs to run when recording can actually happen:
# either SE_RECORD_VIDEO is on, or SE_VIDEO_EVENT_DRIVEN lets a session turn
# it on dynamically via the se:recordVideo capability. In the remaining case
# (legacy mode, recording off) video_ready.py's own handler would always
# answer "ready" anyway, so skipping it avoids binding the port for nothing -
# recorder.conf reads this to gate video-ready's autostart/autorestart.
# Set it directly to override either default, e.g. force it off under
# network_mode: host regardless of the two vars above.
if [ -z "${SE_VIDEO_READY_ENABLED}" ]; then
if [ "$(echo "${SE_RECORD_VIDEO:-true}" | tr '[:upper:]' '[:lower:]')" = "true" ] ||
[ "$(echo "${SE_VIDEO_EVENT_DRIVEN:-false}" | tr '[:upper:]' '[:lower:]')" = "true" ]; then
export SE_VIDEO_READY_ENABLED=true
else
export SE_VIDEO_READY_ENABLED=false
fi
fi

supervisord --configuration /etc/supervisord.conf &

SUPERVISOR_PID=$!
Expand Down
4 changes: 2 additions & 2 deletions Video/recorder.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ stdout_logfile_maxbytes=0
priority=0
command=python3 /opt/bin/video_ready.py
killasgroup=true
autostart=true
autostart=%(ENV_SE_VIDEO_READY_ENABLED)s
startsecs=0
autorestart=true
autorestart=%(ENV_SE_VIDEO_READY_ENABLED)s
stopsignal=TERM
stopwaitsecs=5

Expand Down
Loading