remove all /*PUBLIC*/

This commit is contained in:
Timo K
2025-11-17 14:39:24 +01:00
parent e9f400e9f1
commit 4414fe3c82

View File

@@ -469,10 +469,10 @@ export class CallViewModel {
// down, for example, and we want to avoid making people worry that the app is // down, for example, and we want to avoid making people worry that the app is
// in a split-brained state. // in a split-brained state.
// DISCUSSION own membership manager ALSO this probably can be simplifis // DISCUSSION own membership manager ALSO this probably can be simplifis
/*PUBLIC*/ const reconnecting$ = localMembership.reconnecting$; const reconnecting$ = localMembership.reconnecting$;
const pretendToBeDisconnected$ = reconnecting$; const pretendToBeDisconnected$ = reconnecting$;
/*PUBLIC*/ const audioParticipants$ = scope.behavior( const audioParticipants$ = scope.behavior(
matrixLivekitMembers$.pipe( matrixLivekitMembers$.pipe(
switchMap((membersWithEpoch) => { switchMap((membersWithEpoch) => {
const members = membersWithEpoch.value; const members = membersWithEpoch.value;
@@ -518,11 +518,11 @@ export class CallViewModel {
[], [],
); );
/*PUBLIC*/ const handsRaised$ = scope.behavior( const handsRaised$ = scope.behavior(
handsRaisedSubject$.pipe(pauseWhen(pretendToBeDisconnected$)), handsRaisedSubject$.pipe(pauseWhen(pretendToBeDisconnected$)),
); );
/*PUBLIC*/ const reactions$ = scope.behavior( const reactions$ = scope.behavior(
reactionsSubject$.pipe( reactionsSubject$.pipe(
map((v) => map((v) =>
Object.fromEntries( Object.fromEntries(
@@ -663,7 +663,7 @@ export class CallViewModel {
), ),
); );
/*PUBLIC*/ const joinSoundEffect$ = userMedia$.pipe( const joinSoundEffect$ = userMedia$.pipe(
pairwise(), pairwise(),
filter( filter(
([prev, current]) => ([prev, current]) =>
@@ -681,16 +681,16 @@ export class CallViewModel {
* - There can be multiple participants for one Matrix user if they join from * - There can be multiple participants for one Matrix user if they join from
* multiple devices. * multiple devices.
*/ */
/*PUBLIC*/ const participantCount$ = scope.behavior( const participantCount$ = scope.behavior(
matrixLivekitMembers$.pipe(map((ms) => ms.value.length)), matrixLivekitMembers$.pipe(map((ms) => ms.value.length)),
); );
// only public to expose to the view. // only public to expose to the view.
// TODO if we are in "unknown" state we need a loading rendering (or empty screen) // TODO if we are in "unknown" state we need a loading rendering (or empty screen)
// Otherwise it looks like we already connected and only than the ringing starts which is weird. // Otherwise it looks like we already connected and only than the ringing starts which is weird.
/*PUBLIC*/ const callPickupState$ = callLifecycle.callPickupState$; const callPickupState$ = callLifecycle.callPickupState$;
/*PUBLIC*/ const leaveSoundEffect$ = combineLatest([ const leaveSoundEffect$ = combineLatest([
callLifecycle.callPickupState$, callLifecycle.callPickupState$,
userMedia$, userMedia$,
]).pipe( ]).pipe(
@@ -871,14 +871,14 @@ export class CallViewModel {
/** /**
* The general shape of the window. * The general shape of the window.
*/ */
/*PUBLIC*/ const windowMode$ = scope.behavior<WindowMode>( const windowMode$ = scope.behavior<WindowMode>(
pipEnabled$.pipe( pipEnabled$.pipe(
switchMap((pip) => (pip ? of<WindowMode>("pip") : naturalWindowMode$)), switchMap((pip) => (pip ? of<WindowMode>("pip") : naturalWindowMode$)),
), ),
); );
const spotlightExpandedToggle$ = new Subject<void>(); const spotlightExpandedToggle$ = new Subject<void>();
/*PUBLIC*/ const spotlightExpanded$ = scope.behavior<boolean>( const spotlightExpanded$ = scope.behavior<boolean>(
spotlightExpandedToggle$.pipe(accumulate(false, (expanded) => !expanded)), spotlightExpandedToggle$.pipe(accumulate(false, (expanded) => !expanded)),
); );
@@ -886,7 +886,7 @@ export class CallViewModel {
/** /**
* The layout mode of the media tile grid. * The layout mode of the media tile grid.
*/ */
/*PUBLIC*/ const gridMode$ = const gridMode$ =
// If the user hasn't selected spotlight and somebody starts screen sharing, // If the user hasn't selected spotlight and somebody starts screen sharing,
// automatically switch to spotlight mode and reset when screen sharing ends // automatically switch to spotlight mode and reset when screen sharing ends
scope.behavior<GridMode>( scope.behavior<GridMode>(
@@ -909,7 +909,7 @@ export class CallViewModel {
"grid", "grid",
); );
/*PUBLIC*/ const setGridMode = (value: GridMode): void => { const setGridMode = (value: GridMode): void => {
gridModeUserSelection$.next(value); gridModeUserSelection$.next(value);
}; };
@@ -1087,22 +1087,22 @@ export class CallViewModel {
/** /**
* The layout of tiles in the call interface. * The layout of tiles in the call interface.
*/ */
/*PUBLIC*/ const layout$ = scope.behavior<Layout>( const layout$ = scope.behavior<Layout>(
layoutInternals$.pipe(map(({ layout }) => layout)), layoutInternals$.pipe(map(({ layout }) => layout)),
); );
/** /**
* The current generation of the tile store, exposed for debugging purposes. * The current generation of the tile store, exposed for debugging purposes.
*/ */
/*PUBLIC*/ const tileStoreGeneration$ = scope.behavior<number>( const tileStoreGeneration$ = scope.behavior<number>(
layoutInternals$.pipe(map(({ tiles }) => tiles.generation)), layoutInternals$.pipe(map(({ tiles }) => tiles.generation)),
); );
/*PUBLIC*/ const showSpotlightIndicators$ = scope.behavior<boolean>( const showSpotlightIndicators$ = scope.behavior<boolean>(
layout$.pipe(map((l) => l.type !== "grid")), layout$.pipe(map((l) => l.type !== "grid")),
); );
/*PUBLIC*/ const showSpeakingIndicators$ = scope.behavior<boolean>( const showSpeakingIndicators$ = scope.behavior<boolean>(
layout$.pipe( layout$.pipe(
switchMap((l) => { switchMap((l) => {
switch (l.type) { switch (l.type) {
@@ -1130,9 +1130,7 @@ export class CallViewModel {
), ),
); );
/*PUBLIC*/ const toggleSpotlightExpanded$ = scope.behavior< const toggleSpotlightExpanded$ = scope.behavior<(() => void) | null>(
(() => void) | null
>(
windowMode$.pipe( windowMode$.pipe(
switchMap((mode) => switchMap((mode) =>
mode === "normal" mode === "normal"
@@ -1157,11 +1155,11 @@ export class CallViewModel {
const screenHover$ = new Subject<void>(); const screenHover$ = new Subject<void>();
const screenUnhover$ = new Subject<void>(); const screenUnhover$ = new Subject<void>();
/*PUBLIC*/ const showHeader$ = scope.behavior<boolean>( const showHeader$ = scope.behavior<boolean>(
windowMode$.pipe(map((mode) => mode !== "pip" && mode !== "flat")), windowMode$.pipe(map((mode) => mode !== "pip" && mode !== "flat")),
); );
/*PUBLIC*/ const showFooter$ = scope.behavior<boolean>( const showFooter$ = scope.behavior<boolean>(
windowMode$.pipe( windowMode$.pipe(
switchMap((mode) => { switchMap((mode) => {
switch (mode) { switch (mode) {
@@ -1219,7 +1217,7 @@ export class CallViewModel {
/** /**
* Whether audio is currently being output through the earpiece. * Whether audio is currently being output through the earpiece.
*/ */
/*PUBLIC*/ const earpieceMode$ = scope.behavior<boolean>( const earpieceMode$ = scope.behavior<boolean>(
combineLatest( combineLatest(
[ [
mediaDevices.audioOutput.available$, mediaDevices.audioOutput.available$,
@@ -1237,7 +1235,7 @@ export class CallViewModel {
* This will be `null` in case the target does not exist in the list * This will be `null` in case the target does not exist in the list
* of available audio outputs. * of available audio outputs.
*/ */
/*PUBLIC*/ const audioOutputSwitcher$ = scope.behavior<{ const audioOutputSwitcher$ = scope.behavior<{
targetOutput: "earpiece" | "speaker"; targetOutput: "earpiece" | "speaker";
switch: () => void; switch: () => void;
} | null>( } | null>(