diff --git a/CHANGELOG.md b/CHANGELOG.md index 8546295..8dbbf88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,13 @@ - 仓库重组为 `pc/`(局内识别)、`web/`(上分帝 Web)与 `shared/`(共享包)三层 monorepo;保留脚本直跑方式,站点内容与 `SITE_VERSION` 不变。 +## [0.5.72] - 2026-07-29 + +### Fixed + +- 上分帝 Web「主播」取消静音后默认音量改为约 35%(不再直接开到最大);用户之后 + 用原生滑条调大仍生效。 + ## [0.5.71] - 2026-07-29 ### Added diff --git a/web/export_relations_site.py b/web/export_relations_site.py index cf368e7..1ede1ec 100644 --- a/web/export_relations_site.py +++ b/web/export_relations_site.py @@ -50,7 +50,7 @@ from shared.paths import ( from serve_relations import WEB_DIR, build_payload -SITE_VERSION = "0.5.71" +SITE_VERSION = "0.5.72" DEFAULT_OSS_BASE = "https://climperor.oss-cn-shanghai.aliyuncs.com" diff --git a/web/frontend/app.js b/web/frontend/app.js index d6c724f..4f9e3c3 100644 --- a/web/frontend/app.js +++ b/web/frontend/app.js @@ -3811,6 +3811,9 @@ function pauseOtherStreamerVideos(current) { }); } +/** Comfortable default when user unmutes (native controls start at 1.0). */ +const STREAMER_VIDEO_DEFAULT_VOLUME = 0.35; + /** Per-clip opt-in: user unmutes via native video controls only. */ function streamerVideoUserSoundOn(video) { return video instanceof HTMLVideoElement && video.dataset.streamerSoundOn === "1"; @@ -3820,8 +3823,20 @@ function bindStreamerVideoSoundToggle(video) { if (!(video instanceof HTMLVideoElement) || video.dataset.streamerSoundBound) return; video.dataset.streamerSoundBound = "1"; video.addEventListener("volumechange", () => { - if (video.muted) delete video.dataset.streamerSoundOn; - else video.dataset.streamerSoundOn = "1"; + if (video.muted) { + delete video.dataset.streamerSoundOn; + return; + } + video.dataset.streamerSoundOn = "1"; + // First unmute: if still at browser max, drop to a comfortable level once. + // Later slider moves (including intentional max) are left alone. + if ( + video.dataset.streamerVolComfort !== "1" && + video.volume >= 0.98 + ) { + video.volume = STREAMER_VIDEO_DEFAULT_VOLUME; + } + video.dataset.streamerVolComfort = "1"; }); } @@ -4280,6 +4295,7 @@ function buildStreamerCard(row) { // Autoplay muted; user unmutes via native controls when they want sound. video.muted = true; video.setAttribute("muted", ""); + video.volume = STREAMER_VIDEO_DEFAULT_VOLUME; const posterSrc = streamerVideoPosterSrc(row); if (posterSrc) { video.poster = posterSrc; diff --git a/web/frontend/config.js b/web/frontend/config.js index 68053ec..c69c88f 100644 --- a/web/frontend/config.js +++ b/web/frontend/config.js @@ -1,4 +1,4 @@ /* Local defaults; production export overwrites via export_relations_site.py. */ -var SITE_VERSION = "0.5.71"; +var SITE_VERSION = "0.5.72"; var ABILITY_VIDEO_BASE = ""; var STATIC_ASSET_BASE = ""; diff --git a/web/frontend/index.html b/web/frontend/index.html index d3a0d57..e2de136 100644 --- a/web/frontend/index.html +++ b/web/frontend/index.html @@ -5,7 +5,7 @@