feat(plex): honest transcode cold-start + encoder in stats (E6 S1d)
Surface the transcode session's runtime facts in the player. The session response's transcode/hw flags now thread through: the stats overlay's mode row reads "transcode · GPU" (VAAPI) or "transcode · CPU" (libx264) — the at-a-glance confirmation of which S1 path engaged — and the initial-load overlay says "Preparing stream…" instead of "Loading…" for a transcode session, since its first segment is genuinely slower than a remux and shouldn't read as a hang. fmtMode (pure, unit-tested) appends the encoder only for a transcode with a known encoder. i18n HU/EN for the new preparing label. Browser-UAT'd on the XviD fixture: mode row reads "transcode · CPU" live (software, no render node here).
This commit is contained in:
@@ -12,6 +12,7 @@ export function PlexStatsOverlay({
|
||||
videoRef,
|
||||
hlsRef,
|
||||
playable,
|
||||
hwRef,
|
||||
sessionStartRef,
|
||||
absRef,
|
||||
durationRef,
|
||||
@@ -20,6 +21,7 @@ export function PlexStatsOverlay({
|
||||
videoRef: RefObject<HTMLVideoElement | null>;
|
||||
hlsRef: RefObject<Hls | null>;
|
||||
playable: string;
|
||||
hwRef: RefObject<boolean | null>; // active transcode encoder: true=GPU, false=CPU, null=not transcode
|
||||
sessionStartRef: RefObject<number>;
|
||||
absRef: RefObject<number>;
|
||||
durationRef: RefObject<number>;
|
||||
@@ -75,6 +77,7 @@ export function PlexStatsOverlay({
|
||||
setRows(
|
||||
buildStatRows({
|
||||
playable,
|
||||
hwEncoder: hwRef.current,
|
||||
transport: hls ? "hls" : "direct",
|
||||
videoWidth: v?.videoWidth ?? 0,
|
||||
videoHeight: v?.videoHeight ?? 0,
|
||||
@@ -91,7 +94,7 @@ export function PlexStatsOverlay({
|
||||
sample();
|
||||
const iv = setInterval(sample, 1000);
|
||||
return () => clearInterval(iv);
|
||||
}, [videoRef, hlsRef, playable, sessionStartRef, absRef, durationRef]);
|
||||
}, [videoRef, hlsRef, playable, hwRef, sessionStartRef, absRef, durationRef]);
|
||||
|
||||
return (
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user