User: 'dulu sharescreen juga bisa'. Terbukti: commit d50ce86 (Mei 2026)
punya src/media/screenShareController.ts + vendor @dank074/discord-video-stream,
hilang saat rombak monolith -> microservices. Interface ScreenShareController
masih ada di mediaTypes.ts tapi implementasinya tidak.
Restore:
- dep @dank074/discord-video-stream@6.0.0 (npm, dibangun untuk
discord.js-selfbot-v13 — cocok dengan stack gateway)
- mediaSource.getDirectVideoUrl (yt-dlp --get-url bestvideo+bestaudio)
- screenShareController.ts (BARU): Streamer(client) + prepareStream H264
720p30 + playStream go-live; owner check via discordPlayer
- media.handler: mode:'screen' di media:queue -> screen path; status
expose activeMode; stop matiin screen
- FE: tombol Screen di MusicPlayer + hook useMediaQueue({url, mode})
Verifikasi: gateway tsc PASS, FE tsc PASS, biome 0 error, next build PASS.
Nix build pending (dep native @lng2004/node-datachannel butuh pnpm rebuild).
68 lines
1.7 KiB
JSON
68 lines
1.7 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",
|
|
"@lng2004/node-datachannel",
|
|
"esbuild",
|
|
"node-av",
|
|
"node-crc",
|
|
"sharp",
|
|
"zeromq"
|
|
],
|
|
"patchedDependencies": {
|
|
"node-crc@4.0.0": "./patches/node-crc@4.0.0.patch"
|
|
}
|
|
},
|
|
"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": {
|
|
"@dank074/discord-video-stream": "6.0.0",
|
|
"@discordjs/opus": "^0.10.0",
|
|
"@discordjs/voice": "^0.19.2",
|
|
"@snazzah/davey": "^0.1.11",
|
|
"axios": "^1.16.1",
|
|
"discord.js-selfbot-v13": "^3.7.1",
|
|
"dotenv": "^17.4.2",
|
|
"drizzle-orm": "^0.45.2",
|
|
"imghash": "^1.1.4",
|
|
"ioredis": "^5.11.0",
|
|
"libsodium-wrappers": "^0.8.4",
|
|
"lru-cache": "^11.5.1",
|
|
"node-crc": "^4.0.0",
|
|
"openai": "^6.38.0",
|
|
"opusscript": "^0.0.8",
|
|
"p-limit": "^7.3.0",
|
|
"p-retry": "^8.0.0",
|
|
"pg": "^8.21.0",
|
|
"pino": "^9.6.0",
|
|
"piscina": "^5.1.4",
|
|
"prism-media": "2.0.0-alpha.0",
|
|
"sharp": "^0.34.5",
|
|
"tiktoken": "^1.0.22",
|
|
"ws": "^8.20.1",
|
|
"zod": "^4.4.3"
|
|
},
|
|
"devDependencies": {
|
|
"@biomejs/biome": "latest",
|
|
"@types/node": "^25.9.0",
|
|
"@types/pg": "^8.20.0",
|
|
"@types/ws": "^8.18.1",
|
|
"drizzle-kit": "^0.31.10",
|
|
"tsx": "^4.22.2",
|
|
"typescript": "^5.9.3",
|
|
"vitest": "latest"
|
|
}
|
|
}
|