mirror of
https://github.com/J3vb/OwnCord.git
synced 2026-09-03 03:50:00 +03:00
Replace custom Pion WebRTC SFU with LiveKit token-based flow. Server changes: - client.go: remove PeerConnection, voiceDone, negoMu; add setVoiceChID/clearVoiceChID - voice_handlers.go: 961 -> ~295 lines; voice_join now generates LiveKit token, voice_leave calls RemoveParticipant; delete SDP/ICE/RTP/soundboard handlers - hub.go: replace SFU + VoiceRooms with LiveKitClient + LiveKitProcess; remove speaker broadcast goroutine - messages.go: add buildVoiceToken, remove buildVoiceOffer/ Answer/ICE; simplify buildVoiceConfig - handlers.go: remove voice_offer/answer/ice/soundboard dispatch - router.go: replace NewSFU with NewLiveKitClient, add optional LiveKit process auto-start Deleted files (14): - sfu.go, voice_room.go, speaker_detector.go, rtp_audio_level.go, speaker_broadcast.go, api/voice_handler.go - All corresponding test files All server tests pass (go test ./...).