Skip to content

Commit

Permalink
send SPEAKING to all users in vc
Browse files Browse the repository at this point in the history
  • Loading branch information
RuslanUC committed May 10, 2024
1 parent a35297f commit 4d2439f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
13 changes: 12 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ yc-protobuf3-to-dict = "^0.3.0"
s3lite = "^0.1.4"
fast-depends = ">=2.4.2"
faststream = {extras = ["kafka", "nats", "rabbit", "redis"], version = "^0.5.4"}
semanticsdp = "^0.1.0b9"

[tool.poetry.group.dev.dependencies]
pytest = "^8.2.0"
Expand Down
6 changes: 5 additions & 1 deletion yepcord/voice_gateway/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,11 @@ async def handle_SELECT_PROTOCOL(self, data: dict):
async def handle_SPEAKING(self, data: dict):
if self.ssrc != data["ssrc"] or data["ssrc"] < 1:
return await self.ws.close(4014)
await self.esend(SpeakingEvent(self.ssrc, self.user_id, data["speaking"]))

for client in self._gw.channels[self.channel_id].values():
if client is self:
continue
await client.esend(SpeakingEvent(self.ssrc, self.user_id, data["speaking"]))

@require_auth
async def handle_VIDEO(self, data: dict):
Expand Down

0 comments on commit 4d2439f

Please sign in to comment.