From 2b5766c02d03f69bdd6f7a7596a7ecb4057de6fa Mon Sep 17 00:00:00 2001 From: Hugh Nimmo-Smith Date: Tue, 17 Dec 2024 08:28:53 +0000 Subject: [PATCH] Workaround horizontal scrolling --- src/RTCConnectionStats.tsx | 92 +++++++++++++++++++------------------- 1 file changed, 47 insertions(+), 45 deletions(-) diff --git a/src/RTCConnectionStats.tsx b/src/RTCConnectionStats.tsx index 7e5ba1cd..b230141d 100644 --- a/src/RTCConnectionStats.tsx +++ b/src/RTCConnectionStats.tsx @@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details. */ import { type FC } from "react"; -import { Text, Tooltip, TooltipProvider } from "@vector-im/compound-web"; +import { IconButton, Text } from "@vector-im/compound-web"; import { MicOnSolidIcon, VideoCallSolidIcon, @@ -21,54 +21,56 @@ interface Props { export const RTCConnectionStats: FC = ({ audio, video, ...rest }) => { return (
- - {audio && ( -
- - - - {"jitter" in audio && typeof audio.jitter === "number" && ( - -  {(audio.jitter * 1000).toFixed(0)}ms + {audio && ( +
+ alert(JSON.stringify(audio, null, 2))} + size="sm" + > + + + {"jitter" in audio && typeof audio.jitter === "number" && ( + +  {(audio.jitter * 1000).toFixed(0)}ms + + )} +
+ )} + {video && ( +
+ alert(JSON.stringify(video, null, 2))} + size="sm" + > + + + {video?.framesPerSecond && ( + +  {video.framesPerSecond.toFixed(0)}fps + + )} + {"jitter" in video && typeof video.jitter === "number" && ( + +  {(video.jitter * 1000).toFixed(0)}ms + + )} + {"frameHeight" in video && + typeof video.frameHeight === "number" && + "frameWidth" in video && + typeof video.frameWidth === "number" && ( + +  {video.frameWidth}x{video.frameHeight} )} -
- )} - {video && ( -
- {video && ( - - - - )} - {video?.framesPerSecond && ( - -  {video.framesPerSecond.toFixed(0)}fps + {"qualityLimitationReason" in video && + typeof video.qualityLimitationReason === "string" && + video.qualityLimitationReason !== "none" && ( + +  {video.qualityLimitationReason} )} - {"jitter" in video && typeof video.jitter === "number" && ( - -  {(video.jitter * 1000).toFixed(0)}ms - - )} - {"frameHeight" in video && - typeof video.frameHeight === "number" && - "frameWidth" in video && - typeof video.frameWidth === "number" && ( - -  {video.frameWidth}x{video.frameHeight} - - )} - {"qualityLimitationReason" in video && - typeof video.qualityLimitationReason === "string" && - video.qualityLimitationReason !== "none" && ( - -  {video.qualityLimitationReason} - - )} -
- )} - +
+ )}
); };