在 Windows 应用程序中添加自定义 URL 方案,以允许浏览器调用该应用程序
URL Scheme Handler
为 Windows 应用添加自定义 URL Scheme 以便从浏览器调用
Releases:url-scheme-handler/releases
蓝奏云,密码 5kl2:https://kutt.lckp.top/OdMR0G
+ Add to Registry 添加注册表+ 添加应用注意:应用名称应与 external-player 中的名称保持一致(大小写也需一致)
建议添加 开启勾选框 注册表,添加后首次运行可勾选是否自动允许运行,后续不用再弹窗确认
开启勾选框:Enable_ExternalProtocolDialog_ShowCheckbox.reg
移除勾选框:Remove_ExternalProtocolDialog_ShowCheckbox.reg
蓝奏云,密码 5kl2:https://kutt.lckp.top/OdMR0G
ush://${app_name}?${gzip_args}参考代码
// @require https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-y/pako/2.0.4/pako.min.jsfunction compress(str) {
return btoa(String.fromCharCode(...pako.gzip(str)));
};
const app_name = 'MPV';
const args = [
'"https://example.com/example.mp4"',
'--force-media-title="URL Scheme Handler"'
];
window.open(`ush://${app_name}?${compress(args.join(' '))}`, '_self');实际执行命令
app_path "https://example.com/example.mp4" --force-media-title="URL Scheme Handler"非常欢迎你的加入!提一个 Issue 或者提交一个 Pull Request。
MIT © LuckyPuppy514
暂无开放 Issues,或尚未同步最近议题。