YouTube links support? and sharing images by URL? #8

Open
opened 2023-03-24 03:40:06 +00:00 by kirsle · 0 comments
Owner

Some ways we can make the chat room more fun:

Share images by URL

The file share button is nice to share a picture from your device, but easy built-in support for web URL image sharing could be cool too.

How it may work:

  • The server could look for the first URL in a user's message and make a quick HEAD request to see if it's an image.
  • If it's an image inject an <img src="https://url"> into the user's message (users can already type this in themselves, this would just automate it and can apply a max width like uploaded pics have so you don't overwhelm the chat w/ a large pic)

Possible privacy concern: direct linking to external URLs can allow tracking (all chatters' browser loads the link revealing IP addresses) - may want to implement a proxy server to fetch the image on behalf of users.

When a user pastes a YouTube URL in chat we could try and embed the video directly in-line so users can watch it in the chat.

It may look like: the ChatServer recognizes a YouTube URL and it injects the <iframe> embed tag into the user's message (after Markdown rendering).

(note that: while the chat supports some HTML it only allows simple tags that Markdown renders into anyway - no iframes, scripts or anything crazy, so users could not embed that <iframe> tag themselves)

Some ways we can make the chat room more fun: ### Share images by URL The file share button is nice to share a picture from your device, but easy built-in support for web URL image sharing could be cool too. How it may work: * The server could look for the first URL in a user's message and make a quick `HEAD` request to see if it's an image. * If it's an image inject an `<img src="https://url">` into the user's message (users can already type this in themselves, this would just automate it and can apply a max width like uploaded pics have so you don't overwhelm the chat w/ a large pic) Possible privacy concern: direct linking to external URLs can allow tracking (all chatters' browser loads the link revealing IP addresses) - may want to implement a proxy server to fetch the image on behalf of users. ### YouTube link expansion When a user pastes a YouTube URL in chat we could try and embed the video directly in-line so users can watch it in the chat. It may look like: the ChatServer recognizes a YouTube URL and it injects the `<iframe>` embed tag into the user's message (after Markdown rendering). (note that: while the chat supports some HTML it only allows simple tags that Markdown renders into anyway - no iframes, scripts or anything crazy, so users could not embed that `<iframe>` tag themselves)
kirsle added the
enhancement
label 2023-03-24 03:40:06 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: apps/BareRTC#8
No description provided.