Skip to content

Commit

Permalink
LocalVideoCapability の表示用 state の更新を追加する
Browse files Browse the repository at this point in the history
  • Loading branch information
tnamao committed Jun 10, 2024
1 parent 1907646 commit 9d39ccb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/components/Video/LocalVideoCapabilities.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ const useLocalVideoTrackStats = (stream: MediaStream) => {
if (selectedVideoStats.length > 0) {
setSelected(selectedVideoStats[0])
}
} else {
const selectedStats = videoStats.find(
(s) => s.outboundRtpStats.rid === selected.outboundRtpStats.rid,
)
if (selectedStats !== undefined) {
setSelected(selectedStats)
}
}
})()
}, [statsReport, stream, selected])
Expand Down

0 comments on commit 9d39ccb

Please sign in to comment.