Fix type
This commit is contained in:
@@ -33,7 +33,7 @@ declare global {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const useMediaStreamTrackCount = (
|
export const useMediaStreamTrackCount = (
|
||||||
stream: MediaStream
|
stream: MediaStream | null
|
||||||
): [number, number] => {
|
): [number, number] => {
|
||||||
const latestAudioTrackCount = stream ? stream.getAudioTracks().length : 0;
|
const latestAudioTrackCount = stream ? stream.getAudioTracks().length : 0;
|
||||||
const latestVideoTrackCount = stream ? stream.getVideoTracks().length : 0;
|
const latestVideoTrackCount = stream ? stream.getVideoTracks().length : 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user