fix: webplayer stuff to eliminate constant buffering

This commit is contained in:
2025-08-21 20:50:50 +02:00
parent cd685edd78
commit 31d27f92ca
3 changed files with 17 additions and 24 deletions

View File

@@ -26,15 +26,20 @@ export default function StreamPlayer() {
autoplay
config={{
lowLatencyMode: true,
liveSyncDurationCount: 2, // Use only 1 segment for sync
liveMaxLatencyDurationCount: 3, // Maximum latency allowed
liveSyncDurationCount: 3,
liveMaxLatencyDurationCount: 6,
liveDurationInfinity: true,
enableWorker: true,
backBufferLength: 0, // No back buffer
startLevel: -1, // Auto level selection
maxBufferLength: 4, // Maximum buffer length in seconds
maxMaxBufferLength: 6,
debug: false,
backBufferLength: 5,
startLevel: -1,
maxBufferLength: 8,
maxMaxBufferLength: 12,
debug: process.env.NODE_ENV === 'development',
maxBufferSize: 60 * 1000 * 1000, // 60mb
maxBufferHole: 0.5,
highBufferWatchdogPeriod: 2,
nudgeOffset: 0.1,
nudgeMaxRetry: 3,
}}
/>
<MediaLoadingIndicator slot="centered-chrome" noAutohide />

View File

@@ -23,26 +23,14 @@ export async function emojisWriteRedis() {
}
function getPath() {
console.log('Current working directory:', process.cwd());
console.log('__dirname:', __dirname);
// List files in current directory
try {
const files = require('fs').readdirSync(process.cwd());
console.log('Files in cwd:', files);
} catch (e) {
// @ts-ignore
console.log('Could not list files in cwd:', e.message);
}
const possiblePaths = [
// Explicit Docker container path
// docker shit
'/app/emojis.json',
'/app/apps/web/emojis.json',
// Current paths
// cwd shit
path.join(process.cwd(), 'emojis.json'),
path.join(process.cwd(), 'apps/web/emojis.json'),
// Fallbacks
// fallbacks
'./emojis.json',
'src/lib/instrumentation/emojis.json',
];

View File

@@ -23,8 +23,8 @@ rtmp {
hls on;
hls_type live;
hls_path /dev/shm/hls;
hls_fragment 2s;
hls_playlist_length 10s;
hls_fragment 1s;
hls_playlist_length 15s;
hls_cleanup on;
hls_variant _low BANDWIDTH=500000;