Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update publish-alpha #3420

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions packages/roomkit-react/src/Diagnostics/ConnectivityTest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { DiagnosticsStep, useDiagnostics } from './DiagnosticsContext';

const Regions = {
in: 'India',
eu: 'Europe',
us: 'United States',
};

Expand Down Expand Up @@ -164,7 +163,7 @@ const AudioStats = ({ stats }: { stats: DiagnosticsRTCStats | undefined }) => {
<DetailedInfo title="Bitrate Sent" value={formatBytes(stats.bitrateSent, 'b/s')} />
<DetailedInfo title="Bitrate Received" value={formatBytes(stats.bitrateReceived, 'b/s')} />
<DetailedInfo title="Round Trip Time" value={`${stats.roundTripTime} ms`} />
<DetailedInfo title="Jitter" value={`${stats.jitter} s`} />
<DetailedInfo title="Jitter" value={`${stats.jitter * 1000} ms`} />
</Flex>
)}
</ConnectivityTestStepResult>
Expand All @@ -183,7 +182,7 @@ const VideoStats = ({ stats }: { stats: DiagnosticsRTCStats | undefined }) => {
<DetailedInfo title="Bitrate Sent" value={formatBytes(stats.bitrateSent, 'b/s')} />
<DetailedInfo title="Bitrate Received" value={formatBytes(stats.bitrateReceived, 'b/s')} />
<DetailedInfo title="Round Trip Time" value={`${stats.roundTripTime} ms`} />
<DetailedInfo title="Jitter" value={`${stats.jitter} s`} />
<DetailedInfo title="Jitter" value={`${stats.jitter * 1000} ms`} />
</Flex>
)}
</ConnectivityTestStepResult>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ const LocalPeerStats = () => {
return (
<Flex css={{ flexWrap: 'wrap', gap: '$10' }}>
<StatsRow label="Packets Lost" value={stats.subscribe?.packetsLost} />
<StatsRow label="Jitter" value={stats.subscribe?.jitter} />
<StatsRow label="Jitter" value={`${((stats.subscribe?.jitter ?? 0) * 1000).toFixed(2)} ms`} />
<StatsRow label="Publish Bitrate" value={formatBytes(stats.publish?.bitrate, 'b/s')} />
<StatsRow label="Subscribe Bitrate" value={formatBytes(stats.subscribe?.bitrate, 'b/s')} />
<StatsRow
Expand Down Expand Up @@ -316,7 +316,7 @@ const TrackStats = ({ trackID, layer, local }) => {
<StatsRow label="Type" value={stats.type + ' ' + stats.kind} />
<StatsRow label="Bitrate" value={formatBytes(stats.bitrate, 'b/s')} />
<StatsRow label="Packets Lost" value={stats.packetsLost} />
<StatsRow label="Jitter" value={stats.jitter?.toFixed(3)} />
<StatsRow label="Jitter" value={`${((stats.subscribe?.jitter ?? 0) * 1000).toFixed(2)} ms`} />
<StatsRow
label={inbound ? 'Bytes Received' : 'Bytes Sent'}
value={formatBytes(inbound ? stats.bytesReceived : stats.bytesSent)}
Expand Down
13 changes: 11 additions & 2 deletions packages/roomkit-react/src/Stats/Stats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,21 @@ const PacketLostAndJitter = ({
const isLocalPeer = audioTrackStats?.type.includes('outbound') || videoTrackStats?.type.includes('outbound');
const audioStats = isLocalPeer ? audioTrackStats?.remote : audioTrackStats;
const videoStats = isLocalPeer ? videoTrackStats?.remote : videoTrackStats;

return (
<>
<TrackPacketsLostRow label="Packet Loss(V)" stats={videoStats} />
<TrackPacketsLostRow label="Packet Loss(A)" stats={audioStats} />
<StatsRow show={isNotNullish(videoStats?.jitter)} label="Jitter(V)" value={videoStats?.jitter?.toFixed(4)} />
<StatsRow show={isNotNullish(audioStats?.jitter)} label="Jitter(A)" value={audioStats?.jitter?.toFixed(4)} />
<StatsRow
show={isNotNullish(videoStats?.jitter)}
label="Jitter(V)"
value={`${((videoStats?.jitter ?? 0) * 1000).toFixed(2)} ms`}
/>
<StatsRow
show={isNotNullish(audioStats?.jitter)}
label="Jitter(A)"
value={`${((audioStats?.jitter ?? 0) * 1000).toFixed(2)} ms`}
/>
</>
);
};
Expand Down
Loading