From 945f3b298e4f6f3d2c3f8e2940c49b9a4db14228 Mon Sep 17 00:00:00 2001 From: zuluwi <111116092+zuluwi@users.noreply.github.com> Date: Fri, 9 Feb 2024 21:25:10 +0300 Subject: [PATCH] add "start Syncplay with url" option --- README.md | 7 ++++++- src/main.ts | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d8cc472..e0bef07 100644 --- a/README.md +++ b/README.md @@ -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 @@ -75,6 +76,7 @@ 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 @@ -82,6 +84,9 @@ Open the command palette (Ctrl+P) and use the `Take and paste snapshot from vide [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) diff --git a/src/main.ts b/src/main.ts index 751ab6a..b855164 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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"),