@@ -24,7 +24,7 @@ import { type MatrixRTCSession } from "matrix-js-sdk/lib/matrixrtc";
2424import classNames from "classnames" ;
2525import { BehaviorSubject , map } from "rxjs" ;
2626import { useObservable } from "observable-hooks" ;
27- import { logger } from "matrix-js-sdk/lib/logger" ;
27+ import { logger as rootLogger } from "matrix-js-sdk/lib/logger" ;
2828import {
2929 VoiceCallSolidIcon ,
3030 VolumeOnSolidIcon ,
@@ -88,6 +88,7 @@ import { ReactionsOverlay } from "./ReactionsOverlay";
8888import { CallEventAudioRenderer } from "./CallEventAudioRenderer" ;
8989import {
9090 debugTileLayout as debugTileLayoutSetting ,
91+ matrixRTCMode as matrixRTCModeSetting ,
9192 useSetting ,
9293} from "../settings/settings" ;
9394import { ReactionsReader } from "../reactions/ReactionsReader" ;
@@ -109,6 +110,8 @@ import { useTrackProcessorObservable$ } from "../livekit/TrackProcessorContext.t
109110import { type Layout } from "../state/layout-types.ts" ;
110111import { ObservableScope } from "../state/ObservableScope.ts" ;
111112
113+ const logger = rootLogger . getChild ( "[InCallView]" ) ;
114+
112115const maxTapDurationMs = 400 ;
113116
114117export interface ActiveCallProps
@@ -127,6 +130,7 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
127130 const mediaDevices = useMediaDevices ( ) ;
128131 const trackProcessorState$ = useTrackProcessorObservable$ ( ) ;
129132 useEffect ( ( ) => {
133+ logger . info ( "START CALL VIEW SCOPE" ) ;
130134 const scope = new ObservableScope ( ) ;
131135 const reactionsReader = new ReactionsReader ( scope , props . rtcSession ) ;
132136 const { autoLeaveWhenOthersLeft, waitForCallPickup, sendNotificationType } =
@@ -141,6 +145,7 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
141145 encryptionSystem : props . e2eeSystem ,
142146 autoLeaveWhenOthersLeft,
143147 waitForCallPickup : waitForCallPickup && sendNotificationType === "ring" ,
148+ matrixRTCMode$ : matrixRTCModeSetting . value$ ,
144149 } ,
145150 reactionsReader . raisedHands$ ,
146151 reactionsReader . reactions$ ,
@@ -151,7 +156,9 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
151156 setVm ( vm ) ;
152157
153158 vm . leave$ . pipe ( scope . bind ( ) ) . subscribe ( props . onLeft ) ;
159+
154160 return ( ) : void => {
161+ logger . info ( "END CALL VIEW SCOPE" ) ;
155162 scope . end ( ) ;
156163 } ;
157164 } , [
@@ -270,7 +277,10 @@ export const InCallView: FC<InCallViewProps> = ({
270277 const ringOverlay = useBehavior ( vm . ringOverlay$ ) ;
271278 const fatalCallError = useBehavior ( vm . fatalError$ ) ;
272279 // Stop the rendering and throw for the error boundary
273- if ( fatalCallError ) throw fatalCallError ;
280+ if ( fatalCallError ) {
281+ logger . debug ( "fatalCallError stop rendering" , fatalCallError ) ;
282+ throw fatalCallError ;
283+ }
274284
275285 // We need to set the proper timings on the animation based upon the sound length.
276286 const ringDuration = pickupPhaseAudio ?. soundDuration [ "waiting" ] ?? 1 ;
0 commit comments