Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add zero-width/overlay emote support #242

Closed
JanitorialMess opened this issue Dec 18, 2024 · 13 comments
Closed

Add zero-width/overlay emote support #242

JanitorialMess opened this issue Dec 18, 2024 · 13 comments

Comments

@JanitorialMess
Copy link

Currently, zero-width/overlay emotes display as regular emotes rather than overlaying on other emotes.
Examples of zero-width emotes can be found here: https://7tv.app/emotes?page=1&query=zerowidth&o=1

@fgl27
Copy link
Owner

fgl27 commented Dec 18, 2024

I don't understand what this emote does where are the technical explanation and visual examples?

@fgl27
Copy link
Owner

fgl27 commented Dec 18, 2024

I tried a few to see how it work, will check if possible

{E47D5869-4D4C-4BDC-BFEA-5CEE2ADBF806}

https://7tv.app/emotes/01EZPH3FHR000C438200A44F11

https://7tv.app/emotes/01FWMJG56R0003G26ZWQ26BF2A

fgl27 added a commit that referenced this issue Dec 18, 2024
fgl27 added a commit that referenced this issue Dec 18, 2024
@fgl27
Copy link
Owner

fgl27 commented Dec 18, 2024

that last commit is just for custom emotes it doesn't work with twich emotes yet, once it does I push to the app...

it looks like this for now

image

that last one is not working is a normal twitch emote

@JanitorialMess
Copy link
Author

JanitorialMess commented Dec 19, 2024

Great work. I found an "RFC" that other twitch app devs seem to follow which documents a way to join emotes without the ZERO WIDTH JOINER since twitch filters it out (twitchdev/issues#307).
This issue explains it better and links to the workaround: chatsen/chatsen#169

@fgl27
Copy link
Owner

fgl27 commented Dec 19, 2024

Thanks, I didn't know about the emojis issue. Will take at look at their implementation.

Any other emote provider other then 7tv is using zero-width/overlay emotes ?

fgl27 added a commit that referenced this issue Dec 19, 2024
fgl27 added a commit that referenced this issue Dec 19, 2024
fgl27 added a commit that referenced this issue Dec 19, 2024
fgl27 added a commit that referenced this issue Dec 19, 2024
fgl27 added a commit that referenced this issue Dec 19, 2024
@fgl27
Copy link
Owner

fgl27 commented Dec 19, 2024

I pushed the changes adding the support for the 7tv zero-width/overlay emotes

I also included the changes for "RFC"

If anything is not working as expected let me know.

Thanks!

@JanitorialMess
Copy link
Author

JanitorialMess commented Dec 19, 2024

Thanks, I didn't know about the emojis issue. Will take at look at their implementation.

Any other emote provider other then 7tv is using zero-width/overlay emotes ?

I have tested BTTV's extension alone with emotes that should be zero-width like SoSnowy but it does not seem to combine them with anything. I assume they don't support the feature.

BTTV allows users to upload any type of emote but does not seem to care if they should be overlayed or not. By looking into 7TV's code I found that they have a hardcoded list of BTTV emotes that they convert to 7TV zero-width emotes.

const BTTV_ZeroWidth = ["SoSnowy", "IceCold", "SantaHat", "TopHat", "ReinDeer", "CandyCane", "cvMask", "cvHazmat"];

7TV converts emotes hosted on BTTV that should be overlayed into 7TV emotes and overlays them. BTTV itself does not support that feature.

On FFZ I wasn't able to find any zero-width emotes at all.

I appreciate how quickly this feature was implemented and all the effort you’ve put into SmartTwitchTV!

@JanitorialMess
Copy link
Author

JanitorialMess commented Dec 19, 2024

I found an issue. The current implementation seems to only combine emotes by pair.
7TV allows more than 2. I was able to test up to 4 but I don't think there is a limit, I couldn't verify.
Typing AlienDance SteerR SnowTime PETPET on Twitch results in:
emote_overlay

Doing the same on SmartTwitchTV:
studio64_vLLHR1YCDz
It combines AlienDance and SteerR together and then SnowTime and PETPET together.
Combining zero width emotes together is a valid use case and I am able to achieve to get the same result as SmartTwitchTV by adding a character in between. For example AlienDance SteerR . SnowTime PETPET
image

fgl27 added a commit that referenced this issue Dec 20, 2024
@fgl27
Copy link
Owner

fgl27 commented Dec 20, 2024

Thanks for the test

seems ok now

image

test let me know if any other issues

@JanitorialMess
Copy link
Author

I did some limit testing and there is no limit to the number of emotes you can overlay with 7TV. I tested up to 12.
I can't do more tests on the app because if I add 7TV emotes to my own channel none of them render on my channel's chat. Only global 7TV emotes work.

That being said, the current implementation seems to work fine on other channels.

@fgl27
Copy link
Owner

fgl27 commented Dec 22, 2024

You can test by adding the same a few times... I did seems all good. Thanks for the help.

You can see on yours channel on this app? Or the twitch site?

I assume is a caching thing.

@JanitorialMess
Copy link
Author

JanitorialMess commented Dec 22, 2024

Wiping the data of the emulator and reinstalling the app fixed it. I have tested multiple overlays as well and everything works just like on 7TV. I think we can consider this issue solved. Great job!

@fgl27
Copy link
Owner

fgl27 commented Dec 22, 2024

Thank you!

@fgl27 fgl27 closed this as completed Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants