github danog/MadelineProto 8.8.8
Group/video calls on webhosts!

pre-release3 hours ago

Introducing MadelineProto 8.8.8, with video calls, group calls, livestreams and end-to-end encrypted conference calls, all in pure PHP, absolutely NO ffmpeg or extensions: all group/conference call and video call functionality works on webhosts, too!

Example:

$MadelineProto->requestCall('@username', video: true)->play(new RemoteUrl('https://paste.daniil.it/oncall.webm'));
$MadelineProto->joinGroupCall('@mygroup')->play(new RemoteUrl('https://paste.daniil.it/oncall.webm'));

See examples/bot.php for a full example!

See the call documentation » for more info, and try the open-source magnaluna video webradio », which plays a video in one-to-one calls, in the video chats and conference calls whose links you send it, and in the video chats of all its groups!

Test the new features live with magnaluna on Telegram: @magicalcrazypony! Call it, send it /call, or send it the link of a group call or conference call to join, or use the /videochat command in a group to create or join a group call.

Features:

  • Video calls: play WebM/MKV files with VP8, VP9, H.264, H.265 (or AV1, in one-to-one calls) video and OPUS audio into any call: frames are demuxed in pure PHP and sent as-is, with no transcoding. Start a video call with requestCall($user, video: true).
  • Screen sharing: play a video as a screen share alongside the camera stream with MediaDestination::Presentation.
  • Group calls (video chats and livestreams): create (also scheduled and RTMP livestreams), join (also as a channel or via an invite link), stream audio and video, share the screen, record, and manage them: title, invites and invite links, muting, volume, raised hands, server-side recording, kicking participants, in-call messages and reactions.
  • Livestreams: record stream mode livestreams (including RTMP ones), using the new pure PHP Mp4 demuxer, and publish RTMP livestreams with getGroupCallStreamRtmpUrl.
  • Live stories: start a live story with startLive, stream into it, comment, and handle Telegram Stars donations.
  • End-to-end encrypted conference calls: create them, join them via link or invitation, invite users, verify the key emojis, send end-to-end encrypted in-call messages and remove participants (rekeying the call), or upgrade a one-to-one call with migrateCallToConference.
  • Call recording: setOutput records a participant's microphone, camera and screen share into a Matroska (or OGG OPUS) file with a fixed set of tracks, and setOutputFolder records every participant into a directory, starting a new file whenever their streams change. Recordings are written in pure PHP, without decoding anything.
  • New CallStreams update, emitted whenever the streams a participant sends (or their codecs) change, and whenever a recording ends.
  • All call types now implement the common Call interface (and the multi-party ones MultiCall), with the same playlist, mute, screen sharing and recording controls: PrivateCall (with VoIP kept as an alias), GroupCall, LiveStory and ConferenceCall.
  • New GroupCall, GroupCallParticipants, GroupCallMessage, GroupCallMessagesDeleted, LiveStory, LiveStoryMessage and ConferenceCallMessage updates.
  • Messages have new getCall, canRequestCall, requestCall and getCallDenialReason methods, to start (or get) the call of a private chat, or the video chat of a group or channel; CallNotAllowedException explains why a call can't be started. $message->requestCall()->join() works in every chat, since joining an outgoing one-to-one call does nothing.
  • Calls survive restarts: playlists (continuing the current WebM/OGG file where it left off), hold files (which now loop) and recordings are saved in the session.
  • Resumable uploads: interrupted uploads of files, URLs, Telegram files and resumable streams (encrypted ones included) are resumed after a restart, without uploading the already uploaded parts again.
  • Resumable method calls: interrupted method calls and send* calls uploading such files are resumed after a restart, until their upload completes (can be disabled with the new resumeInterruptedCalls file setting).
  • Resumable download streams: downloadToReturnedStream and Media::getStream now return a ResumableDownloadStream, which can be serialized, and resumes downloading from where it left off.
  • Through IPC, calls without callbacks are sent again when the IPC server restarts.
  • Added support for communities.
  • Any OGG OPUS file (mono or stereo, with any frame size) can now be played into calls as-is, not only the ones created by MadelineProto: no more need to pre-convert them with @libtgvoip_bot or Ogg::convert.
  • Update to layer 231.

Fixes:

  • Fix downloads without a size not closing the connection by @xtrime-ru in #1744
  • Fix getInputClientProxy on null by @xtrime-ru in #1745
  • Fix inline query button conversion in keyboard buttons by @xcgu in #1743
  • Fix sending media with a TTL by @danog.
  • Upgrade to phpseclib 4, keeping sessions created with phpseclib 3 loadable by @danog.
  • File reference improvements by @danog.
  • Fix updates received while the event handler is starting being handled again in an endless loop, using all the memory, if the event handler failed to start by @danog.
  • Fix uploads with a cancellation through IPC, and IPC cancellations no longer block the event loop by @danog.
  • Fix encrypted downloads starting from a non-zero offset by @danog.
  • Cancelled uploads no longer throw errors into the event loop by @danog.
  • Messages cancelled while connecting are no longer sent by @danog.

New Methods:

Changed Methods:

Deleted Methods:

New Constructors:

Changed Constructors:

Deleted Constructors:

  • keyboardButtonUrl
  • keyboardButtonCallback
  • keyboardButtonRequestPhone
  • keyboardButtonRequestGeoLocation
  • keyboardButtonSwitchInline
  • keyboardButtonGame
  • keyboardButtonBuy
  • keyboardButtonUrlAuth
  • inputKeyboardButtonUrlAuth
  • keyboardButtonRequestPoll
  • inputKeyboardButtonUserProfile
  • keyboardButtonUserProfile
  • keyboardButtonWebView
  • keyboardButtonSimpleWebView
  • keyboardButtonRequestPeer
  • inputKeyboardButtonRequestPeer
  • keyboardButtonCopy

Full Changelog: 8.7.0...8.8.8

Don't miss a new MadelineProto release

NewReleases is sending notifications on new releases.