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
Mp4demuxer, and publish RTMP livestreams withgetGroupCallStreamRtmpUrl. - 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:
setOutputrecords a participant's microphone, camera and screen share into a Matroska (or OGG OPUS) file with a fixed set of tracks, andsetOutputFolderrecords every participant into a directory, starting a new file whenever their streams change. Recordings are written in pure PHP, without decoding anything. - New
CallStreamsupdate, emitted whenever the streams a participant sends (or their codecs) change, and whenever a recording ends. - All call types now implement the common
Callinterface (and the multi-party onesMultiCall), with the same playlist, mute, screen sharing and recording controls:PrivateCall(withVoIPkept as an alias),GroupCall,LiveStoryandConferenceCall. - New
GroupCall,GroupCallParticipants,GroupCallMessage,GroupCallMessagesDeleted,LiveStory,LiveStoryMessageandConferenceCallMessageupdates. - Messages have new
getCall,canRequestCall,requestCallandgetCallDenialReasonmethods, to start (or get) the call of a private chat, or the video chat of a group or channel;CallNotAllowedExceptionexplains 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 newresumeInterruptedCallsfile setting). - Resumable download streams:
downloadToReturnedStreamandMedia::getStreamnow return aResumableDownloadStream, 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_botorOgg::convert. - Update to layer 231.
Fixes:
- Fix downloads without a size not closing the connection by @xtrime-ru in #1744
- Fix
getInputClientProxyon 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:
- auth.initFirebasePnvLogin
- auth.finishFirebasePnvLogin
- auth.firebasePnvSignUp
- account.confirmBotConnection
- account.getWebBrowserSettings
- account.updateWebBrowserSettings
- account.toggleWebBrowserSettingsException
- account.deleteWebBrowserSettingsExceptions
- messages.getRichMessage
- messages.translateRichMessage
- messages.composeRichMessageWithAI
- messages.requestChatJoinWebView
- bots.setJoinChatResults
- payments.getCurrencyRates
- payments.getOnrampProviders
- payments.getOnrampBaseCurrencies
- payments.getOnrampAvailability
- payments.getOnrampLimits
- payments.getOnrampQuote
- payments.createOnrampSession
- communities.create
- communities.togglePeerLink
- communities.getJoinedCommunities
- communities.toggleCommunityCollapsedInDialogs
- communities.getPeerLinkRequests
- communities.togglePeerLinkRequestApproval
- communities.toggleAllPeerLinkRequestApproval
- communities.toggleParticipantBanned
- communities.getParticipantJoinedChats
- ephemeral.sendMessage
- ephemeral.deleteMessage
- ephemeral.reportMessage
- ephemeral.getCallbackAnswer
- ephemeral.editMessage
- ephemeral.deleteWelcomeMessage
- ephemeral.deleteAllWelcomeMessages
- ephemeral.getWelcomeMessages
- toncenter.performApiRequest
- toncenter.getStreamingUrl
- wallet.getState
- wallet.getUserAddresses
- wallet.getTransactions
- wallet.exportSecretPhrase
- wallet.fetchEncryptedSecretPhrasePart
- wallet.replaceWallet
- wallet.disableBackup
- wallet.getBackupHolderDcs
- wallet.enableBackup
Changed Methods:
- Added broadcasts param to contacts.search
- Added bots param to contacts.search
- Added rich_message param to messages.sendMessage
- Added from_ephemeral param to messages.forwardMessages
- Added community param to messages.searchGlobal
- Added rich_message param to messages.editMessage
- Added rich_message param to messages.editInlineBotMessage
- Added rich_message param to messages.saveDraft
- Added for_community_peer param to channels.getAdminedPublicChannels
- Added apply_to_invites param to channels.toggleJoinRequest
- Added guard_bot param to channels.toggleJoinRequest
Deleted Methods:
New Constructors:
- communityForbidden
- community
- communityFull
- messageActionChangeCommunity
- messageActionChatJoinedViaCommunity
- messageActionGramTransfer
- dialogCommunity
- inputNotifyCommunity
- updateJoinChatWebViewDecision
- updateNewBotConnection
- updateWebBrowserSettings
- updateWebBrowserException
- updateNewEphemeralMessage
- updateDeleteEphemeralMessages
- updateEditEphemeralMessage
- updateEphemeralBotCallbackQuery
- updateBotStarsSubscription
- updateWalletState
- notifyCommunity
- inputSendMessageRichMessageDraftAction
- sendMessageRichMessageDraftAction
- sendMessageStopDraftAction
- inputBotInlineMessageRichMessage
- botInlineMessageRichMessage
- textMath
- textCustomEmoji
- textSpoiler
- textMention
- textHashtag
- textBotCommand
- textCashtag
- textAutoUrl
- textAutoEmail
- textAutoPhone
- textBankCard
- textMentionName
- textDate
- textDiff
- textButton
- pageBlockHeading1
- pageBlockHeading2
- pageBlockHeading3
- pageBlockHeading4
- pageBlockHeading5
- pageBlockHeading6
- pageBlockMath
- pageBlockThinking
- inputPageBlockMap
- pageBlockBlockquoteBlocks
- pageBlockButtonRow
- pageBlockDocument
- inputDialogPeerCommunity
- dialogPeerCommunity
- inputReplyToEphemeralMessage
- inputAiComposeToneSingleUse
- messages.chatInviteJoinResultOk
- messages.chatInviteJoinResultWebView
- joinChatBotResultApproved
- joinChatBotResultDeclined
- joinChatBotResultQueued
- joinChatBotResultWebView
- webDomainException
- account.webBrowserSettingsNotModified
- account.webBrowserSettings
- inputRichFilePhoto
- inputRichFileDocument
- inputRichMessage
- inputRichMessageHTML
- inputRichMessageMarkdown
- richMessage
- communityPeer
- communityPeerRequest
- communities.peerLinkRequests
- ephemeralMessage
- communities.participantJoinedChats
- messages.translatedRichMessage
- messages.composedRichMessageWithAI
- buttonTypeDefault
- buttonTypeRequestPhone
- buttonTypeRequestGeoLocation
- buttonTypeRequestPoll
- buttonTypeRequestPeer
- inputButtonTypeRequestPeer
- buttonTypeSimpleWebView
- inlineButtonTypeUrl
- inlineButtonTypeUrlAuth
- inputInlineButtonTypeUrlAuth
- inlineButtonTypeWebView
- inlineButtonTypeCallback
- inlineButtonTypeGame
- inlineButtonTypeBuy
- inlineButtonTypeSwitchInline
- inlineButtonTypeUserProfile
- inputInlineButtonTypeUserProfile
- inlineButtonTypeCopy
- inlineButtonTypeDisabled
- keyboardInlineButton
- keyboardInlineButtonRow
- richButtonStyle
- pageButton
- ephemeral.welcomeMessagesNotModified
- ephemeral.welcomeMessages
- auth.firebasePnvIntent
- currencyRate
- payments.currencyRates
- toncenter.apiResponse
- toncenter.streamingUrl
- onrampMethodAvailability
- onrampProviderInfo
- onrampAvailability
- onrampLimits
- onrampQuote
- onrampSession
- walletStateEmpty
- walletState
- walletUserAddress
- walletTransactionPeerUser
- walletTransactionPeerAddress
- walletTransactionPeerUnsupported
- walletTransaction
- wallet.transactions
- wallet.secretPhraseParts
- wallet.encryptedSecretPhrasePart
- wallet.holderDc
- inputWalletNew
- inputWalletImported
Changed Constructors:
- Added bot_guard param to user
- Added linked_community_id param to user
- Added linked_community_id param to channel
- Added has_welcome_messages param to chatFull
- Added has_welcome_messages param to channelFull
- Added guard_bot_id param to channelFull
- Added rich_message param to message
- Added name_hidden param to messageActionStarGiftUnique
- Added message param to messageActionStarGiftUnique
- Added gram_address param to userFull
- Added query_id param to updateBotChatInviteRequester
- Added can_stop param to sendMessageTextDraftAction
- Added keep_on_stop param to sendMessageTextDraftAction
- Added ephemeral param to botCommand
- Added type param to keyboardButton
- Added force_reply param to replyKeyboardMarkup
- Added force_reply param to replyInlineMarkup
- Added rich_message param to draftMessage
- Added collapsed param to pageBlockBlockquote
- Added spoiler param to pageBlockPhoto
- Added spoiler param to pageBlockVideo
- Added compact param to pageBlockTable
- Added reversed param to pageBlockOrderedList
- Added start param to pageBlockOrderedList
- Added type param to pageBlockOrderedList
- Added checkbox param to pageListItemText
- Added checked param to pageListItemText
- Added checkbox param to pageListItemBlocks
- Added checked param to pageListItemBlocks
- Added checkbox param to pageListOrderedItemText
- Added checked param to pageListOrderedItemText
- Added value param to pageListOrderedItemText
- Added type param to pageListOrderedItemText
- Added checkbox param to pageListOrderedItemBlocks
- Added checked param to pageListOrderedItemBlocks
- Added value param to pageListOrderedItemBlocks
- Added type param to pageListOrderedItemBlocks
- Added manage_linked_peers param to chatAdminRights
- Added manage_welcome_messages param to chatAdminRights
- Added manage_linked_peers param to chatBannedRights
- Added reply_to_ephemeral param to messageReplyHeader
- Added same_origin param to webViewResultUrl
- Added show_name param to inputInvoiceStarGiftResale
- Added message param to inputInvoiceStarGiftResale
- Added device param to connectedBot
- Added date param to connectedBot
- Added location param to connectedBot
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