Files
GMW/services/discord-gateway/package.json
T
asepharyana 7bfdf9c85c feat(voice): fork @discordjs/voice with video receive support
Fork @discordjs/voice 0.19.2 into vendor/discord-voice-fork and patch the
voice gateway handshake so Discord sends camera/screen-share RTP video:

- Identify payload now declares video:true + streams:[] (derived from
  Discord-RE/Discord-video-stream) - this is what makes Discord deliver
  H264 (PT 96-127) to the voice socket. Previously the client never
  declared video capability, so Discord omitted all video SSRCs/packets.
- op-12 Speaking handler maps streams[].ssrc -> videoSSRC alongside the
  audio SSRC, so ssrcMap carries camera/screen-share stream IDs.
- SSRCMap.get() now also resolves video SSRCs (video RTP arrives on a
  different SSRC than audio), enabling attribution for videoReceiver.ts.
- Both dist/index.js (CJS) and dist/index.mjs (ESM) patched; 3 isolated
  hunks vs upstream, verified by diff.
- package.json points @discordjs/voice -> file:vendor/discord-voice-fork
  (pnpm lockfile updated, CI --frozen-lockfile compatible).
- .gitignore: replace global dist/ with per-service explicit patterns so
  the vendored fork's dist/ is committed while build outputs stay ignored.
- tests: +3 SSRCMap videoSSRC cases (190 total, all pass).

The receive-side pipeline (H264Depacketizer -> .h264 -> muxToMp4 -> MP4)
already exists in videoReceiver.ts; this unblocks it by making Discord
actually deliver video packets.
2026-09-01 23:35:13 +07:00

58 lines
1.5 KiB
JSON

{
"name": "@bete/discord-gateway",
"version": "1.0.0",
"description": "Discord Gateway service - handles message capture, voice recording, and AI moderation",
"type": "module",
"main": "dist/index.js",
"pnpm": {
"onlyBuiltDependencies": [
"@discordjs/opus",
"esbuild",
"sharp"
]
},
"scripts": {
"dev": "tsx watch src/index.ts",
"start": "node dist/index.js",
"build": "tsc",
"typecheck": "tsc --noEmit",
"lint": "biome check --diagnostic-level=error .",
"format": "biome format --write .",
"test": "vitest run"
},
"dependencies": {
"@discordjs/opus": "^0.10.0",
"@discordjs/voice": "file:vendor/discord-voice-fork",
"@snazzah/davey": "^0.1.11",
"axios": "^1.20.0",
"discord.js-selfbot-v13": "^3.7.1",
"dotenv": "^17.4.2",
"drizzle-orm": "^0.45.2",
"ioredis": "^6.0.0",
"libsodium-wrappers": "^0.8.4",
"lru-cache": "^11.5.1",
"openai": "^7.8.0",
"opusscript": "^0.1.1",
"p-limit": "^7.3.0",
"p-retry": "^8.0.0",
"pg": "^8.23.0",
"pino": "^10.3.1",
"piscina": "^5.3.2",
"prism-media": "2.0.0-alpha.0",
"sharp": "^0.35.4",
"tiktoken": "^1.0.22",
"ws": "^8.21.3",
"zod": "^4.5.2"
},
"devDependencies": {
"@biomejs/biome": "latest",
"@types/node": "^26.4.0",
"@types/pg": "^8.23.1",
"@types/ws": "^8.18.1",
"drizzle-kit": "^0.31.10",
"tsx": "^4.23.12",
"typescript": "^7.0.2",
"vitest": "latest"
}
}