Add VK Video Live streaming platform support - #393
Open
blackVanilla wants to merge 5 commits into
Open
blackVanilla wants to merge 5 commits into
blackVanilla wants to merge 5 commits into
Conversation
Add live.vkvideo.ru as a chat/streaming platform, implemented against the official DevAPI (https://dev.live.vkvideo.ru/docs/): - Login with OAuth2 implicit flow in a web view. The access token is stored in the keychain, like for Twitch. - Real time chat over the platform's Centrifugo based pubsub websocket: messages with nick colors, badges and smiles, message deletions, and reward redemptions (shown as highlighted messages, like for Twitch). - Send chat messages, also from the chat bot. - Number of viewers in the stream overlay (polled every 30 seconds). - Show and change stream title and category. - Moderation: slow mode and emotes only mode. The DevAPI has no endpoints for bans, timeouts or message deletion, so those are not supported. - Settings UI, chat connection status, send-messages-to selector and streamer mentions for text to speech. The application identifier for the developer cabinet is defined in VkVideoLiveAuth.swift.
Handle the channel_follow_create and channel_raid_income events from the info pubsub channel and show them as toasts and highlighted chat messages, like for Twitch: - New follower: "<nick> just followed!", also updates the latest follower for text widgets. - Incoming raid: "<nick> raided with a party of <count>!". Add an Alerts section (Chat and Toasts) to the VK Video Live stream settings with Follows, Rewards and Raids toggles. Reward redemptions now respect the toggles as well: the chat highlight can be disabled (the message is then shown as a regular chat message) and a toast can be shown. Nick colors in alerts use the platform's palette, like in chat. Note: the DevAPI does not notify the raiding channel about outgoing raids, and there is no endpoint to start a raid, so only incoming raids are shown.
Handle the channel_subscription_create event from the info pubsub channel and show it as a toast and a highlighted chat message, like for Twitch: "<nick> just subscribed (<subscription level name>)!". Also updates the latest subscriber for text widgets. Controlled by new Subscriptions toggles in the alerts settings. Gifted subscriptions are indistinguishable from regular ones — the event carries no gifter information — so they show the same alert. Also detect the subscriber status of chat message authors from their subscription badge, enabling subscribers-only text to speech filtering and chat bot permissions for VK Video Live.
blackVanilla
force-pushed
the
feature/vkvideolive
branch
from
July 9, 2026 20:32
3f9c3ee to
6c315fa
Compare
blackVanilla
marked this pull request as ready for review
July 9, 2026 20:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add VK Video Live streaming platform support
This PR adds VK Video Live (a streaming
platform popular in Russia and the CIS) as a platform in Moblin,
alongside Twitch, Kick, YouTube, SOOP and OSP.
Everything is implemented against the official public DevAPI
(https://dev.live.vkvideo.ru/docs/) — REST at apidev.live.vkvideo.ru
and the Centrifugo-based pubsub websocket. No private/reverse
engineered endpoints are used.
What works
opens as a popup, handled via
WKUIDelegate). The access token isstored in the keychain and stripped from the settings JSON, same as
for Twitch. Channel URL and nick are auto-filled after login.
protocol), with automatic reconnect and token refresh. Messages show
nick colors (the platform's 16-color palette), badges, roles and
smiles. Deleted messages are marked as deleted. Reward redemptions
(channel points) are shown as highlighted messages, like Twitch
redemptions.
send-messages-to selector in the chat quick button.
in the stream overlay together with the other platforms.
category search) from stream settings.
settings endpoint.
new localizable strings.
pubsub channel, shown as toasts and highlighted chat messages with
Chat/Toasts toggles. Subscription alerts include the subscription
level name. Chat messages carry the subscriber flag (from the
subscription badge) for TTS filters and chat bot permissions.
Known API limitations (not bugs)
The DevAPI currently has no endpoints/events for:
event carries no gifter),
Notes for the maintainer
vkVideoLiveMoblinAppClientIdinVkVideoLiveAuth.swift) currently points to my registered DevAPIapplication. You may want to register an official Moblin application
in the developer cabinet (https://dev.live.vkvideo.ru) and replace
it. The redirect URI must be
https://localhost. The client id ispublic information (like the Twitch client id), no secret is used.
handled types (
channel_chat_message_send,channel_chat_message_delete) and the reward message format wereverified against the live service. Unknown event types are logged at
debug level and ignored.
developer portal assets.
Testing
Tested on a real device against a live channel: login, chat receive
(colors/badges/smiles), send, message deletion sync, reward
redemptions, viewer count, title/category changes, slow mode, emotes
only mode, reconnects on network changes, and error paths (expired
token, 4xx/5xx responses, invalid data).
Screenshots