Skip to content

Commit

Permalink
add "start Syncplay with url" option
Browse files Browse the repository at this point in the history
  • Loading branch information
zuluwi committed Feb 9, 2024
1 parent f71d243 commit 945f3b2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ Link Syntax:
```

> [!tip]
> Check `Pause video while pasting timestamp` in Settings
>
> - Check `Pause video while pasting timestamp` in Settings
#### Include Subtitle Link

Expand All @@ -75,13 +76,17 @@ If you want to include the subtitle link in the video link, instead of dragging
Open the command palette (Ctrl+P) and use the `Take and paste snapshot from video` command to paste a snapshot of the current video with the timestamped link where the cursor is in the editor.

> [!tip]
>
> - Check `Pause video while pasting snapshot` in Settings
> - If you want to open the exact frame in the snapshot with the timestamp link, enable `Use percentile position instead of of seconds as timestamp value in the link` in Settings
### Running Syncplay with plugin arguments

[Syncplay](https://github.com/Syncplay/syncplay?tab=readme-ov-file#syncplay) is an application that connects to an online server to open the preferred player and synchronizes the connected players. By selecting `Syncplay.exe` from the plugin settings and clicking the **Start Syncplay** button, you can start Syncplay so that the plugin interacts with the VLC Player that the app will open.

> [!tip]
> Create a shortcut with the url `obsidian://vlcBridge-runSyncplay` to open Obsidian and then Syncplay
## Attributions

- [Media Extended](https://github.com/PKM-er/media-extended)
Expand Down
4 changes: 4 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export default class VLCBridgePlugin extends Plugin {
this.openVideo(openParams);
});

this.registerObsidianProtocolHandler("vlcBridge-runSyncplay", () => {
this.launchSyncplay();
});

this.addCommand({
id: "paste-video-path-with-timestamp",
name: t("Paste timestamped link of current video"),
Expand Down

0 comments on commit 945f3b2

Please sign in to comment.