Open shahmajlani opened 7 years ago
Just gonna bump this because I would also like such a feature :)
Probably could do with a bit more explanation here. Do you want all videos to loop, or just ones the uploader has marked. I can see this becoming annoying quickly for some videos.
Perhaps only for videos that are actually visible, i.e. don't play ones that have been scrolled past. And with the video muted by default.
That's my opinion anyway.
The only-autoplay-in-view is also reported here: https://github.com/vector-im/riot-web/issues/4528
Riot currently supports autoplaying videos (as muted), but it'll also happily keep playing them when you scroll past them.
The existence of video auto-loop in Telegram resulted in me substituting video almost entirely for GIF. This feature would be especially useful for self-hosting, since the far-more efficient video formats save server space, in addition to providing a better user-experience. Not only is the quality much better, sending / receiving, generally faster, and playback, less laggy, but also user options, in terms of resolution, length, and, as a result, variety of applications for use, are substantially greater. This is one of the features I most miss from Telegram. This was particularly useful with Telegram because of the ability to use HEVC,¹ though it seems that iOS recently added support for VP9 over WebM playback, which does help to mitigate the need for HEVC support in iOS Element.
──────────────────── ¹ I'd also love to see HEVC support, but I believe that's already been discussed at length, and the developers said it was unlikely to be implemented, favoring eventual support for AV1 instead. I used HEVC all the time with Telegram, since it was efficient and supported across devices, although, my usage was somewhat unorthodox I think—I'd generally encode on PC with x265 in 8bpc, 4:2:0, but with otherwise more demanding settings. I noticed that, if these files were sent via the mobile Telegram app, they'd always be re-encoded (I believe to AVC) with substantially less-efficient settings, resulting in a larger (usually, substantially so) video file at lower quality (unless sent without compression, resulting in it being displayed as a small icon instead of a large, auto-looping video); however, if I instead sent the same file using the PC desktop client (just drag-drop), the full-quality original would be sent without re-encoding, but it would be displayed as large, auto-looping video, as though it were sent with the 'send as video' ("compressed") option instead of as a smaller icon, the way using the 'send file' ("without compression") option displays. Further, these full-quality versions were displayed in this fashion across devices, and I never noticed any issues with playback (my testing has involved PC and Linux clients, iOS on an iPhone X, and several newer Samsung Android devices). One more note, although I think this may have changed recently—at least on iOS, these videos would always have the 'GIF' text label by the video (like a GIF would have), but the video being displayed was the full-quality version, and I was able to confirm that the file being set was in fact the original by downloading it to the device, initially confirming the metadata was as expected, and then transmitting the file back to the PC (using some lossless channel, such as sFTP or samba), and confirming the hash value was identical.
The only-autoplay-in-view is also reported here: #4528
Riot currently supports autoplaying videos (as muted), but it'll also happily keep playing them when you scroll past them.
I think the distinction with this issue is a concern over 𝘭𝘰𝘰𝘱𝘪𝘯𝘨 (so that video formats can be used in place of looping GIF), as opposed to playback of videos.
The lack of this feature (auto-looping video so that it can be used in place of GIF) has been the primary impediment of getting a certain group of friends to stop using Telegram and switch over fully to Element. I'd also really like to see it, since I'm hosting the server, and video would be a lot less burdensome in terms of storage and transmission.
It is also useful for telegram-bridge, some webm stickers need to loop to display better.
It seems that this issue is the best place for my suggestion about GIFs as well:
Would it be possible to loop GIFs and small videos a certain amount of time and then stop them. Once stopped, a play button appears and you can replay a few loops before it stops again and show the play button again. At any moment in time, you could click on the GIF/video and it would stop it.
This is the behaviour of GIFs (and I assume small videos as well) in Teams.
I find it pretty useful as if you have Element on your other screen while working, it only attract your attention for a few seconds and then the app returns to a more passive mode.
Would be awesome if riot-web had a settings toggle to enable the looping of inline webm previews.