mirror of https://github.com/jetkvm/kvm.git
feat: Dont collect stats without a video track
This commit is contained in:
parent
6b37cf8e3f
commit
379a794bd7
|
@ -29,6 +29,10 @@ export default function ConnectionStatsSidebar() {
|
|||
useInterval(function collectWebRTCStats() {
|
||||
(async () => {
|
||||
if (!mediaStream) return;
|
||||
|
||||
const videoTrack = mediaStream.getVideoTracks()[0];
|
||||
if (!videoTrack) return;
|
||||
|
||||
const stats = await peerConnection?.getStats();
|
||||
let successfulLocalCandidateId: string | null = null;
|
||||
let successfulRemoteCandidateId: string | null = null;
|
||||
|
|
Loading…
Reference in New Issue