Live video on the AT Protocol

round unless dev mode is unlocked

+8 -1
+8 -1
js/components/src/components/mobile-player/ui/viewer-context-menu.tsx
··· 14 14 formatHandleWithAt, 15 15 useAvatars, 16 16 useLivestreamInfo, 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 + const isDevModeOn = useStreamplaceStore((x) => x.danmuUnlocked); 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 - const fps = 81 + let fps = 79 82 frames?.num && frames?.den 80 83 ? Math.round((frames.num / frames.den) * 100) / 100 81 84 : 0; 85 + 86 + if (!isDevModeOn && latestSegment?.video?.length) { 87 + fps = Math.round(fps); 88 + } 82 89 83 90 const resolutionDisplay = highestLength 84 91 ? `(${highestLength}p${fps > 0 ? fps : ""})`