@@ -88,8 +88,8 @@ type SessionStateConnecting = SessionStateCommon & {
8888 isConnected : false ;
8989
9090 local : {
91- cameraTrack : null ;
92- microphoneTrack : null ;
91+ cameraTrack : undefined ;
92+ microphoneTrack : undefined ;
9393 } ;
9494} ;
9595
@@ -101,8 +101,8 @@ type SessionStateConnected = SessionStateCommon & {
101101 isConnected : true ;
102102
103103 local : {
104- cameraTrack : TrackReference | null ;
105- microphoneTrack : TrackReference | null ;
104+ cameraTrack ? : TrackReference ;
105+ microphoneTrack ? : TrackReference ;
106106 } ;
107107} ;
108108
@@ -111,8 +111,8 @@ type SessionStateDisconnected = SessionStateCommon & {
111111 isConnected : false ;
112112
113113 local : {
114- cameraTrack : null ;
115- microphoneTrack : null ;
114+ cameraTrack : undefined ;
115+ microphoneTrack : undefined ;
116116 } ;
117117} ;
118118
@@ -367,8 +367,8 @@ export function useSession(
367367 const { localParticipant } = useLocalParticipant ( { room } ) ;
368368 const cameraPublication = localParticipant . getTrackPublication ( Track . Source . Camera ) ;
369369 const localCamera = React . useMemo ( ( ) => {
370- if ( ! cameraPublication || cameraPublication . isMuted ) {
371- return null ;
370+ if ( ! cameraPublication ) {
371+ return undefined ;
372372 }
373373 return {
374374 source : Track . Source . Camera ,
@@ -378,8 +378,8 @@ export function useSession(
378378 } , [ localParticipant , cameraPublication , cameraPublication ?. isMuted ] ) ;
379379 const microphonePublication = localParticipant . getTrackPublication ( Track . Source . Microphone ) ;
380380 const localMicrophone = React . useMemo ( ( ) => {
381- if ( ! microphonePublication || microphonePublication . isMuted ) {
382- return null ;
381+ if ( ! microphonePublication ) {
382+ return undefined ;
383383 }
384384 return {
385385 source : Track . Source . Microphone ,
@@ -441,8 +441,8 @@ export function useSession(
441441 ...generateDerivedConnectionStateValues ( ConnectionState . Connecting ) ,
442442
443443 local : {
444- cameraTrack : null ,
445- microphoneTrack : null ,
444+ cameraTrack : undefined ,
445+ microphoneTrack : undefined ,
446446 } ,
447447 } ;
448448
@@ -469,8 +469,8 @@ export function useSession(
469469 ...generateDerivedConnectionStateValues ( ConnectionState . Disconnected ) ,
470470
471471 local : {
472- cameraTrack : null ,
473- microphoneTrack : null ,
472+ cameraTrack : undefined ,
473+ microphoneTrack : undefined ,
474474 } ,
475475 } ;
476476 }
0 commit comments