refactor(gateway): remove screen-share / GoLive feature entirely
Drop the Discord Go Live (screen share) stack across the discord-gateway: - delete src/goLive/ (19 modules: Streamer, Demuxer, encoders, WebRTC wrapper, native loader, etc.) - delete native/libdatachannel-min/ N-API binding + flake native build + LD_LIBRARY_PATH wiring - delete screenShareController.ts and screen-share tests (goLive-port, golive-*, demuxerNut, screenShareInput) - mediaSource.ts: remove Invidious helpers + downloadScreenInput (YouTube full-file download) - mediaTypes.ts: drop ScreenShare* types, narrow MediaMode to 'music' and DiscordPlayerOwner to non-screen - media.handler.ts: remove screen branch, screenController/screenPlayback, voice-disconnect/reconnect accessor - commandHandler.ts: stop passing getVoiceStatus / setVoiceController into MediaHandler - media handler now only handles music; music queue/playback/status untouched Verification: tsc --noEmit clean, biome clean on touched files, no lingering goLive/screenShare refs in BE/FE/gateway.
This commit is contained in:
@@ -1,40 +0,0 @@
|
||||
// Phase 2 E2E: Demuxer on a real ffmpeg-generated H264 file.
|
||||
// Run: npx tsx tests/golive-demux-e2e.ts
|
||||
|
||||
import { createReadStream } from "node:fs";
|
||||
import { demux } from "../src/goLive/Demuxer.js";
|
||||
|
||||
const input = process.argv[2] ?? "/tmp/sample.h264";
|
||||
const { video, close } = await demux(createReadStream(input), {
|
||||
format: "h264",
|
||||
});
|
||||
|
||||
console.log(
|
||||
"video:",
|
||||
JSON.stringify({
|
||||
codecName: video.codecName,
|
||||
width: video.width,
|
||||
height: video.height,
|
||||
duration: video.duration,
|
||||
fps: Math.round(video.framerate_num / video.framerate_den),
|
||||
}),
|
||||
);
|
||||
|
||||
let count = 0;
|
||||
let keyframes = 0;
|
||||
let bytes = 0;
|
||||
video.stream.on("data", (frame: { data: Buffer; keyframe: boolean }) => {
|
||||
count++;
|
||||
bytes += frame.data.length;
|
||||
if (frame.keyframe) keyframes++;
|
||||
});
|
||||
video.stream.on("end", () => {
|
||||
console.log(`frames: ${count} (${keyframes} keyframes), ${bytes} bytes`);
|
||||
close();
|
||||
process.exit(0);
|
||||
});
|
||||
video.stream.on("error", (e: unknown) => {
|
||||
console.error("stream error:", e);
|
||||
close();
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user