Link Search Menu Expand Document

danog\MadelineProto\VoIP

Back to index

Author: Daniil Gentili daniil@daniil.it

This update represents a VoIP Telegram call.

Properties

  • $callID: int Phone call ID
  • $outgoing: bool Whether the call is an outgoing call
  • $otherID: int ID of the other user in the call
  • $date: int When was the call created

Method list:

Methods:

accept(): self

Accept call.

discard(\danog\MadelineProto\VoIP\DiscardReason $reason = \danog\MadelineProto\VoIP\DiscardReason::HANGUP, int<1, 5> $rating = NULL, string $comment = NULL): self

Discard call.

Parameters:

  • $reason: \danog\MadelineProto\VoIP\DiscardReason
  • $rating: int<1, 5> Call rating in stars
  • $comment: string Additional comment on call quality.

See also:

getVisualization(): ?list{string, string, string, string}

Get call emojis (will return null if the call is not inited yet).

play(\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\Amp\ByteStream\ReadableStream $file): self

Play file.

Parameters:

  • $file: \danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\Amp\ByteStream\ReadableStream

See also:

setOutput(\danog\MadelineProto\LocalFile|\Amp\ByteStream\WritableStream $file): self

Set output file or stream for incoming OPUS audio packets.

Will write an OGG OPUS stream to the specified file or stream.

Parameters:

  • $file: \danog\MadelineProto\LocalFile|\Amp\ByteStream\WritableStream

See also:

then(\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\Amp\ByteStream\ReadableStream $file): self

Play file.

Parameters:

  • $file: \danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\Amp\ByteStream\ReadableStream

See also:

skip(): self

When called, skips to the next file in the playlist.

stop(): self

Stops playing all files, clears the main and the hold playlist.

pause(): self

Pauses the currently playing file.

isPaused(): boolean

Whether the currently playing file is paused.

resume(): self

Resumes the currently playing file.

playOnHold(\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\Amp\ByteStream\ReadableStream ...$files): self

Files to play on hold.

Parameters:

  • ...$files: \danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\Amp\ByteStream\ReadableStream

See also:

getCurrent(): \danog\MadelineProto\RemoteUrl|\danog\MadelineProto\LocalFile|string|null

Get the file that is currently being played.

Will return a string with the object ID of the stream if we’re currently playing a stream, otherwise returns the related LocalFile or RemoteUrl.

See also:

getCallState(): \danog\MadelineProto\VoIP\CallState

Get call state.

See also:


Generated by danog/phpdoc