Skip to content

Conversation

@donaldguy
Copy link

@donaldguy donaldguy commented May 7, 2023

works, but buggy: Handle local file links

  • Handles links to files both (pretty consistently) in the Vault and (at
    least when they are <2GiB) elsewhere on disk; Fixes Support local files with obsidian links or relativ path #20

  • Insert a button when the Open Local Video modal is used, which by the
    way I made a little less generic (in terms of name in code and command palette) than in closes #4; add local video support #13

  • Ignore/Strip markdown wrapping when invoking the "Open Video player"
    action: this is helpful with vault-local files cause you can drag them
    from the side-bar or use autocomplete to get them referenced before
    turning into link

also ran npm audit fix


Issues:

  • as noted, files referenced by absolute path will not load if bigger than 2 GiB, this is a limitation of node's fs module - the workaround using streams is possible but not apparently accessible through the Obsidian APIs

    • big files will load the first time using the modal from closes #4; add local video support #13 and indeed the link, I think (but maybe it was just in a draft past), works while obsidian remains open (file is cached) - but it fails to load & errors into console after restarting
  • In testing there were various times where (especially after clicking two links in quick succession) the video pane got wedged with the play/pause button flashing and no playback. I think this bug may pre-exist this work, but I am not sure

Anyway, idk if you want to take this, but I accidentally worked on it for the last several hours so might as well open the PR

donaldguy added 2 commits May 7, 2023 02:58
- Handles links to files both (pretty consistently) in the Vault and (at
  least when they are <2GiB) elsewhere on disk; Fixes juliang22#20
- Insert a button when the Open Local Video modal is used, which by the
  way I made a little less generic than in juliang22#13
- Ignore/Strip markdown wrapping when invoking the "Open Video player"
  action: this is helpful with vault-local files cause you can drag them
  from the side-bar or use autocomplete to get them referenced before
  turning into link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support local files with obsidian links or relativ path

1 participant