move web components to web/

This commit is contained in:
2025-10-10 23:13:03 -07:00
parent 623b562e8d
commit 52968df567
46 changed files with 0 additions and 0 deletions

46
web/entrypoint.sh Executable file
View File

@@ -0,0 +1,46 @@
#!/bin/bash
# Check if browser playback is enabled
if [ "$ENABLE_BROWSER_PLAYBACK" = "1" ]; then
echo "Browser playback enabled - setting up audio streaming..."
echo "Starting PulseAudio..."
pulseaudio --start --log-target=syslog --system=false
# Wait a moment for PulseAudio to initialize
sleep 2
# Create virtual sink
echo "Creating virtual audio sink..."
pactl load-module module-null-sink sink_name=virtual_output sink_properties=device.description="Virtual_Audio_Output"
# Make it the default sink
pactl set-default-sink virtual_output
# Create stream directory if it doesn't exist
mkdir -p ./dist/frontend/stream
# Start FFmpeg streaming in background
echo "Starting audio stream..."
FFMPEG_OPTS="-loglevel error -f pulse \
-i virtual_output.monitor \
-c:a aac -b:a 128k \
-f hls \
-hls_time 1 \
-hls_list_size 3 \
-hls_flags delete_segments+append_list \
-hls_segment_type mpegts \
-hls_segment_filename ./dist/frontend/stream/segment_%03d.ts \
./dist/frontend/stream/audio.m3u8"
echo "FFmpeg options: $FFMPEG_OPTS"
ffmpeg $FFMPEG_OPTS &
else
echo "Browser playback disabled - skipping audio streaming setup"
fi
# Start the Node.js server
echo "Starting Node.js server..."
exec node build/server.js