Link Search Menu Expand Document

danog\MadelineProto\GroupCall

Back to index

Author: Daniil Gentili daniil@daniil.it

This update represents a Telegram group call (a video chat, a livestream or a live story).

See https://core.telegram.org/api/group-calls for more info.

Properties

  • $id: int Group call ID.
  • $accessHash: int Access hash of the group call.
  • $peerId: ?int Bot API ID of the group/channel the call is associated with, if any.
  • $title: ?string Title of the call, if it has one.
  • $participantsCount: int Number of participants.
  • $joinMuted: bool Whether new participants join muted.
  • $rtmpStream: bool Whether this is an RTMP livestream.
  • $conference: bool Whether this is an E2E-encrypted conference call, not associated with any group.
  • $creator: bool Whether we created this call.
  • $inviteLink: ?string The invite link of a conference call, if any.
  • $scheduleDate: ?int When the call is scheduled to start, if it is a scheduled call.
  • $streamDcId: ?int The DC to use when downloading media chunks in stream mode.
  • $discarded: bool Whether the call has ended.

Method list:

Methods:

join(bool $muted = false, mixed $joinAs = NULL, (string|null) $inviteHash = NULL): \danog\MadelineProto\GroupCall

Join the group call.

Note that conference calls » are
end-to-end encrypted and are not supported yet.

Parameters:

leave(): \danog\MadelineProto\GroupCall

Leave the group call, without ending it for the other participants.

discard(): \danog\MadelineProto\GroupCall

End the group call for all participants.

getCallState(): \danog\MadelineProto\GroupCall\GroupCallState

Get the state of the group call.

See also:

getParticipants(): array<int, \danog\MadelineProto\GroupCall\Participant>

Get all known participants, indexed by their bot API peer ID.

See also:

setMuted(bool $muted = true): \danog\MadelineProto\GroupCall

Mute or unmute our own audio stream.

Parameters:

  • $muted: bool

isMuted(): bool

Whether our own audio stream is muted.

setTitle(string $title): \danog\MadelineProto\GroupCall

Change the title of the group call.

Parameters:

  • $title: string

invite(mixed ...$users): \danog\MadelineProto\GroupCall

Invite users to the group call.

Parameters:

  • ...$users: mixed

exportInvite(bool $canSelfUnmute = false): string

Export an invite link for this group call.

Parameters:

  • $canSelfUnmute: bool Whether users joining with this link may speak without asking; admins only.

setOutput(mixed $participant, \danog\MadelineProto\LocalFile|\Amp\ByteStream\WritableStream $file): \danog\MadelineProto\GroupCall

Set the output file or stream for the incoming audio of a specific participant.

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

Parameters:

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

See also:

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

Play file.

Parameters:

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

See also:

playBlocking(\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\Amp\ByteStream\ReadableStream $file): \danog\MadelineProto\GroupCall

Play a file, blocking until it has finished playing if a stream is provided.

Parameters:

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

See also:

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

Play file.

Parameters:

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

See also:

playVideo(\danog\MadelineProto\LocalFile|\danog\MadelineProto\RemoteUrl|\Amp\ByteStream\ReadableStream $file): \danog\MadelineProto\GroupCall

Play the VP8 video and OPUS audio of a WebM file.

Parameters:

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

See also:

stopVideo(): \danog\MadelineProto\GroupCall

Stop transmitting video.

skip(): \danog\MadelineProto\GroupCall

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

stop(): \danog\MadelineProto\GroupCall

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

pause(): \danog\MadelineProto\GroupCall

Pauses the currently playing file.

isPaused(): bool

Whether the currently playing file is paused.

resume(): \danog\MadelineProto\GroupCall

Resumes the currently playing file.

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

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:


Generated by danog/phpdoc