Player: quick chat box, danmaku notifications, the player panel, smooth subtitle lift
- Quick chat (Enter in the full player, whatever plays): a box at the bottom centre in the control bar's place, compact and widening with the text, sharing its draft with the chat panel; Enter sends, Esc or an empty Enter closes, it closes by itself after 8 s without typing (the draft stays). Keys go to it; the Enter that opened it no longer reaches a focused button. Typing never shows the cursor or the controls: the frame wakes only on real mouse movement and holds the controls hidden while the box or its echo is up. Your sent line shows as an echo (or flies as your own danmaku line); your own chat toast is not repeated. - Subtitle lift: always for the box, for the control bar as a setting (off); 4 eased-out sub-pos steps 42 ms apart instead of one per frame. - Notifications: Toasts / Danmaku (off by default): chat and short notices fly over the full player, problems stay toasts; every knob of the look plus boldness, persisted, with a live preview strip in Settings. - Player panel: ⚙ → Player settings docks a foldable glass panel at the right (tracks, subtitle size and lift, picture, volume, notifications, controls) in place of the card; Esc closes it. - Danmaku preview: the mock dialogue follows the lift; the stand-in page has the chat box too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6048fbe7d1
commit
69fae18fdc
29 files changed
+2755
-581
No files matched your search
+22
-47
@@ -85,52 +85,24 @@ video for subtitle placement and sharpness (default
|
||||
|
||||
Test builds and runs from source (a version with `-dev`) and debug runs
|
||||
(`devTools`, `screens/home/ui.dart`) get Settings → About → Developer;
|
||||
releases never show it. What is there is an experiment to look at, not
|
||||
a decided feature:
|
||||
releases never show it:
|
||||
|
||||
- **Danmaku preview** (`lib/src/danmaku/`): chat lines and short notices
|
||||
(joins, leaves, Up next adds, "starting now") flying right to left
|
||||
across the upper part of the picture. `DanmakuLayer` is the reusable
|
||||
widget: lanes in a band of the height (`DanmakuStyle.bandTop` /
|
||||
`bandBottom`, default 10 to 45 %, under top signs, never down into the
|
||||
dialogue); each line takes the topmost free lane (`DanmakuLanes`, pure:
|
||||
the last line in a lane must have fully entered with a gap, and the
|
||||
new one, at its own speed, cannot catch it before it leaves); at most
|
||||
`maxOnScreen` fly, the rest wait in order (dropped after 15 s, 60 at
|
||||
most); every line crosses in `crossSecs`, so long ones move faster;
|
||||
white text with a dark outline and no box, the sender's avatar
|
||||
(`StatusAvatar`: picture, else initial) and coloured name first, the
|
||||
app's own notices without one, own lines in an accent frame; the
|
||||
layer's own clock, so lines fly on while paused. Each line is a widget
|
||||
moved by a `Flow`: per frame only paint runs. The button opens it over
|
||||
the full player when one is up (under the controls; the panel top
|
||||
right holds them up), else on a page with a moving stand-in picture
|
||||
and a mock control bar of the skin in use. The panel (`DanmakuPanel`)
|
||||
fires samples (chat, own, join, leave, Up next, starting, a burst), a
|
||||
random stream (Poisson arrivals at a rate, short to long lines, CJK
|
||||
and emoji; in a session half the senders are the party's real
|
||||
members), this session's own chat and notice toasts, and every
|
||||
`DanmakuStyle` knob live (crossing time, cap, lane band, opacity,
|
||||
size, outline, avatars, own frame), plus mock subtitles (a top sign
|
||||
and bottom dialogue). Tests: `danmaku_test`.
|
||||
- **Lift subtitles above the chat line and controls**
|
||||
(`AppSettings.liftSubtitles`, off): Enter in the full player opens a
|
||||
stand-in for the planned chat line (a one-line box at the bottom in
|
||||
place of the control bar; Enter sends to the chat, Esc closes). While
|
||||
it is open, or the control bar is up, bottom subtitles move above it
|
||||
and back down when it goes (`SubtitleLifter`, `video_view.dart`): mpv
|
||||
`sub-pos`, animated over the shell's 320 ms curve in 0.1 steps, only as
|
||||
far as the letterbox under the picture leaves no room
|
||||
(`subtitleLiftPos`). What each mpv property does, on
|
||||
`make_sub_test.sh`'s file (mpv 0.41, libmpv as the app uses it):
|
||||
`sub-pos` moves bottom ASS dialogue and SRT lines up and leaves `\an8`
|
||||
signs in place (with `sub-ass-override` at its default `scale` or
|
||||
`yes`; `no` ignores it for ASS); `sub-margin-y` moves SRT only (ASS
|
||||
only with `sub-ass-override=force`, which restyles every line, signs
|
||||
too); `sub-ass-style-overrides=MarginV=...` moves top signs down as
|
||||
well; `video-margin-ratio-bottom` shrinks and moves the picture
|
||||
itself (with `sub-ass-force-margins` the dialogue goes into the new
|
||||
black band).
|
||||
- **Danmaku preview** (`danmaku/danmaku_preview.dart`): the danmaku layer
|
||||
of "Notifications: Danmaku" (ARCHITECTURE "Danmaku notifications") to
|
||||
play with, starting from your own look; its knobs change only the
|
||||
preview. The button opens it over the full player when one is up
|
||||
(under the controls; the panel top right holds them up), else on a
|
||||
page with a moving stand-in picture and a mock control bar of the skin
|
||||
in use. The panel (`DanmakuPanel`) fires samples (chat, own, join,
|
||||
leave, Up next, starting, a burst), a random stream (Poisson arrivals
|
||||
at a rate, short to long lines, CJK and emoji; in a session half the
|
||||
senders are the party's real members), this session's own chat and
|
||||
notice toasts (mapped as the real feature maps them), every
|
||||
`DanmakuStyle` knob, and mock subtitles (a top sign and bottom
|
||||
dialogue). The mock dialogue moves with the subtitle lift's steps as
|
||||
the real subtitles do: over the player when the quick chat box opens,
|
||||
and on the stand-in page, which has its own quick chat box (Enter;
|
||||
what you send flies as your own line). Tests: `danmaku_test`.
|
||||
|
||||
## Tests
|
||||
|
||||
@@ -168,8 +140,11 @@ Three suites, run from each package's folder:
|
||||
the "Waiting for" status (`media_plan_test`), watch tracking and the
|
||||
device history (`watch_tracker_test`), what continues a file of a
|
||||
local show (`queue_logic_test`), the video view's output size and
|
||||
subtitle lift and the dev-tools gate (`video_view_test`), danmaku lanes
|
||||
(`danmaku_test`)), `singletons_test` (the `.instance` count, see
|
||||
subtitle lift steps and the dev-tools gate (`video_view_test`), danmaku
|
||||
lanes, style, the toasts that fly and an idle layer
|
||||
(`danmaku_test`), the quick chat box over the player (`quick_chat_test`),
|
||||
the player panel and the danmaku settings card (`player_settings_test`)),
|
||||
`singletons_test` (the `.instance` count, see
|
||||
ARCHITECTURE "Composition root"; lower its baseline when a use goes) and the real-mpv `*_e2e`
|
||||
tests plus `coord_presence`. The whole suite takes a couple of minutes;
|
||||
run it only before a restructure step lands, otherwise only the files
|
||||
|
||||
Reference in new issue
Block a user