diff --git a/camera-ustreamer/Dockerfile b/camera-ustreamer/Dockerfile index 9b6097b..f15b5c5 100644 --- a/camera-ustreamer/Dockerfile +++ b/camera-ustreamer/Dockerfile @@ -87,6 +87,8 @@ RUN apk add -U \ COPY rootfs/ / +RUN cp /opt/janus/share/janus/javascript/janus.js /server + WORKDIR / # Make files executable diff --git a/camera-ustreamer/rootfs/etc/caddy/Caddyfile b/camera-ustreamer/rootfs/etc/caddy/Caddyfile index e2d3284..fa6f7af 100644 --- a/camera-ustreamer/rootfs/etc/caddy/Caddyfile +++ b/camera-ustreamer/rootfs/etc/caddy/Caddyfile @@ -10,7 +10,8 @@ # External access :80 { - root * /opt/janus/share/janus/demos + # root * /opt/janus/share/janus/demos + root * /server handle_path /janus/* { reverse_proxy localhost:8188 # Janus API } diff --git a/camera-ustreamer/rootfs/etc/services.d/janus/down b/camera-ustreamer/rootfs/etc/services.d/janus/down deleted file mode 100644 index e69de29..0000000 diff --git a/camera-ustreamer/rootfs/etc/services.d/ustreamer/finish b/camera-ustreamer/rootfs/etc/services.d/ustreamer/finish deleted file mode 100644 index 0ef5ffe..0000000 --- a/camera-ustreamer/rootfs/etc/services.d/ustreamer/finish +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/execlineb -S0 -# ============================================================================== -# Add-on: camera-ustreamer -# Take down the S6 supervision tree when ustreamer fails -# ============================================================================== -if -n { s6-test $# -ne 0 } -if -n { s6-test ${1} -eq 256 } - -s6-svscanctl -t /var/run/s6/services diff --git a/camera-ustreamer/rootfs/server/index.html b/camera-ustreamer/rootfs/server/index.html index 4afba9d..169c627 100644 --- a/camera-ustreamer/rootfs/server/index.html +++ b/camera-ustreamer/rootfs/server/index.html @@ -31,7 +31,7 @@ // Establish a WebSockets connection to the server. const janus = new Janus({ // Specify the URL of the Janus server’s WebSockets endpoint. - server: `ws://${window.location.hostname}:8188/`, + server: `ws://${window.location.hostname}/janus/`, // Callback function if the client connects successfully. success: attachUStreamerPlugin,