fix(voice): screen share join timeout — Streamer join hangs with dual voice conn

This commit is contained in:
asepharyana
2026-08-03 08:19:05 +07:00
parent 53f26185bc
commit 8528f2c73d
@@ -74,7 +74,20 @@ export class ScreenShareController {
`Voice channel ${status.activeChannelId} not found for screen share`, `Voice channel ${status.activeChannelId} not found for screen share`,
); );
} }
await this.streamer.joinVoiceChannel(channel); await Promise.race([
this.streamer.joinVoiceChannel(channel),
new Promise<never>((_, reject) =>
setTimeout(
() =>
reject(
new Error(
"Timed out joining voice channel for screen share (2 koneksi voice bertabrakan?)",
),
),
15000,
),
),
]);
const { command, output } = prepareStream(directUrl, { const { command, output } = prepareStream(directUrl, {
encoder: Encoders.software({ x264: { preset: "superfast" } }), encoder: Encoders.software({ x264: { preset: "superfast" } }),