-
-
Notifications
You must be signed in to change notification settings - Fork 819
Conversation
Respects tg bridge info fields to loop and hide the video player controls. If autoplay is disabled it plays on hover instead. Signed-off-by: Marcus Hoffmann <[email protected]>
47a845d
to
0ffd6d0
Compare
let loop = false; | ||
let controls = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let loop = false; | |
let controls = true; | |
const loop = content.info["fi.mau.loop"]; | |
const controls = !content.info["fi.mau.hide_controls"]; |
Or similar feels more readable.
Also, could you please add some comment explaining why is this necessary?
onMouseOver={!autoplay && !controls ? event => (event.target as HTMLVideoElement).play() : () => { }} | ||
onMouseOut={!autoplay && !controls ? | ||
event => { | ||
(event.target as HTMLVideoElement).pause(); | ||
(event.target as HTMLVideoElement).currentTime = 0; | ||
} : () => { }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would be easier to read if these were separate methods somewhere above
All valid points, I can add more explanation as well 👍 |
Why is the Telegram bridge sending videos as stickers :( It should be sending sticker events. |
I think sticker events can only contain images atm? |
They indeed only handle images at the moment, but the whole point of Matrix is that things are extensible and backwards compatible with each other. A sticker would have an image fallback (which may very well be a still image for performance reasons), but also metadata to indicate that it can be rendered as a looped video. Extensible Events in particular would help with this, but it's not necessarily needed here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clearing review request. We should support looping video stickers off of stickers, not video events.
For stickers, maybe. Telegram also sends "gifs" as videos (they are just mp4s in the telegram world because gifs suck).Those should behave like "real" gifs for the user I think. I won't have time to implement animated sticker events, so closing. |
Respects tg bridge info fields to loop and hide the video player
controls. If autoplay is disabled it plays on hover instead.
Flags can be seen i.e. here: mautrix/telegram@64107fa
Here's what your changelog entry will look like:
✨ Features