LiveTL / HyperChat

Improved YouTube chat with CPU/RAM optimizations, customization options, and cutting-edge features!

Home Page:https://livetl.app/hyperchat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature] Replace svg emoji with png counterpart:

Candygoblen123 opened this issue · comments

Checklist

  • This is an issue for Hyperchat, not LiveTL. I will go to the LiveTL repo to report an issue for LiveTL.
  • I have checked for a duplicate or similar issue. I made sure to check closed issues as well.
  • I am not reporting a bug. If I am, I will use the bug report issue template.
  • By submitting this issue, you agree to follow our Code of Conduct

Is your feature request related to a problem? Please describe.

A performance issue with rendering a massive amount of svg files

Describe the solution you'd like

Using the emoji I’d, we can replace the YouTube svg emoji with either a png counterpart or with the system emoji counterpart

Expected behavior

YouTube emojis, which often get spammed, should be replaced with a png counterpart, or even better, a system emoji.

Describe alternatives you've considered

No response

Anything else?

No response

Do note that if you mess up the png path, it will go and return (and in some cases, attempt to render) the entire YouTube 404 page

regex to find the url with default svg emoji within the messages
src="https:\/\/www\.youtube\.com\/s\/gaming\/emoji\/[a-zA-Z\d]+\/[a-zA-Z]+_[a-zA-Z\d]+\.svg

Seems like only "standard" emojis are being served with SVGs for now. I'd rather switch them to their unicode counterparts (which is fortunately provided in the json as alt text) than changing the URLs in case YT stops providing the pngs or something.

image
hm, perhaps we should make this an option disabled by default instead of forcing it?

Adding an option would also fix #46