dsh-vidi 0.8.9 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client.js +66 -44
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -358,6 +358,17 @@ const Icon = {
|
|
|
358
358
|
rx: "2"
|
|
359
359
|
})
|
|
360
360
|
}),
|
|
361
|
+
timer: () => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
362
|
+
viewBox: "0 0 24 24",
|
|
363
|
+
width: "18",
|
|
364
|
+
height: "18",
|
|
365
|
+
...P,
|
|
366
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
367
|
+
cx: "12",
|
|
368
|
+
cy: "13.5",
|
|
369
|
+
r: "7.5"
|
|
370
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M12 9.5v4l2.5 1.5M10 3h4M12 3v3" })]
|
|
371
|
+
}),
|
|
361
372
|
live: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
362
373
|
viewBox: "0 0 24 24",
|
|
363
374
|
width: "16",
|
|
@@ -1062,7 +1073,7 @@ const BGS = {
|
|
|
1062
1073
|
* position and background.
|
|
1063
1074
|
*/
|
|
1064
1075
|
function SubtitleMenu(props) {
|
|
1065
|
-
const { lines, onLines, options, site, name, style, onStyle, t } = props;
|
|
1076
|
+
const { lines, onLines, options, site, name, style, onStyle, spoken, t } = props;
|
|
1066
1077
|
const main = lines[0] ?? "src";
|
|
1067
1078
|
const second = lines[1] ?? "";
|
|
1068
1079
|
const label = (k) => site.find((s) => s.key === k)?.label ?? name(k);
|
|
@@ -1127,6 +1138,21 @@ function SubtitleMenu(props) {
|
|
|
1127
1138
|
className: "swap",
|
|
1128
1139
|
onClick: () => onLines([second, main]),
|
|
1129
1140
|
children: ["⇅ ", t("sub.swapMain")]
|
|
1141
|
+
}),
|
|
1142
|
+
spoken && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
1143
|
+
className: "slot",
|
|
1144
|
+
title: t("set.spoken.tip"),
|
|
1145
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("set.spoken") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Pick, {
|
|
1146
|
+
value: spoken.value,
|
|
1147
|
+
onChange: spoken.onChange,
|
|
1148
|
+
options: [{
|
|
1149
|
+
value: "auto",
|
|
1150
|
+
label: t("set.auto")
|
|
1151
|
+
}, ...spoken.options.map(([k, v]) => ({
|
|
1152
|
+
value: k,
|
|
1153
|
+
label: v
|
|
1154
|
+
}))]
|
|
1155
|
+
})]
|
|
1130
1156
|
})
|
|
1131
1157
|
]
|
|
1132
1158
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -34897,7 +34923,7 @@ async function post$1(path, body) {
|
|
|
34897
34923
|
return j;
|
|
34898
34924
|
}
|
|
34899
34925
|
function Settings(props) {
|
|
34900
|
-
const { engine, onEngine,
|
|
34926
|
+
const { engine, onEngine, login, onLogin, browsers, providers, shared, name, onKey, disabled, open, onOpen, update, onCheckUpdate, t } = props;
|
|
34901
34927
|
const [checking, setChecking] = (0, react.useState)(false);
|
|
34902
34928
|
const [checked, setChecked] = (0, react.useState)(false);
|
|
34903
34929
|
const [installing, setInstalling] = (0, react.useState)(false);
|
|
@@ -35209,43 +35235,6 @@ function Settings(props) {
|
|
|
35209
35235
|
})
|
|
35210
35236
|
]
|
|
35211
35237
|
}),
|
|
35212
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
35213
|
-
className: "srow col",
|
|
35214
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
35215
|
-
className: "pair",
|
|
35216
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("set.mode") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
35217
|
-
className: "dshl-seg",
|
|
35218
|
-
children: [
|
|
35219
|
-
"live",
|
|
35220
|
-
"realtime",
|
|
35221
|
-
"polished"
|
|
35222
|
-
].map((m) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
35223
|
-
className: mode === m ? "on" : "",
|
|
35224
|
-
title: t(`mode.${m}.tip`),
|
|
35225
|
-
onClick: () => onMode(m),
|
|
35226
|
-
children: t(`mode.${m}`)
|
|
35227
|
-
}, m))
|
|
35228
|
-
})]
|
|
35229
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
35230
|
-
className: "hint",
|
|
35231
|
-
children: t(`mode.${mode}.tip`)
|
|
35232
|
-
})]
|
|
35233
|
-
}),
|
|
35234
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
35235
|
-
className: "srow",
|
|
35236
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("set.spoken") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Pick, {
|
|
35237
|
-
value: spoken,
|
|
35238
|
-
disabled,
|
|
35239
|
-
onChange: onSpoken,
|
|
35240
|
-
options: [{
|
|
35241
|
-
value: "auto",
|
|
35242
|
-
label: t("set.auto")
|
|
35243
|
-
}, ...langOptions.map(([k, v]) => ({
|
|
35244
|
-
value: k,
|
|
35245
|
-
label: v
|
|
35246
|
-
}))]
|
|
35247
|
-
})]
|
|
35248
|
-
}),
|
|
35249
35238
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
35250
35239
|
className: "srow",
|
|
35251
35240
|
title: t("set.login.tip"),
|
|
@@ -36448,11 +36437,6 @@ function LiveView(props) {
|
|
|
36448
36437
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Settings, {
|
|
36449
36438
|
engine: engine || "local",
|
|
36450
36439
|
onEngine: setEngine,
|
|
36451
|
-
mode,
|
|
36452
|
-
onMode: changeMode,
|
|
36453
|
-
spoken,
|
|
36454
|
-
onSpoken: setSpoken,
|
|
36455
|
-
langOptions,
|
|
36456
36440
|
login,
|
|
36457
36441
|
onLogin: chooseLogin,
|
|
36458
36442
|
browsers,
|
|
@@ -36640,9 +36624,38 @@ function LiveView(props) {
|
|
|
36640
36624
|
name: nameWithSpoken,
|
|
36641
36625
|
style: subStyle,
|
|
36642
36626
|
onStyle: setSubStyle,
|
|
36627
|
+
spoken: {
|
|
36628
|
+
value: spoken,
|
|
36629
|
+
options: langOptions,
|
|
36630
|
+
onChange: setSpoken
|
|
36631
|
+
},
|
|
36643
36632
|
t
|
|
36644
36633
|
}) })
|
|
36645
36634
|
},
|
|
36635
|
+
...!job.vod && job.status === "running" ? [{
|
|
36636
|
+
id: "mode",
|
|
36637
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon.timer, {}),
|
|
36638
|
+
title: t("set.mode"),
|
|
36639
|
+
label: t(`mode.${mode}`),
|
|
36640
|
+
content: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
36641
|
+
className: "dshl-modemenu",
|
|
36642
|
+
children: [
|
|
36643
|
+
"live",
|
|
36644
|
+
"realtime",
|
|
36645
|
+
"polished"
|
|
36646
|
+
].map((m) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
36647
|
+
className: `mm ${mode === m ? "on" : ""}`,
|
|
36648
|
+
onClick: () => changeMode(m),
|
|
36649
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
36650
|
+
className: "n",
|
|
36651
|
+
children: [t(`mode.${m}`), mode === m && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon.check, {})]
|
|
36652
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
36653
|
+
className: "d",
|
|
36654
|
+
children: t(`mode.${m}.tip`)
|
|
36655
|
+
})]
|
|
36656
|
+
}, m))
|
|
36657
|
+
})
|
|
36658
|
+
}] : [],
|
|
36646
36659
|
{
|
|
36647
36660
|
id: "restream",
|
|
36648
36661
|
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon.push, {}),
|
|
@@ -37479,6 +37492,7 @@ const en = {
|
|
|
37479
37492
|
"dev.blocked": "No picture or sound from the device: DeepSeek Harness needs the system’s permission. Open System Settings, switch DeepSeek Harness on, then retry.",
|
|
37480
37493
|
"dev.denied": "DeepSeek Harness needs permission to use the {d}. Open System Settings, switch it on in the list, then retry.",
|
|
37481
37494
|
"dev.and": " and ",
|
|
37495
|
+
"set.spoken.tip": "The language people speak in this video; Auto detects it.",
|
|
37482
37496
|
"rs.mode": "Subtitle mode of the push-out",
|
|
37483
37497
|
"rs.mode.live": "Pushed out about {s} s behind; subtitles come a little after the words.",
|
|
37484
37498
|
"rs.mode.realtime": "Pushed out about {s} s behind, with first-pass subtitles in step.",
|
|
@@ -37927,6 +37941,7 @@ const zh = {
|
|
|
37927
37941
|
"dev.blocked": "设备没有传来画面和声音:DeepSeek Harness 需要系统授权。点「打开系统设置」,在列表里打开 DeepSeek Harness,再点重试。",
|
|
37928
37942
|
"dev.denied": "DeepSeek Harness 需要{d}权限。点「打开系统设置」,在列表里打开它,再点重试。",
|
|
37929
37943
|
"dev.and": "和",
|
|
37944
|
+
"set.spoken.tip": "视频里说的是哪种语言;自动 = 自己识别。",
|
|
37930
37945
|
"rs.mode": "推流用的字幕模式",
|
|
37931
37946
|
"rs.mode.live": "推出去比实时晚约 {s} 秒,字幕会比说话稍晚出现。",
|
|
37932
37947
|
"rs.mode.realtime": "推出去比实时晚约 {s} 秒,带对齐好的初版字幕。",
|
|
@@ -38598,6 +38613,13 @@ html[data-platform='darwin'] .dshl.page .dshl-top :is(button, input, label, a, .
|
|
|
38598
38613
|
.dshl-menu .dshl-seg button.on { background: rgba(255,255,255,.92); color: #111; box-shadow: none; }
|
|
38599
38614
|
.dshl-menu .dshl-switch { background: rgba(255,255,255,.22); }
|
|
38600
38615
|
.dshl-menu .dshl-switch.on { background: var(--accent); }
|
|
38616
|
+
.dshl-modemenu { display: grid; gap: 4px; width: 300px; max-width: 100%; }
|
|
38617
|
+
.dshl-modemenu .mm { display: grid; gap: 3px; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: inherit; text-align: left; cursor: pointer; }
|
|
38618
|
+
.dshl-modemenu .mm:hover { background: rgba(255,255,255,.08); }
|
|
38619
|
+
.dshl-modemenu .mm.on { background: rgba(255,255,255,.12); }
|
|
38620
|
+
.dshl-modemenu .n { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; font-weight: 600; }
|
|
38621
|
+
.dshl-modemenu .n svg { width: 14px; height: 14px; }
|
|
38622
|
+
.dshl-modemenu .d { color: rgba(255,255,255,.62); font-size: 12px; line-height: 1.45; }
|
|
38601
38623
|
.dshl-menu .opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 32px; padding: 0 6px; color: var(--muted); }
|
|
38602
38624
|
.dshl-menu .opt .dshl-seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
|
|
38603
38625
|
.dshl-menu .opt input[type=range] { flex: 1; max-width: 180px; accent-color: var(--accent); }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-vidi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "A video tool for DeepSeek Harness: watch live streams, videos and podcasts with real-time subtitles in any language, then clip and download",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "PolyForm-Noncommercial-1.0.0",
|