MediaCryptoService
in package
FinalYes
Table of Contents
Properties
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
$logger read-only
private
LoggerInterface
$logger
$state read-only
private
State
$state
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|falseencrypt()
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.