Address the first beta's bugs and requested changes
Startup now uses the Android iris animation, and playback can continue in a corner miniplayer while browsing (the video is drawn into a corner rectangle beneath a matching hole in the page). The player keeps the window controls, hides its chrome when the pointer leaves, and gains audio/subtitle tracks, audio sync, source bitrate and playback details in its options. Subtitles can be styled in Settings with a live preview. Categories replace Collections, the A–Z rail magnifies, descriptions expand in place, downloads can be removed in bulk, and search keeps its results while typing. Fixes scroll jank from per-card and scrolling backdrop blurs, the hidden colour wash, the cubic volume curve, loud theme music, the search focus ring, a stray nav indicator, Continue Watching previews and the TV Shows header overlap. Removes the star rating, the duplicate Settings menu entry and the server settings' Show advanced switch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
be865fa992
commit
43c168da95
35 changed files with 1771 additions and 327 deletions
|
|
@ -11,7 +11,7 @@ function fadeTo(target: number, done?: () => void) {
|
|||
if (fade) clearInterval(fade);
|
||||
const a = audio;
|
||||
fade = setInterval(() => {
|
||||
const step = 0.02;
|
||||
const step = Math.max(0.002, target / 25, a.volume / 25);
|
||||
if (Math.abs(a.volume - target) <= step) {
|
||||
a.volume = target;
|
||||
clearInterval(fade!);
|
||||
|
|
@ -21,17 +21,27 @@ function fadeTo(target: number, done?: () => void) {
|
|||
}, 40);
|
||||
}
|
||||
|
||||
/**
|
||||
* Theme songs are mastered far louder than a film's dialogue, so the setting
|
||||
* follows a square law and scales with the player's own volume: the default
|
||||
* 30% sits around -21 dB, under the show it introduces.
|
||||
*/
|
||||
function themeGain() {
|
||||
const { themeVolume, volume } = useSettings.getState();
|
||||
return Math.pow(themeVolume / 100, 2) * Math.pow(Math.min(100, volume) / 100, 2);
|
||||
}
|
||||
|
||||
export function playThemeMusic(path: string) {
|
||||
const prefs = useSettings.getState();
|
||||
const server = useSession.getState().server;
|
||||
if (!prefs.themeMusic || !path || !server || document.documentElement.classList.contains('player-open')) return;
|
||||
if (!prefs.themeMusic || !path || !server || /player-(open|mini)/.test(document.documentElement.className)) return;
|
||||
if (path === current && audio && !audio.paused) return;
|
||||
stopThemeMusic(true);
|
||||
current = path;
|
||||
audio = new Audio(server.signed(path));
|
||||
audio.volume = 0;
|
||||
audio.loop = false;
|
||||
audio.play().then(() => fadeTo(prefs.themeVolume / 100), () => {});
|
||||
audio.play().then(() => fadeTo(themeGain()), () => {});
|
||||
}
|
||||
|
||||
export function stopThemeMusic(immediate = false) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue