# danog\MadelineProto\CallStream: 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.


[Back to index](../../index.html)

> 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:
* [`names(StreamMask $streams): list<string>`](#names)
* [`describe(StreamMask $streams): string`](#describe)
* [`of(bool $audio, bool $video, bool $screen): StreamMask`](#of)
* [`validate(StreamMask $streams): void`](#validate)

## Methods:
### <a name="names"></a> `names(StreamMask $streams): list<string>`

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


Parameters:

* `$streams`: `StreamMask`   


#### See also: 
* `StreamMask`




### <a name="describe"></a> `describe(StreamMask $streams): string`

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


Parameters:

* `$streams`: `StreamMask`   


#### See also: 
* `StreamMask`




### <a name="of"></a> `of(bool $audio, bool $video, bool $screen): StreamMask`

Build a set from the state of each stream.


Parameters:

* `$audio`: `bool`   
* `$video`: `bool`   
* `$screen`: `bool`   


#### See also: 
* `StreamMask`




### <a name="validate"></a> `validate(StreamMask $streams): void`

Check that a set only holds known flags.


Parameters:

* `$streams`: `StreamMask`   


#### See also: 
* `StreamMask`




---
Generated by [danog/phpdoc](https://phpdoc.daniil.it)
