ByzantineFailure / BPM-for-Discord

BPM for Discord's Desktop App. Includes one-click installers, update notifications, and custom script support.
GNU Affero General Public License v3.0
17 stars 8 forks source link

Discord update broke Animotes™ #85

Closed Tadaboody closed 6 years ago

Tadaboody commented 7 years ago

Since the last update (20.7) they just don't animate.

ByzantineFailure commented 7 years ago

Blech. Investigating

ByzantineFailure commented 7 years ago

tl;dr: They're broken in a way I can't fix and our only hope is a Discord update fixes them

Okay, here's the skinny:

Back in the day, BPM was created to host APNGs from reddit as GIFs because not all browsers supported APNGs. So, all animotes that were of type APNG would get uploaded as GIFs and be resolved that way.

As of the last BPM update, all GIF conversion is removed and APNGs are the way the animotes are hosted. This was done because basically all major browsers support APNG nowadays.

Unfortunately, that doesn't include Electron, which runs Discord, or at least the version of Electron that Discord ships with.

Basically animotes are broken not because of BPM but because the environment discord runs in doesn't support them at the moment. Our only hope here is that eventually they update their Electron version and we get APNG support.

This may occur in the not-too-far future, though -- Chromium shipped APNG support in March and theoretically Electron stays relatively up to date w/ Chromium (the Github repo for Electron last updated their Chromium source in May). I think we're waiting on Discord to update their Electron version.

I'm going to leave this issue open to keep track of it but as of now there's not much to be done about it without reverting the APNG commit in the mainline, which I don't think anyone maintaining the mainline would want to do (and I wouldn't want them to, frankly).

Calinou commented 7 years ago

What about loading an APNG polyfill along with BPM? This polyfill worked with older versions of Chrome (back when it lacked APNG support).

Note that this polyfill disables itself when it detects a browser supporting APNG, so eventually removing it (once Electron is updated to support APNG) doesn't have to be done immediately (since the browser's APNG implementation will be used instead of the polyfill, in this case).

Note: on Edge (the only desktop Web browser whose current version does not support APNG), the polyfill only works on the initially-loaded image on the demo website, not the ones loaded via JavaScript (after clicking the "Show more images" link), but this could be specific to Edge.

ByzantineFailure commented 7 years ago

This is worth looking into. Will investigate.

ByzantineFailure commented 6 years ago

These have been added back to the mainline and as of d0ccec75dffd3f77bfbad336c0718f2b7128ee0f function again. Should go out in the next release tonight.