PKM-er / media-extended

enhanced media(video/audio) playback for obsidian.md
https://mx.pkmer.net
MIT License
632 stars 52 forks source link

Combine `media-extend` with `obsidian-yt-transcript` to navigate through transcripts #192

Closed bfcs closed 5 months ago

bfcs commented 9 months ago

Hi everyone, recently I've been thinking of the optimal solution for taking video notes then I've found the two plugins media-extend and obsidian-yt-transcript, I want to navigate through transcripts, but there are some obstacles, cause I' am new to plugin development and don't know how to solve them. So I write it for some help.

media-extend could implement navigation through #, though there is a bug so need to put it inside a callout and inject css snippet .workspace-leaf-content[data-type="media-view"] ~ .workspace-leaf-content[data-type="markdown"] { display:none; }

obsidian-yt-transcript generate timestamp link to jump to YouTube using ? and & in url, like below

Snipaste_2024-01-14_13-29-03

my initial thought was to change the & to # in transcript link, but no luck, because url in editor register an event in media-extend while url in transcript view doesn't

Snipaste_2024-01-14_13-30-01 Snipaste_2024-01-14_13-30-35

I wonder if obsidian support any way to register an event from another plugin? or other approach to implement this and won't take much effort.Any insights or suggestions would be greatly appreciated !

bfcs commented 9 months ago

I tried to write it, see my fork here

aidenlx commented 9 months ago

Firstly, thank you for your contribution! Apologies for the long period of inactivity on this project. The plugin has been fully rewritten for the v3 release. I'm currently preparing for the beta release, in which this feature is integrated. Stay tuned and I'll list you as one of contributors!

bfcs commented 9 months ago

Hi, @aidenlx Already heard of the news of v3 from discord, but didn't expect it to be launched so quickly. Thank you for your great job! I am honored to be able to participate in the development together.

R8KwEwN2hvrhY commented 8 months ago

感谢作者大大辛苦更新~~~

aidenlx commented 5 months ago

done in v3.2.0

EnriqueTMT commented 4 months ago

Does obsidian-yt-transcript work with media-extend now? If so, what is the intended integration?

When I drag parts of the transcript that's pulled from the transcript created by obsidian-yt-transcript, it still makes every YouTube timestamped link use &t= instead of #t=. The part "#t=" in the YouTube link is a requirement to jumping to the timestamped section of the YouTube video within Media Extended.

I found a mention of obsidian-yt-transcript in the code base, but I'm not sure how to get the two plugins to play nice. Link to part of code base: https://github.com/PKM-er/media-extended/blob/7d94ac8f6640b15eef099a8d9c2f8fdeb3a67979/apps/app/src/web/session/youtube.ts#L30

aidenlx commented 4 months ago

Media extended now include features in yt-transcript. You could download transcripts directly with media extended right now. Just go to more options menu of player and open transcript you need.