DiscordVoiceSession
Inherits from
pageDiscordMediaSessionEvents
Name | Description |
OnConnected | Fired when the client has connected and authenticated to the server |
OnDisconnected | Fired when the client is forcefully disconnected or Disconnect() is called |
OnUserConnected | Fired when a user connects to the voice channel |
OnUserDisconnected | Fired when a user leaves the voice channel |
OnUserSpeaking | Fired when a user starts speaking |
OnChannelChanged | Triggered whenever the user is moved into another channel |
Properties
Name | Description | Type |
Speaking | True if the client is sending voice data | bool |
Livestream | A reference to the Go Live created by the client | DiscordGoLiveSession? |
Watching | A reference to the Go Lives the client is watching | IReadOnlyList<DiscordGoLiveSession> |
Methods
SetSpeakingState
Sets the client's speaking flags.
Parameters
Name | Description | Type |
flags | The speaking flags | DiscordSpeakingFlags |
GoLive
Starts a Go Live session. This will set Livestream.
Returns
pageDiscordGoLiveSessionWatchGoLive
Connects to another user's Go Live. This will add a stream to Watching.
Parameters
Name | Description | Type |
userId | The ID of the user who's livestream to watch | ulong |
Returns
pageDiscordGoLiveSessionCreateStream
Creates a voice stream which you can send data through to speak.
Parameters
Name | Description | Type |
bitrate | The bitrate at which to send data through. Values between 5000 and 384000 are valid | int |
application | Lets you optimize the encoder for a specific type of audio | AudioApplication? |
Returns
pageDiscordVoiceStreamLast updated