2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Play video userpics in photo change messages.

This commit is contained in:
John Preston
2020-07-03 21:44:21 +04:00
parent e363b254f6
commit f99960e1f6
7 changed files with 212 additions and 46 deletions

View File

@@ -839,7 +839,7 @@ bool UserpicButton::createStreamingObjects(not_null<PhotoData*> photo) {
: Data::FileOrigin(Data::FileOriginPeerPhoto(_peer->id));
_streamed = std::make_unique<Instance>(
photo->owner().streaming().sharedDocument(photo, origin),
[=] { update(); });
nullptr);
_streamed->player().updates(
) | rpl::start_with_next_error([=](Update &&update) {
handleStreamingUpdate(std::move(update));
@@ -892,8 +892,6 @@ void UserpicButton::streamingReady(Media::Streaming::Information &&info) {
void UserpicButton::updateVideo() {
Expects(_role == Role::OpenPhoto);
using namespace Media::Streaming;
const auto id = _peer->userpicPhotoId();
if (!id) {
clearStreaming();