samwarnick / obsidian-simple-embeds

A plugin for Obsidian that automatically turns links into embeds.
MIT License
166 stars 21 forks source link

[FEATURE REQUEST] PeerTube Embeds #49

Open necopinus opened 1 year ago

necopinus commented 1 year ago

It would be awesome if Simple Embeds could support PeerTube. PeerTube has an embedding API, but the hard part might be figuring out if a URL represents a PeerTube server, since it's a distributed/self-hosted platform.

Currently I embed PeerTube videos directly with iframes; for example, this URL

https://peertube.linuxrocks.online/w/kWfBbYERiN9KWqoLaCdAVk

corresponds to this iframe-suitable embed

https://peertube.linuxrocks.online/videos/embed/a170ccc1-5d49-4517-a5dc-c0f2844c579d

That said, Simple Embeds is a much cleaner solution than iframes!

samwarnick commented 1 year ago

@necopinus do you typically only use one PeerTube server? Like if you were able to put https://peertube.linuxrocks.online in the settings as your PeerTube server, would that be good enough? Might be possible to allow multiple urls, but I think you as the user would have to enter the urls you want to use for it to work.

necopinus commented 1 year ago

It's not the only server I use, no. That was just an example I happened to have in front of me.

Maybe a comma separated list? Something like peertube.linuxrocks.online,video.blender.org,etc.

axelsegebrecht commented 1 year ago

I vote for this also as I try to move away from YouTube. What would it take to amend the plugin to allow this feature?

Not sure how useful this is but here's an example of an integration for Nextcloud: https://apps.nextcloud.com/apps/integration_peertube

The app allows the user to limit embedding for a list of pre-defined servers.