mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Play video userpics in photo change messages.
This commit is contained in:
@@ -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();
|
||||
|
@@ -26,7 +26,6 @@ class SessionController;
|
||||
namespace Media {
|
||||
namespace Streaming {
|
||||
class Instance;
|
||||
class Document;
|
||||
struct Update;
|
||||
enum class Error;
|
||||
struct Information;
|
||||
@@ -222,13 +221,13 @@ private:
|
||||
void setCursorInChangeOverlay(bool inOverlay);
|
||||
void updateCursor();
|
||||
void updateVideo();
|
||||
bool showSavedMessages() const;
|
||||
void checkStreamedIsStarted();
|
||||
bool createStreamingObjects(not_null<PhotoData*> photo);
|
||||
void clearStreaming();
|
||||
void handleStreamingUpdate(Media::Streaming::Update &&update);
|
||||
void handleStreamingError(Media::Streaming::Error &&error);
|
||||
void streamingReady(Media::Streaming::Information &&info);
|
||||
bool showSavedMessages() const;
|
||||
void paintUserpicFrame(Painter &p, QPoint photoPosition);
|
||||
|
||||
void grabOldUserpic();
|
||||
|
Reference in New Issue
Block a user