dsh-sidebar-media-player 0.2.4 → 0.2.5
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/CHANGELOG.md +12 -0
- package/README.md +5 -0
- package/icon.svg +5 -0
- package/lib/client.js +9 -8
- package/locale/en.json +7 -0
- package/locale/zh.json +7 -0
- package/package.json +69 -65
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 状态说明:当前版本 bug 较多,正在重做中(2026-11-13)
|
|
4
|
+
|
|
5
|
+
- 0.2.x 阶段的播放、拖动 seek、频谱/音准读数仍有多处已知缺陷,功能与接口可能大幅变动。
|
|
6
|
+
- 本仓库保持公开以便反馈,但**不建议在关键任务上依赖**;重做完成后会以新版本号发布。
|
|
7
|
+
|
|
8
|
+
## 0.2.5 (2026-11-13)
|
|
9
|
+
|
|
10
|
+
- 状态标注:README、package.json description 与 locale/*.json 的 meta.description 明确写出「当前 0.2.x 版本 bug 较多,正在重做中」,避免用户误以为这是稳定版。
|
|
11
|
+
- 修正 lib/client.js 的 VERSION(此前一直停在 0.2.0,与 package.json 不一致)。
|
|
12
|
+
- 补 icon.svg + exports 的 ./icon 与 ./locale/*.json + files 收录,符合官方 dsh-doc 图标与 locale 规范。
|
|
13
|
+
- 功能代码未改动,已知缺陷仍在。
|
|
14
|
+
|
|
3
15
|
## 0.2.4 (2026-11-12) — 播放器页签行新增 ⟳ 检查更新
|
|
4
16
|
|
|
5
17
|
- 播放器面板页签行(本地库 / 系统配置 …)右侧新增 ⟳:查 npm 最新版 → 有新版变蓝「更新到 vX」→ 再点一键安装到 desktop profile。
|
package/README.md
CHANGED
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
**适配 DSH 内核 0.2.2-rc.1。**
|
|
6
6
|
|
|
7
|
+
> ⚠️ **当前状态:本版本(0.2.x)bug 较多,正在重做中。** 播放、进度条拖动、频谱等功能的稳定性尚不完整,建议先不要把关键任务依赖它;新版完成前功能与接口都可能有变动。
|
|
8
|
+
> ⚠️ **Status: the current 0.2.x build has a number of known bugs and is being reworked.** Playback, seeking and spectrum stability are not complete yet;
|
|
9
|
+
> avoid depending on it for critical work until the rework ships.
|
|
10
|
+
|
|
11
|
+
|
|
7
12
|
- 版本:0.2.0(首个正式发布版本)
|
|
8
13
|
- 依赖:`dsh-better-sidebar`(提供 `ctx.betterSidebar` 文件查看器注册服务)
|
|
9
14
|
|
package/icon.svg
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36" width="36" height="36" role="img" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round">
|
|
2
|
+
<rect x="4.5" y="6.5" width="27" height="23" rx="2.5"/>
|
|
3
|
+
<path d="M13.5 6.5v23"/>
|
|
4
|
+
<path d="M20.5 14l6.5 4.2-6.5 4.2z" fill="currentColor" stroke="none"/>
|
|
5
|
+
</svg>
|
package/lib/client.js
CHANGED
|
@@ -55,7 +55,7 @@ window.__ModuleLoader__.load({
|
|
|
55
55
|
*
|
|
56
56
|
* 锚点 A:`var h = react.createElement;`
|
|
57
57
|
* → 在它**后面**粘贴本文件的全部内容(不含末尾的 module.exports 也无害)。
|
|
58
|
-
* 锚点 B:变量声明区 `var VERSION = "0.2.
|
|
58
|
+
* 锚点 B:变量声明区 `var VERSION = "0.2.5";`
|
|
59
59
|
* → 紧接着加一行:`var Turntable = makeTurntable(react);`
|
|
60
60
|
* 锚点 C:封面卡片里的图标块 —— 在函数中查找
|
|
61
61
|
* `key: "ico"` 且 `width: "44px", height: "44px"` 的那个 div
|
|
@@ -4986,7 +4986,7 @@ window.__ModuleLoader__.load({
|
|
|
4986
4986
|
'.dsh-music-bar-hide:hover { color: var(--dsw-alias-label-primary, #e6e6e6); }\n' +
|
|
4987
4987
|
// 收起态:只留「音符 + 歌名」,其余全隐(频谱/歌词/控件/进度/时间/徽章)
|
|
4988
4988
|
'.dsh-music-bar-wrap.collapsed .dsh-music-bar-lyric, .dsh-music-bar-wrap.collapsed .dsh-music-bar-viz, .dsh-music-bar-wrap.collapsed .dsh-music-bar-controls, .dsh-music-bar-wrap.collapsed .dsh-music-bar-hotspot, .dsh-music-bar-wrap.collapsed .smp-music-bar-progress-hit, .dsh-music-bar-wrap.collapsed .dsh-music-bar-time, .dsh-music-bar-wrap.collapsed .smp-music-bar-badge { display: none !important; }\n' +
|
|
4989
|
-
'.dsh-music-bar { box-sizing: border-box; display: flex; align-items: center; gap: 8px; width: 100%; max-width:
|
|
4989
|
+
'.dsh-music-bar { box-sizing: border-box; display: flex; align-items: center; gap: 8px; width: 100%; max-width: none; margin: 0 auto; flex-wrap: nowrap; padding: 4px 300px 4px 10px; font-size: 12px; color: var(--dsw-alias-label-secondary, #8a8f98); background: var(--dsw-alias-bg-layer-1, rgba(0,0,0,0.04)); border: 1px solid var(--dsw-alias-border-l1, rgba(128,128,128,0.2)); border-radius: 8px; cursor: default; user-select: none; position: relative; overflow: visible; transition: opacity 0.3s ease; }\n' +
|
|
4990
4990
|
// ---- 显示位置:页面底部(.bottom)----
|
|
4991
4991
|
// 固定条贴在窗口底边:left/width 由 useColumnMetrics 内联给出(对齐会话列宽),
|
|
4992
4992
|
// bottom 固定为 0,所以这里只负责「固定 + 悬浮层级 + 外壳配色」。z-index 900:在
|
|
@@ -5012,7 +5012,7 @@ window.__ModuleLoader__.load({
|
|
|
5012
5012
|
// 整条可拖动:cursor: grab 提示可拖;交互控件(button 等)不参与拖动。
|
|
5013
5013
|
'.dsh-music-bar-wrap.float { position: fixed; z-index: 900; padding: 0; width: auto; pointer-events: auto; right: ' + BAR_FLOAT_EDGE + 'px; bottom: ' + BAR_FLOAT_EDGE + 'px; }\n' +
|
|
5014
5014
|
// 同上:背景/阴影只在「没关闭背景显示」时给,否则会压掉 `.dsh-music-bar.bare`。
|
|
5015
|
-
'.dsh-music-bar-wrap.float .dsh-music-bar { width: ' + BAR_FLOAT_W + 'px; max-width: none; margin: 0; flex-wrap: wrap; row-gap: 2px; border-radius: 12px; cursor: grab; }\n' +
|
|
5015
|
+
'.dsh-music-bar-wrap.float .dsh-music-bar { width: ' + BAR_FLOAT_W + 'px; max-width: none; margin: 0; flex-wrap: wrap; row-gap: 2px; border-radius: 12px; cursor: grab; padding-right: 10px; }\n' +
|
|
5016
5016
|
'.dsh-music-bar-wrap.float .dsh-music-bar:not(.bare) { background: var(--dsw-alias-bg-overlay, #1e1f22); box-shadow: 0 12px 32px rgba(0,0,0,0.35); }\n' +
|
|
5017
5017
|
// 三行固定:① 歌词独占整行(第一行)② 名称 + 频谱 ③ 控件(时长靠左、按钮靠右)。
|
|
5018
5018
|
// 歌词之所以单独占一行:和歌名挤同一行时,歌名(含歌手/音质徽章)会把它压到只剩一小截,
|
|
@@ -5028,7 +5028,7 @@ window.__ModuleLoader__.load({
|
|
|
5028
5028
|
'.dsh-music-bar-wrap.float .dsh-music-bar-name { order: 1; flex: 0 1 auto; min-width: 0; max-width: calc(100% - 72px); }\n' +
|
|
5029
5029
|
'.dsh-music-bar-wrap.float .dsh-music-viz { order: 2; flex: none; }\n' +
|
|
5030
5030
|
'.dsh-music-bar-wrap.float .dsh-music-bar-lyric-empty { display: flex; align-items: center; justify-content: center; }\n' +
|
|
5031
|
-
'.dsh-music-bar-wrap.float .dsh-music-bar-controls { order:
|
|
5031
|
+
'.dsh-music-bar-wrap.float .dsh-music-bar-controls { position: static; transform: none; order: 0; flex: 0 0 auto; margin-left: auto; }\n' +
|
|
5032
5032
|
'.dsh-music-bar-wrap.float .dsh-music-bar-time, .dsh-music-bar-wrap.float .dsh-music-bar-live { margin-right: auto; }\n' +
|
|
5033
5033
|
'.dsh-music-bar-wrap.float .dsh-music-bar-hotspot { display: none; }\n' +
|
|
5034
5034
|
'.dsh-music-bar-wrap.float .dsh-music-bar-progress { border-radius: 0 0 12px 12px; }\n' +
|
|
@@ -5151,7 +5151,7 @@ window.__ModuleLoader__.load({
|
|
|
5151
5151
|
// 歌词/字幕。右端触发由绝对定位的 .dsh-music-bar-hotspot 承接(不占流),
|
|
5152
5152
|
// 鼠标移入右端区域才触发按钮组滑入/滑出,整个播放条其它区域不再触发。
|
|
5153
5153
|
// position:relative + z-index:2 让按钮组盖在热区之上,保持可点击。
|
|
5154
|
-
'.dsh-music-bar-controls { position:
|
|
5154
|
+
'.dsh-music-bar-controls { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); z-index: 3; display: inline-flex; align-items: center; gap: 8px; flex: none; min-width: 0; }\n' +
|
|
5155
5155
|
// 右端热区:绝对定位覆盖播放条右端一段区域(不占 flex 宽度 → 不挤压歌词/字幕),
|
|
5156
5156
|
// 承接鼠标移入触发按钮组滑出。z-index:1 低于按钮组(z-index:2),不挡按钮点击。
|
|
5157
5157
|
'.dsh-music-bar-hotspot { position: absolute; top: 0; bottom: 0; right: 0; width: 100px; z-index: 1; }\n' +
|
|
@@ -5159,8 +5159,8 @@ window.__ModuleLoader__.load({
|
|
|
5159
5159
|
// 从右向左滑入展开(translateX + opacity)。折叠时时长与按钮一并隐藏(闲置态)。
|
|
5160
5160
|
// overflow:hidden 只用于裁剪左右滑动的按钮;三个向上弹出的弹层(音量/模式/
|
|
5161
5161
|
// 章节目录)已改为 portal 渲染到 body,不受此裁剪影响。
|
|
5162
|
-
'.dsh-music-bar-btns { display: inline-flex; align-items: center; gap: 8px;
|
|
5163
|
-
'.dsh-music-bar-controls.on .dsh-music-bar-btns { max-width:
|
|
5162
|
+
'.dsh-music-bar-btns { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; flex-shrink: 0; min-width: max-content; overflow: visible; max-width: none; opacity: 1; transform: none; white-space: nowrap; }\n' +
|
|
5163
|
+
'.dsh-music-bar-controls.on .dsh-music-bar-btns { max-width: none; opacity: 1; transform: none; }\n' +
|
|
5164
5164
|
'.dsh-music-bar-buffering { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; color: var(--dsw-alias-label-secondary, #8a8f98); font-size: 11px; }\n' +
|
|
5165
5165
|
'.dsh-music-spinner { width: 12px; height: 12px; border: 2px solid var(--dsw-alias-bg-layer-2, rgba(255,255,255,0.2)); border-top-color: var(--dsh-music-accent, #2f9e6e); border-radius: 50%; animation: dsh-music-spin 0.8s linear infinite; flex: none; }\n' +
|
|
5166
5166
|
'@keyframes dsh-music-spin { to { transform: rotate(360deg); } }\n' +
|
|
@@ -5679,7 +5679,8 @@ window.__ModuleLoader__.load({
|
|
|
5679
5679
|
// 条高 34 → 46(2026-11-11 用户要求)。**不改 A-5 原文**,只在它后面追加同特异性覆盖:
|
|
5680
5680
|
// 注入顺序是 SMP_REF_CSS + "\n" + DOCK_CSS,同特异性下后者胜。
|
|
5681
5681
|
// 46 = 6(padTop) + 30(封面/频谱上限) + 6(padBottom) + 2(上下边框) + 2(余量)。
|
|
5682
|
-
".dsh-music-bar { min-height: 46px; padding: 6px 12px; font-size: 13px; }",
|
|
5682
|
+
".dsh-music-bar { min-height: 46px; padding: 6px 300px 6px 12px; font-size: 13px; }",
|
|
5683
|
+
".dsh-music-bar-wrap.float .dsh-music-bar { padding: 6px 12px; }",
|
|
5683
5684
|
".smp-music-bar-cover, .smp-music-bar-cover-ph { width: 30px; height: 30px; }",
|
|
5684
5685
|
".smp-music-bar-cover-ph { font-size: 13px; }",
|
|
5685
5686
|
".smp-music-bar-progress-hit { position: absolute; left: 0; right: 0; bottom: 0; height: 13px; z-index: 3; cursor: pointer; touch-action: none; pointer-events: auto; }",
|
package/locale/en.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-sidebar-media-player",
|
|
3
|
+
"meta": {
|
|
4
|
+
"title": "Sidebar media player",
|
|
5
|
+
"description": "Unified audio and video viewer for the sidebar: mp4/webm/mov and mp3/wav/flac play inline with a draggable Range(206) scrubber, live spectrum and pitch readout, plus automatic same-name subtitle and lyric tracks. Note: the current 0.2.x build still has a number of known bugs and is being reworked."
|
|
6
|
+
}
|
|
7
|
+
}
|
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,65 +1,69 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-sidebar-media-player",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "Unified audio + video player for dsh-better-sidebar: one file viewer for mp4/webm/mov/m4v/ogv and mp3/wav/flac/ogg/opus/m4a/aac, with a draggable whole-track scrubber, live spectrum bars and pitch (Hz + note name), streamed from a Range(206) host route so seeking really works.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "lib/index.js",
|
|
7
|
-
"files": [
|
|
8
|
-
"lib/**",
|
|
9
|
-
"cordis.patch.yml",
|
|
10
|
-
"README.md",
|
|
11
|
-
"CHANGELOG.md",
|
|
12
|
-
"screenshots.json",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"!lib/*.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
},
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
},
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-sidebar-media-player",
|
|
3
|
+
"version": "0.2.5",
|
|
4
|
+
"description": "Unified audio + video player for dsh-better-sidebar: one file viewer for mp4/webm/mov/m4v/ogv and mp3/wav/flac/ogg/opus/m4a/aac, with a draggable whole-track scrubber, live spectrum bars and pitch (Hz + note name), streamed from a Range(206) host route so seeking really works. Note: the current 0.2.x build still has a number of known bugs and is being reworked.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"files": [
|
|
8
|
+
"lib/**",
|
|
9
|
+
"cordis.patch.yml",
|
|
10
|
+
"README.md",
|
|
11
|
+
"CHANGELOG.md",
|
|
12
|
+
"screenshots.json",
|
|
13
|
+
"icon.svg",
|
|
14
|
+
"locale/*.json",
|
|
15
|
+
"docs/screenshots/**",
|
|
16
|
+
"!lib/*.bak*",
|
|
17
|
+
"!lib/**/*.bak*",
|
|
18
|
+
"!lib/*.BROKEN*"
|
|
19
|
+
],
|
|
20
|
+
"exports": {
|
|
21
|
+
".": "./lib/index.js",
|
|
22
|
+
"./client": {
|
|
23
|
+
"default": "./lib/client.js"
|
|
24
|
+
},
|
|
25
|
+
"./package.json": "./package.json",
|
|
26
|
+
"./icon": "./icon.svg",
|
|
27
|
+
"./locale/*.json": "./locale/*.json"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"dsh",
|
|
31
|
+
"dsh-plugin",
|
|
32
|
+
"deepseek-harness",
|
|
33
|
+
"better-sidebar",
|
|
34
|
+
"media",
|
|
35
|
+
"audio",
|
|
36
|
+
"video",
|
|
37
|
+
"player",
|
|
38
|
+
"spectrum",
|
|
39
|
+
"pitch",
|
|
40
|
+
"file-viewer",
|
|
41
|
+
"range-request"
|
|
42
|
+
],
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"author": "loyalchiiina",
|
|
45
|
+
"repository": {
|
|
46
|
+
"type": "git",
|
|
47
|
+
"url": "git+https://github.com/loyalchiiina/dsh-sidebar-media-player.git"
|
|
48
|
+
},
|
|
49
|
+
"engines": {
|
|
50
|
+
"node": "^22.19.0 || >=24.0.0",
|
|
51
|
+
"dsh": ">=0.2.2-rc.1"
|
|
52
|
+
},
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
55
|
+
"@deepseek-ai/dsh": ">=0.2.2-rc.1"
|
|
56
|
+
},
|
|
57
|
+
"dsh": {
|
|
58
|
+
"bundle": {
|
|
59
|
+
"patch": "./cordis.patch.yml"
|
|
60
|
+
},
|
|
61
|
+
"client": {
|
|
62
|
+
"inject": [
|
|
63
|
+
"@deepseek-ai/dsh-client-runtime",
|
|
64
|
+
"@deepseek-ai/dsh-client-ui-slots"
|
|
65
|
+
],
|
|
66
|
+
"platform": "web"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|