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

[Feature Request] Embed and resize local media (audio, video, image) in a dataview query #864

Open
Elaws opened this issue Feb 16, 2022 · 6 comments
Assignees

Comments

@Elaws
Copy link

@Elaws Elaws commented Feb 16, 2022

Hello,

Not sure if this depends more on Obsidian or Dataview, but currently local media can’t be embedded in a dataview table.

It would be great if media could be embedded and resized in dataview queries, especially local audio files, and importantly using relative paths inside vault.

Thanks !

@blacksmithgu
Copy link
Owner

@blacksmithgu blacksmithgu commented Feb 16, 2022

I have no idea how the audio player works, to be honest - is it just a file embed that shows up as a playable thing?

@Elaws Elaws changed the title [Feature Request] Support for audio player [Feature Request] Embed and resize local media in a dataview query Feb 16, 2022
@Elaws Elaws changed the title [Feature Request] Embed and resize local media in a dataview query [Feature Request] Embed and resize local media (audio, video, image) in a dataview query Feb 16, 2022
@Elaws
Copy link
Author

@Elaws Elaws commented Feb 16, 2022

Thanks for your quick reply @blacksmithgu !

Here is what the audio player looks like :

image

I just noticed that no local media can be embedded in a dataview query (images, videos or audio), so I've edited this feature request to include them.

@Elaws
Copy link
Author

@Elaws Elaws commented Feb 16, 2022

@blacksmithgu : Here is the link of that FR on Obsidian's forum, just in case it does not rely exclusively on Dataview.

If not, I can delete the FR on Obsidian's forum, and keep only this one here.

@blacksmithgu
Copy link
Owner

@blacksmithgu blacksmithgu commented Feb 16, 2022

This one is a little complicated, mainly because it's up to the Obsidian API to support rendering these blocks inside of plugin-rendered Markdown. I will make an API request to see if it is feasible.

@Elaws
Copy link
Author

@Elaws Elaws commented Feb 17, 2022

Thank you @blacksmithgu , looking forward to hearing news on that FR ! ;)

@darrenkuro
Copy link

@darrenkuro darrenkuro commented Mar 4, 2022

Similarly to this issue, it works fine for me if insert DOM manually when querying, regarding audio, it'd be <audio controls src="app://local/${this.app.vault.adapter.basePath}/${this.app.vault.config.attachmentFolderPath}/${dv.current().audio}"> </audio>
But some sort of native support with embed would be awesome! DOM code in MD file is a pain to look at.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants