DiscordPHP-Voice Documentation

MediaCryptoService
in package

FinalYes

Table of Contents

Properties

$logger  : LoggerInterface
$state  : State

Methods

__construct()  : mixed
decrypt()  : string|false
Decrypt an inbound DAVE media frame. Returns original frame if passthrough or no decryptor.
encrypt()  : string
Encrypt an outbound DAVE media frame. Returns original frame if passthrough.

Properties

Methods

__construct()

public __construct(State $state, LoggerInterface $logger) : mixed
Parameters
$state : State

Per-connection DAVE state holding the active encryptor and per-user decryptors.

$logger : LoggerInterface

Sink for encrypt/decrypt failure diagnostics.

decrypt()

Decrypt an inbound DAVE media frame. Returns original frame if passthrough or no decryptor.

public decrypt(string $frame, string|null $userId[, int|null $ssrc = null ]) : string|false
Parameters
$frame : string
$userId : string|null

The sender's user ID (resolved from SSRC by the caller).

$ssrc : int|null = null

The sender's SSRC, used only for logging on failure.

Return values
string|false

encrypt()

Encrypt an outbound DAVE media frame. Returns original frame if passthrough.

public encrypt(string $frame, int|null $ssrc) : string
Parameters
$frame : string
$ssrc : int|null

The local SSRC for the outbound RTP stream.

Return values
string
On this page

Search results