SillyTavern / SillyTavern

LLM Frontend for Power Users.

Home Page:https://sillytavern.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FEATURE_REQUEST] Embed youtube videos / images straight into the UI?

iChristGit opened this issue · comments

Have you searched for similar requests?

Yes

Is your feature request related to a problem? If so, please describe.

There is no current issue, I was thinking how cool would it be to give the bot a youtube URL / image URL and he can refer to it when needed and embed it straight into SillyTavern, so we can just play song/ see the image like that:

image

image

It can be very immesrive, is that something that is possible to add ?

Describe the solution you'd like

An easy way to embed youtube videos or images into the UI.

Describe alternatives you've considered

No response

Additional context

No response

Priority

Medium (Would be very useful)

Are you willing to test this on staging/unstable branch if this is implemented?

Yes

Markdown and HTML embeds are fully supported if you have enabled external media.

https://www.markdownguide.org/cheat-sheet/

Markdown and HTML embeds are fully supported if you have enabled external media.

https://www.markdownguide.org/cheat-sheet/

Thanks for the response!
I looked at the page you linked but cant see the embed for youtube videos option
I can see that in general it should be like that:

<iframe width="560" height="315" src="https://www.youtube.com/embed/video-id" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Did you manage to embed a youtube link ?

Edit: I am on latest staging version, and enabled external media, but results for images/videos still look like that:
image

I use this command:

[![An old rock in the desert](/assets/images/shiprock.jpg "Shiprock, New Mexico by Beau Rogers")](https://www.flickr.com/photos/beaurogers/31833779864/in/photolist-Qv3rFw-34mt9F-a9Cmfy-5Ha3Zi-9msKdv-o3hgjr-hWpUte-4WMsJ1-KUQ8N-deshUb-vssBD-6CQci6-8AFCiD-zsJWT-nNfsgB-dPDwZJ-bn9JGn-5HtSXY-6CUhAL-a4UTXB-ugPum-KUPSo-fBLNm-6CUmpy-4WMsc9-8a7D3T-83KJev-6CQ2bK-nNusHJ-a78rQH-nw3NvT-7aq2qf-8wwBso-3nNceh-ugSKP-4mh4kh-bbeeqH-a7biME-q3PtTf-brFpgb-cg38zw-bXMZc-nJPELD-f58Lmo-bXMYG-bz8AAi-bxNtNT-bXMYi-bXMY6-bXMYv)

@Cohee1207
Hey, should I open another issue regarding the markdown not working? Is that working in your install?

The code you provided is not a valid markdown. Try rewriting it to leave just the external image and without other things.

Ive tried a lot of combinations, nothing works.. can you give an example of code that works?

image

@Cohee1207

![Wine And Cheese](https://static.independent.co.uk/2022/12/19/13/iStock-958364666.jpg)

Thank you! that works
Can you please also share the code to embed a youtube video?
Much appriciated!
@Cohee1207

Managed to embed youtube videos using:

[![Watch the video](https://img.youtube.com/vi/nTQUwghvy5Q/default.jpg)](https://youtu.be/nTQUwghvy5Q)

closing this issue

iframe tags for embedding are not allowed for security reasons. Using video tags directly is not convenient since it requires a direct video URL which YouTube does not provide without using external tools.

I have made a quick server plugin + UI extension combo to insert playable videos into chat messages.

Server plugin: https://github.com/Cohee1207/SillyTavern-YouTube-Player
UI extension: https://github.com/Cohee1207/SillyTavern-YouTube-Videos