API reference
Method BindExternalOpusSourceAsync
- Namespace
- DisCatSharp.Voice
- Assembly
- DisCatSharp.Voice.dll
BindExternalOpusSourceAsync(IExternalOpusSource, CancellationToken)
Binds an external Opus source to this voice connection. Frames from the source bypass the internal Opus encoder but go through RTP framing, DAVE E2EE, and AEAD transport encryption.
public Task BindExternalOpusSourceAsync(IExternalOpusSource source, CancellationToken cancellationToken = default)
Parameters
sourceIExternalOpusSourceThe external Opus source to bind.
cancellationTokenCancellationTokenToken to cancel the binding.
Returns
- Task
A task that completes when the source stops producing frames or is cancelled.
Exceptions
- InvalidOperationException
Thrown when EnableExternalOpus is not enabled.