Skip to content

Inline gif (media) rendering, unique chat colors for each user#772

Open
Osanosa wants to merge 2 commits intoSyncplay:masterfrom
Osanosa:master
Open

Inline gif (media) rendering, unique chat colors for each user#772
Osanosa wants to merge 2 commits intoSyncplay:masterfrom
Osanosa:master

Conversation

@Osanosa
Copy link
Copy Markdown

@Osanosa Osanosa commented Apr 23, 2026

image

Osanosa added 2 commits April 23, 2026 02:57
Introduce inline media rendering for chat messages. Adds MessageTextView, ClickableMediaLabel, ChatOutputArea and InlineMediaWidget to fetch and display images/GIFs via QtNetwork.QNetworkAccessManager (with fallback text). Replace the single QTextBrowser with a scrollable ChatOutputArea and render chat items as individual MessageTextView/InlineMediaWidget widgets. Add media URL detection (_getInlineMediaUrl), message header formatting (_formatMessageHeader), and newMediaMessage; adjust newMessage to use addOutputWidget. Import QtNetwork and html.escape and initialize _chatMediaNetworkManager. Also remove automatic <br /> suffixes from some message formatting to avoid extra line breaks.
Import hashlib and add a static _usernameColorStyle(username) that computes an MD5-based hue (using the first two bytes mod 360) and returns an HSL color string adjusted for dark or light mode (uses global isDarkMode). Use this helper in showMessage and the message header to apply consistent, deterministic color styling to username spans.
@Osanosa Osanosa changed the title Inline gif (media) rendering, unique chat colors for each uses Inline gif (media) rendering, unique chat colors for each user Apr 23, 2026
@Et0h
Copy link
Copy Markdown
Contributor

Et0h commented Apr 23, 2026

It's neat that you can do this but I consider adding media embedding to be unnecessarily risky feature creep.

In my view the change goes against key principles at #315 because:

  1. Text only chat works with the gui, command line version of Syncplay and with the mpv osd, but images/GIFs would show up differently depending on the chat display method. This goes against the principle of consistency/predictability.
  2. This feature is not very backwards compatible with previous versions of Syncplay. This goes against the principle of compatibility.
  3. Allowing media adds a whole new security and mischief vector we just don't need to have to find mitigations for. This goes against the principles of disruption minimisation and potentially privacy.
  4. If people want Discord they can use Discord, there is no need for this in Syncplay. This goes against the principle of simplicity.

@Osanosa
Copy link
Copy Markdown
Author

Osanosa commented Apr 23, 2026

Like idk it just parces direct file links and doesn't break anything
I see no issues
On mobile client I did also add a picker and I'm loving it! (https://t.me/ThemedProject/1019)

So I don't see any compatibility issues as where not supported it is shown as text and where is supported it is a fun thing

Do you find this problematic still?
I mean, nobody's forcing users to send those 🤪

@Osanosa
Copy link
Copy Markdown
Author

Osanosa commented Apr 26, 2026

@Et0h any more feedback? it is fully compatible with previous versions, as it just detects direct media URLs.

@daniel-123
Copy link
Copy Markdown
Contributor

@Osanosa I'm going to back up Et0h with comment that this is a security nightmare. Downloading and rendering media is absolutely rife with vulnerabilities.

To me, all other arguments around this are just fluff - inevitable security issues alone make this completely unsustainable burden to maintain for current core Syncplay developers.

@Osanosa
Copy link
Copy Markdown
Author

Osanosa commented Apr 26, 2026 via email

@Osanosa
Copy link
Copy Markdown
Author

Osanosa commented Apr 26, 2026

but it loads only media types? like cuh?

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

Successfully merging this pull request may close these issues.

3 participants