danog\MadelineProto\VoIP
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:
accept(): self
discard(\danog\MadelineProto\VoIP\DiscardReason $reason = \danog\MadelineProto\VoIP\DiscardReason::HANGUP, int<1, 5> $rating = NULL, string $comment = NULL): self
getVisualization(): ?list{string, string, string, string}
play(\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\Amp\ByteStream\ReadableStream $file): self
setOutput(\danog\MadelineProto\LocalFile|\Amp\ByteStream\WritableStream $file): self
then(\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\Amp\ByteStream\ReadableStream $file): self
skip(): self
stop(): self
pause(): self
isPaused(): boolean
resume(): self
playOnHold(\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\Amp\ByteStream\ReadableStream ...$files): self
getCurrent(): \danog\MadelineProto\RemoteUrl|\danog\MadelineProto\LocalFile|string|null
getCallState(): \danog\MadelineProto\VoIP\CallState
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:
\danog\MadelineProto\LocalFile
: Indicates a local file to upload.\danog\MadelineProto\RemoteUrl
: Indicates a remote URL to upload.\Amp\ByteStream\ReadableStream
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:
\danog\MadelineProto\LocalFile
: Indicates a local file to upload.\Amp\ByteStream\WritableStream
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:
\danog\MadelineProto\LocalFile
: Indicates a local file to upload.\danog\MadelineProto\RemoteUrl
: Indicates a remote URL to upload.\Amp\ByteStream\ReadableStream
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:
\danog\MadelineProto\LocalFile
: Indicates a local file to upload.\danog\MadelineProto\RemoteUrl
: Indicates a remote URL to upload.\Amp\ByteStream\ReadableStream
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:
\danog\MadelineProto\RemoteUrl
: Indicates a remote URL to upload.\danog\MadelineProto\LocalFile
: Indicates a local file to upload.
getCallState(): \danog\MadelineProto\VoIP\CallState
Get call state.
See also:
Generated by danog/phpdoc