-
Notifications
You must be signed in to change notification settings - Fork 136
Unify LiveKit and Matrix connection states #3611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
2e646bf
Unify LiveKit and Matrix connection states
toger5 88721be
cleanup
toger5 7c40b0e
ideas
toger5 bf80136
cleanup and tests
toger5 7af89b4
fix lint
toger5 0ebc607
Update LocalMember.ts
toger5 ef2f53c
Merge branch 'livekit' into toger5/connection-state-refactor
toger5 6efce23
fix playwright tests
toger5 1941fc9
fix tests.
toger5 667a3d0
fix test not checking for livekit connection state anymore.
toger5 b380532
lots of error logging and fixing playwright
toger5 8dac036
fix lints
toger5 e626698
fix connection tests
toger5 aabd760
fix lint
toger5 170a38c
fix playwright incompatible browser toast
toger5 328cc71
update playwright so that we do not even need the dismiss anymore.
toger5 08306d6
remove duplicated connecting state and update Test setup
toger5 9a7e797
fix lint
toger5 207b161
fix logger and dismiss button presses
toger5 8225e4f
remove page.pause
toger5 7edc97b
remove continue button things
toger5 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,7 @@ import { type MatrixRTCSession } from "matrix-js-sdk/lib/matrixrtc"; | |
| import classNames from "classnames"; | ||
| import { BehaviorSubject, map } from "rxjs"; | ||
| import { useObservable } from "observable-hooks"; | ||
| import { logger } from "matrix-js-sdk/lib/logger"; | ||
| import { logger as rootLogger } from "matrix-js-sdk/lib/logger"; | ||
| import { | ||
| VoiceCallSolidIcon, | ||
| VolumeOnSolidIcon, | ||
|
|
@@ -109,6 +109,8 @@ import { useTrackProcessorObservable$ } from "../livekit/TrackProcessorContext.t | |
| import { type Layout } from "../state/layout-types.ts"; | ||
| import { ObservableScope } from "../state/ObservableScope.ts"; | ||
|
|
||
| const logger = rootLogger.getChild("[InCallView]"); | ||
|
|
||
| const maxTapDurationMs = 400; | ||
|
|
||
| export interface ActiveCallProps | ||
|
|
@@ -127,6 +129,7 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => { | |
| const mediaDevices = useMediaDevices(); | ||
| const trackProcessorState$ = useTrackProcessorObservable$(); | ||
| useEffect(() => { | ||
| logger.info("START CALL VIEW SCOPE"); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add some prefix to the log until we have proper prefixed logger?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added a proper logger. |
||
| const scope = new ObservableScope(); | ||
| const reactionsReader = new ReactionsReader(scope, props.rtcSession); | ||
| const { autoLeaveWhenOthersLeft, waitForCallPickup, sendNotificationType } = | ||
|
|
@@ -151,7 +154,9 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => { | |
| setVm(vm); | ||
|
|
||
| vm.leave$.pipe(scope.bind()).subscribe(props.onLeft); | ||
|
|
||
| return (): void => { | ||
| logger.info("END CALL VIEW SCOPE"); | ||
| scope.end(); | ||
| }; | ||
| }, [ | ||
|
|
@@ -270,7 +275,10 @@ export const InCallView: FC<InCallViewProps> = ({ | |
| const ringOverlay = useBehavior(vm.ringOverlay$); | ||
| const fatalCallError = useBehavior(vm.fatalError$); | ||
| // Stop the rendering and throw for the error boundary | ||
| if (fatalCallError) throw fatalCallError; | ||
| if (fatalCallError) { | ||
| logger.debug("fatalCallError stop rendering", fatalCallError); | ||
| throw fatalCallError; | ||
| } | ||
|
|
||
| // We need to set the proper timings on the animation based upon the sound length. | ||
| const ringDuration = pickupPhaseAudio?.soundDuration["waiting"] ?? 1; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add more test to be sure that we really dismiss the popup we think we dismiss (check the title)?
This is fixed by updating playwright, right? is it really needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It helps us save time if we are slow with merging renovate and need to debug why our test fail.