tangled
alpha
login
or
join now
stream.place
/
streamplace
74
fork
atom
Live video on the AT Protocol
74
fork
atom
overview
issues
1
pulls
pipelines
round unless dev mode is unlocked
Natalie B.
1 month ago
77b57943
2dd151ef
+8
-1
1 changed file
expand all
collapse all
unified
split
js
components
src
components
mobile-player
ui
viewer-context-menu.tsx
+8
-1
js/components/src/components/mobile-player/ui/viewer-context-menu.tsx
···
14
14
formatHandleWithAt,
15
15
useAvatars,
16
16
useLivestreamInfo,
17
17
+
useStreamplaceStore,
17
18
zero,
18
19
} from "../../..";
19
20
import { useLivestreamStore } from "../../../livestream-store";
···
58
59
const setReportModalOpen = usePlayerStore((x) => x.setReportModalOpen);
59
60
const setReportSubject = usePlayerStore((x) => x.setReportSubject);
60
61
62
62
+
const isDevModeOn = useStreamplaceStore((x) => x.danmuUnlocked);
63
63
+
61
64
const latestSegment = useLivestreamStore((x) => x.segment);
62
65
// get highest height x width rendition for video
63
66
const videoRendition = latestSegment?.video?.reduce((prev, current) => {
···
75
78
const frames = videoRendition?.framerate as
76
79
| { num: number; den: number }
77
80
| undefined;
78
78
-
const fps =
81
81
+
let fps =
79
82
frames?.num && frames?.den
80
83
? Math.round((frames.num / frames.den) * 100) / 100
81
84
: 0;
85
85
+
86
86
+
if (!isDevModeOn && latestSegment?.video?.length) {
87
87
+
fps = Math.round(fps);
88
88
+
}
82
89
83
90
const resolutionDisplay = highestLength
84
91
? `(${highestLength}p${fps > 0 ? fps : ""})`