Load the direct-transfer protocol from public/ inside the container image
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
import { randomBytes } from 'node:crypto';
|
||||
import protocol from '../frontend/direct-protocol.js';
|
||||
import { existsSync } from 'node:fs';
|
||||
import { createRequire } from 'node:module';
|
||||
|
||||
// The image copies frontend/ to ./public, so fall back to that path in production.
|
||||
const protocol = createRequire(import.meta.url)(
|
||||
existsSync(new URL('../frontend/direct-protocol.js', import.meta.url))
|
||||
? '../frontend/direct-protocol.js'
|
||||
: './public/direct-protocol.js',
|
||||
);
|
||||
|
||||
// One instance per authenticated room. It has no media endpoint or binary path.
|
||||
export function createDirectRelay({ now = Date.now } = {}) {
|
||||
|
||||
Reference in New Issue
Block a user