orion icon indicating copy to clipboard operation
orion copied to clipboard

Gif emotes don't move

Open sum01 opened this issue 6 years ago • 1 comments

The BTTV gif emotes display as a static image instead of a moving gif.

On Linux, installed through the AUR.

sum01 avatar May 06 '18 22:05 sum01

Most chat images are loaded on the C++ side and then provided to the UI via QQuickImageProviders. This is so that they can be cached at predetermined locations on the disk between runs without a lot of fuss. Qt's QImage infrastructure, which is used to load images for the image providers, works with GIFs, and Qt's AnimatedImage QML type can display animated GIFs, however AnimatedImage doesn't work with QQuickImageProvider (or at least it didn't back when this was first implemented in Qt 5.6-5.8 or so). To get around this, I just fed the original image URL to the UI, and for images that we knew were going to be animated (e.g. bits images), had the UI switch to an AnimatedImage and put in the original GIF URL for the UI to load directly. This isn't ideal performance-wise but at least the animation works.

The solution to animating emotes would be to rework the handling of emotes that will be coming in as animated GIFs and have them use the same code path as is currently used for bits images.

The view side of this stuff is in ChatMessage.qml.

rakslice avatar Aug 27 '18 05:08 rakslice