Link Search Menu Expand Document

danog\MadelineProto\CallStream

Back to index

Author: Daniil Gentili daniil@daniil.it

The media streams a participant of a call can send, as bit flags.

Every party of a call has up to three streams: their microphone ({@see self::AUDIO}), their camera ({@see self::VIDEO}) and their screen share ({@see self::SCREEN}), each of which they can turn on and off at any time. A set of streams is a bitmask of these flags, as used by {@see EventHandler\Call::setOutput()} to pick the tracks of a recording and reported by {@see EventHandler\Calls\CallStreams} updates.

Constants

  • danog\MadelineProto\CallStream::AUDIO: The microphone audio (OPUS).

  • danog\MadelineProto\CallStream::VIDEO: The camera video.

  • danog\MadelineProto\CallStream::SCREEN: The screen share (presentation) video.

  • danog\MadelineProto\CallStream::ALL: Every stream.

  • danog\MadelineProto\CallStream::NAMES: The name of each flag, in the order they are listed.

Method list:

Methods:

names(int $streams): list<string>

The names of the streams in a set, in order: audio, video, screen.

Parameters:

  • $streams: int

describe(int $streams): string

A human-readable description of a set of streams: audio+video, or nothing for an empty set.

Parameters:

  • $streams: int

of(bool $audio, bool $video, bool $screen): int

Build a set from the state of each stream.

Parameters:

  • $audio: bool
  • $video: bool
  • $screen: bool

validate(int $streams): void

Check that a set only holds known flags.

Parameters:

  • $streams: int

Generated by danog/phpdoc