v0.5.72: lower default streamer unmute volume.
Avoid blasting to max when users unmute highlight clips; keep native slider control afterward. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -9,6 +9,13 @@
|
|||||||
- 仓库重组为 `pc/`(局内识别)、`web/`(上分帝 Web)与 `shared/`(共享包)三层
|
- 仓库重组为 `pc/`(局内识别)、`web/`(上分帝 Web)与 `shared/`(共享包)三层
|
||||||
monorepo;保留脚本直跑方式,站点内容与 `SITE_VERSION` 不变。
|
monorepo;保留脚本直跑方式,站点内容与 `SITE_VERSION` 不变。
|
||||||
|
|
||||||
|
## [0.5.72] - 2026-07-29
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- 上分帝 Web「主播」取消静音后默认音量改为约 35%(不再直接开到最大);用户之后
|
||||||
|
用原生滑条调大仍生效。
|
||||||
|
|
||||||
## [0.5.71] - 2026-07-29
|
## [0.5.71] - 2026-07-29
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ from shared.paths import (
|
|||||||
|
|
||||||
from serve_relations import WEB_DIR, build_payload
|
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"
|
DEFAULT_OSS_BASE = "https://climperor.oss-cn-shanghai.aliyuncs.com"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+18
-2
@@ -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. */
|
/** Per-clip opt-in: user unmutes via native video controls only. */
|
||||||
function streamerVideoUserSoundOn(video) {
|
function streamerVideoUserSoundOn(video) {
|
||||||
return video instanceof HTMLVideoElement && video.dataset.streamerSoundOn === "1";
|
return video instanceof HTMLVideoElement && video.dataset.streamerSoundOn === "1";
|
||||||
@@ -3820,8 +3823,20 @@ function bindStreamerVideoSoundToggle(video) {
|
|||||||
if (!(video instanceof HTMLVideoElement) || video.dataset.streamerSoundBound) return;
|
if (!(video instanceof HTMLVideoElement) || video.dataset.streamerSoundBound) return;
|
||||||
video.dataset.streamerSoundBound = "1";
|
video.dataset.streamerSoundBound = "1";
|
||||||
video.addEventListener("volumechange", () => {
|
video.addEventListener("volumechange", () => {
|
||||||
if (video.muted) delete video.dataset.streamerSoundOn;
|
if (video.muted) {
|
||||||
else video.dataset.streamerSoundOn = "1";
|
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.
|
// Autoplay muted; user unmutes via native controls when they want sound.
|
||||||
video.muted = true;
|
video.muted = true;
|
||||||
video.setAttribute("muted", "");
|
video.setAttribute("muted", "");
|
||||||
|
video.volume = STREAMER_VIDEO_DEFAULT_VOLUME;
|
||||||
const posterSrc = streamerVideoPosterSrc(row);
|
const posterSrc = streamerVideoPosterSrc(row);
|
||||||
if (posterSrc) {
|
if (posterSrc) {
|
||||||
video.poster = posterSrc;
|
video.poster = posterSrc;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* Local defaults; production export overwrites via export_relations_site.py. */
|
/* 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 ABILITY_VIDEO_BASE = "";
|
||||||
var STATIC_ASSET_BASE = "";
|
var STATIC_ASSET_BASE = "";
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<title>DOTA2 上分帝</title>
|
<title>DOTA2 上分帝</title>
|
||||||
<link rel="icon" href="/ui-icon/dota2_logo.png" type="image/png" />
|
<link rel="icon" href="/ui-icon/dota2_logo.png" type="image/png" />
|
||||||
<link rel="stylesheet" href="/style.css?v=0.5.71" />
|
<link rel="stylesheet" href="/style.css?v=0.5.72" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header class="topbar">
|
<header class="topbar">
|
||||||
@@ -149,8 +149,8 @@
|
|||||||
|
|
||||||
<section class="detail" id="detail" aria-live="polite"></section>
|
<section class="detail" id="detail" aria-live="polite"></section>
|
||||||
|
|
||||||
<script src="/config.js?v=0.5.71"></script>
|
<script src="/config.js?v=0.5.72"></script>
|
||||||
<script src="/router.js?v=0.5.71"></script>
|
<script src="/router.js?v=0.5.72"></script>
|
||||||
<script src="/app.js?v=0.5.71"></script>
|
<script src="/app.js?v=0.5.72"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user