This commit is contained in:
David Baker 2022-10-24 18:58:55 +01:00
parent 537341da3a
commit 736aa95133

View file

@ -33,7 +33,7 @@ declare global {
}
export const useMediaStreamTrackCount = (
stream: MediaStream
stream: MediaStream | null
): [number, number] => {
const latestAudioTrackCount = stream ? stream.getAudioTracks().length : 0;
const latestVideoTrackCount = stream ? stream.getVideoTracks().length : 0;