Class MediaValveImpl
java.lang.Object
moe.kyokobot.koe.internal.gateway.MediaValveImpl
- All Implemented Interfaces:
MediaValve
Tracks the media streams of each user connected to the Voice channel and disables their incoming packets.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleEvent(JsonObject obj) Handle a voice gateway message.booleanWhether we're deafened, i.e., we are not receiving audio from any user.voidremoveUser(String userId) voidSend aOp.MEDIA_SINK_WANTSpayload to the gateway.voidsetDeafen(boolean deafen) Set whether to deafen ourselves.
-
Constructor Details
-
MediaValveImpl
-
-
Method Details
-
isDeafened
public boolean isDeafened()Description copied from interface:MediaValveWhether we're deafened, i.e., we are not receiving audio from any user.- Specified by:
isDeafenedin interfaceMediaValve
-
setDeafen
public void setDeafen(boolean deafen) Description copied from interface:MediaValveSet whether to deafen ourselves.You must call
MediaValve.sendToGateway()after calling this method to have any effect.- Specified by:
setDeafenin interfaceMediaValve
-
sendToGateway
public void sendToGateway()Description copied from interface:MediaValveSend aOp.MEDIA_SINK_WANTSpayload to the gateway.- Specified by:
sendToGatewayin interfaceMediaValve
-
handleEvent
Description copied from interface:MediaValveHandle a voice gateway message.- Specified by:
handleEventin interfaceMediaValve
-
removeUser
- Specified by:
removeUserin interfaceMediaValve
-