Skip to content

Commit d868d42

Browse files
authored
Remove RTT cc line (#5816)
* Remove cc * update
1 parent 47b8cab commit d868d42

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+161
-393
lines changed

common/config/babel/features.js

-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ module.exports = {
7474
// Demo feature. Used in live-documentation of conditional compilation.
7575
// Do not use in production code.
7676
"stabilizedDemo",
77-
// Feature for RTT
78-
"rtt",
7977
// Feature for on fetch profile
8078
"on-fetch-profile"
8179
]

packages/calling-component-bindings/src/baseSelectors.ts

-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { TeamsIncomingCallState } from '@internal/calling-stateful-client';
1919
import { ReactionState } from '@internal/calling-stateful-client';
2020
import { CaptionsInfo } from '@internal/calling-stateful-client';
2121
import { CaptionsKind, CapabilitiesChangeInfo } from '@azure/communication-calling';
22-
/* @conditional-compile-remove(rtt) */
2322
import { RealTimeTextInfo } from '@internal/calling-stateful-client';
2423
import { RaisedHandState } from '@internal/calling-stateful-client';
2524
import { SupportedCaptionLanguage, SupportedSpokenLanguage } from '@internal/react-components';
@@ -321,13 +320,11 @@ export const getAssignedBreakoutRoom = (
321320
return state.calls[props.callId]?.breakoutRooms?.assignedBreakoutRoom;
322321
};
323322

324-
/* @conditional-compile-remove(rtt) */
325323
/** @private */
326324
export const getRealTimeTextStatus = (state: CallClientState, props: CallingBaseSelectorProps): boolean | undefined => {
327325
return state.calls[props.callId]?.realTimeTextFeature.isRealTimeTextFeatureActive;
328326
};
329327

330-
/* @conditional-compile-remove(rtt) */
331328
/** @private */
332329
export const getRealTimeText = (
333330
state: CallClientState,

packages/calling-component-bindings/src/captionsSelector.ts

+8-20
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Licensed under the MIT License.
33

44
import { CallClientState, CaptionsInfo } from '@internal/calling-stateful-client';
5-
/* @conditional-compile-remove(rtt) */
65
import { RealTimeTextInfo, RemoteParticipantState } from '@internal/calling-stateful-client';
76
import {
87
CallingBaseSelectorProps,
@@ -13,7 +12,6 @@ import {
1312
getStartCaptionsInProgress,
1413
getSupportedCaptionLanguages
1514
} from './baseSelectors';
16-
/* @conditional-compile-remove(rtt) */
1715
import { getRealTimeTextStatus, getRealTimeText } from './baseSelectors';
1816
import {
1917
getCaptions,
@@ -25,7 +23,6 @@ import {
2523
import * as reselect from 'reselect';
2624
import { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';
2725
import { CaptionsInformation, SupportedCaptionLanguage, SupportedSpokenLanguage } from '@internal/react-components';
28-
/* @conditional-compile-remove(rtt) */
2926
import { RealTimeTextInformation } from '@internal/react-components';
3027
import { getRemoteParticipantDisplayName } from './utils/callUtils';
3128

@@ -111,17 +108,14 @@ export type CaptionsBannerSelector = (
111108
props: CallingBaseSelectorProps
112109
) => {
113110
captions: CaptionsInformation[];
114-
/* @conditional-compile-remove(rtt) */
115111
realTimeTexts: {
116112
completedMessages?: RealTimeTextInformation[];
117113
currentInProgress?: RealTimeTextInformation[];
118114
myInProgress?: RealTimeTextInformation;
119115
};
120116
isCaptionsOn: boolean;
121117
startCaptionsInProgress: boolean;
122-
/* @conditional-compile-remove(rtt) */
123118
isRealTimeTextOn: boolean;
124-
/* @conditional-compile-remove(rtt) */
125119
latestLocalRealTimeText: RealTimeTextInformation;
126120
};
127121

@@ -133,10 +127,8 @@ export type CaptionsBannerSelector = (
133127
export const captionsBannerSelector: CaptionsBannerSelector = reselect.createSelector(
134128
[
135129
getCaptions,
136-
/* @conditional-compile-remove(rtt) */
137130
getRealTimeText,
138131
getCaptionsStatus,
139-
/* @conditional-compile-remove(rtt) */
140132
getRealTimeTextStatus,
141133
getStartCaptionsInProgress,
142134
getRemoteParticipants,
@@ -146,10 +138,8 @@ export const captionsBannerSelector: CaptionsBannerSelector = reselect.createSel
146138
],
147139
(
148140
captions,
149-
/* @conditional-compile-remove(rtt) */
150141
realTimeTexts,
151142
isCaptionsFeatureActive,
152-
/* @conditional-compile-remove(rtt) */
153143
isRealTimeTextActive,
154144
startCaptionsInProgress,
155145
remoteParticipants,
@@ -174,7 +164,7 @@ export const captionsBannerSelector: CaptionsBannerSelector = reselect.createSel
174164
createdTimeStamp: c.timestamp
175165
};
176166
});
177-
/* @conditional-compile-remove(rtt) */
167+
178168
const completedRealTimeTexts = realTimeTexts?.completedMessages
179169
?.filter((rtt) => rtt.message !== '')
180170
.map((rtt) => {
@@ -196,7 +186,7 @@ export const captionsBannerSelector: CaptionsBannerSelector = reselect.createSel
196186
finalizedTimeStamp: rtt.updatedTimestamp
197187
};
198188
});
199-
/* @conditional-compile-remove(rtt) */
189+
200190
const inProgressRealTimeTexts = realTimeTexts?.currentInProgress
201191
?.filter((rtt) => rtt.message !== '')
202192
.map((rtt) => {
@@ -218,7 +208,7 @@ export const captionsBannerSelector: CaptionsBannerSelector = reselect.createSel
218208
finalizedTimeStamp: rtt.updatedTimestamp
219209
};
220210
});
221-
/* @conditional-compile-remove(rtt) */
211+
222212
const myInProgress =
223213
realTimeTexts?.myInProgress && realTimeTexts.myInProgress.message !== ''
224214
? {
@@ -232,10 +222,9 @@ export const captionsBannerSelector: CaptionsBannerSelector = reselect.createSel
232222
}
233223
: undefined;
234224

235-
/* @conditional-compile-remove(rtt) */
236225
// find the last final local real time text caption if myInProgress is not available
237226
let latestLocalRealTimeText;
238-
/* @conditional-compile-remove(rtt) */
227+
239228
if (!myInProgress) {
240229
latestLocalRealTimeText =
241230
realTimeTexts &&
@@ -248,17 +237,17 @@ export const captionsBannerSelector: CaptionsBannerSelector = reselect.createSel
248237

249238
return {
250239
captions: captionsInfo ?? [],
251-
/* @conditional-compile-remove(rtt) */
240+
252241
realTimeTexts: {
253242
completedMessages: completedRealTimeTexts as RealTimeTextInformation[],
254243
currentInProgress: inProgressRealTimeTexts as RealTimeTextInformation[],
255244
myInProgress: myInProgress as RealTimeTextInformation
256245
},
257246
isCaptionsOn: isCaptionsFeatureActive ?? false,
258247
startCaptionsInProgress: startCaptionsInProgress ?? false,
259-
/* @conditional-compile-remove(rtt) */
248+
260249
isRealTimeTextOn: isRealTimeTextActive ?? false,
261-
/* @conditional-compile-remove(rtt) */
250+
262251
latestLocalRealTimeText: (myInProgress ?? latestLocalRealTimeText) as RealTimeTextInformation
263252
};
264253
}
@@ -267,12 +256,11 @@ export const captionsBannerSelector: CaptionsBannerSelector = reselect.createSel
267256
const getCaptionsSpeakerIdentifier = (captions: CaptionsInfo): string => {
268257
return captions.speaker.identifier ? toFlatCommunicationIdentifier(captions.speaker.identifier) : '';
269258
};
270-
/* @conditional-compile-remove(rtt) */
259+
271260
const getRealTimeTextSpeakerIdentifier = (realTimeText: RealTimeTextInfo): string => {
272261
return realTimeText.sender.identifier ? toFlatCommunicationIdentifier(realTimeText.sender.identifier) : '';
273262
};
274263

275-
/* @conditional-compile-remove(rtt) */
276264
const getRealTimeTextDisplayName = (
277265
realTimeText: RealTimeTextInfo,
278266
identifier: string,

packages/calling-component-bindings/src/handlers/createCommonHandlers.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ export interface CommonCallingHandlers {
101101
onStopNoiseSuppressionEffect: () => Promise<void>;
102102
onStartCaptions: (options?: CaptionsOptions) => Promise<void>;
103103
onStopCaptions: () => Promise<void>;
104-
/* @conditional-compile-remove(rtt) */
105104
onSendRealTimeText: (text: string, isFinalized: boolean) => Promise<void>;
106105
onSetSpokenLanguage: (language: string) => Promise<void>;
107106
onSetCaptionLanguage: (language: string) => Promise<void>;
@@ -731,7 +730,6 @@ export const createDefaultCommonCallingHandlers = memoizeOne(
731730
const captionsFeature = call?.feature(Features.Captions).captions as TeamsCaptions;
732731
await captionsFeature.setCaptionLanguage(language);
733732
};
734-
/* @conditional-compile-remove(rtt) */
735733
const onSendRealTimeText = async (text: string, isFinalized: boolean): Promise<void> => {
736734
const realTimeTextFeature = call?.feature(Features.RealTimeText);
737735
await realTimeTextFeature?.sendRealTimeText(text, isFinalized);
@@ -938,7 +936,7 @@ export const createDefaultCommonCallingHandlers = memoizeOne(
938936
onPermitVideo,
939937
onForbidOthersVideo,
940938
onPermitOthersVideo,
941-
/* @conditional-compile-remove(rtt) */
939+
942940
onSendRealTimeText
943941
};
944942
}

packages/calling-stateful-client/src/CallClientState.ts

-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import type {
3030
DiagnosticQuality,
3131
DiagnosticFlag
3232
} from '@azure/communication-calling';
33-
/* @conditional-compile-remove(rtt) */
3433
import { ParticipantInfo, RealTimeTextResultType } from '@azure/communication-calling';
3534
import { TeamsCallInfo } from '@azure/communication-calling';
3635
import { CallInfo } from '@azure/communication-calling';
@@ -99,7 +98,6 @@ export interface CaptionsInfo {
9998
spokenText?: string;
10099
}
101100

102-
/* @conditional-compile-remove(rtt) */
103101
/**
104102
* @public
105103
*/
@@ -173,7 +171,6 @@ export interface CaptionsCallFeatureState {
173171
captionsKind: CaptionsKind;
174172
}
175173

176-
/* @conditional-compile-remove(rtt) */
177174
/**
178175
* @public
179176
*/
@@ -721,7 +718,6 @@ export interface CallState {
721718
* Proxy of {@link @azure/communication-calling#CaptionsCallFeature}.
722719
*/
723720
captionsFeature: CaptionsCallFeatureState;
724-
/* @conditional-compile-remove(rtt) */
725721
/**
726722
* Proxy of {@link @azure/communication-calling#RealTimeTextCallFeature}.
727723
*/

packages/calling-stateful-client/src/CallContext.ts

+3-8
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ import {
1010
ScalingMode,
1111
VideoDeviceInfo
1212
} from '@azure/communication-calling';
13-
/* @conditional-compile-remove(rtt) */
1413
import { RealTimeTextInfo } from './CallClientState';
15-
/* @conditional-compile-remove(rtt) */
1614
import { RealTimeTextInfo as AcsRealTimeTextInfo } from '@azure/communication-calling';
1715
import {
1816
BreakoutRoom,
@@ -21,10 +19,8 @@ import {
2119
MeetingMediaAccess,
2220
RaisedHand
2321
} from '@azure/communication-calling';
24-
2522
import { TeamsMeetingAudioConferencingDetails } from '@azure/communication-calling';
2623
import { convertConferencePhoneInfo } from './Converter';
27-
/* @conditional-compile-remove(rtt) */
2824
import { convertFromSDKRealTimeTextToRealTimeTextInfoState } from './Converter';
2925
import { CapabilitiesChangeInfo, ParticipantCapabilities } from '@azure/communication-calling';
3026
import { TeamsCaptionsInfo } from '@azure/communication-calling';
@@ -1189,7 +1185,7 @@ export class CallContext {
11891185
this._atomicId++;
11901186
return id;
11911187
}
1192-
/* @conditional-compile-remove(rtt) */
1188+
11931189
private processNewRealTimeText(
11941190
realTimeTexts: {
11951191
completedMessages?: RealTimeTextInfo[];
@@ -1250,7 +1246,6 @@ export class CallContext {
12501246
}
12511247
}
12521248

1253-
/* @conditional-compile-remove(rtt) */
12541249
private findTimeoutRealTimeText(
12551250
inProgressRealTimeTexts: RealTimeTextInfo[] | RealTimeTextInfo | undefined,
12561251
completedRealTimeTexts: RealTimeTextInfo[]
@@ -1347,7 +1342,7 @@ export class CallContext {
13471342
}
13481343
});
13491344
}
1350-
/* @conditional-compile-remove(rtt) */
1345+
13511346
public addRealTimeText(callId: string, realTimeText: AcsRealTimeTextInfo): void {
13521347
this.modifyState((draft: CallClientState) => {
13531348
const call = draft.calls[this._callIdHistory.latestCallId(callId)];
@@ -1386,7 +1381,7 @@ export class CallContext {
13861381
}
13871382
});
13881383
}
1389-
/* @conditional-compile-remove(rtt) */
1384+
13901385
setIsRealTimeTextActive(callId: string, isRealTimeTextActive: boolean): void {
13911386
this.modifyState((draft: CallClientState) => {
13921387
const call = draft.calls[this._callIdHistory.latestCallId(callId)];

packages/calling-stateful-client/src/CallSubscriber.ts

-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import { LocalRecordingSubscriber } from './LocalRecordingSubscriber';
3333
import { TogetherModeSubscriber } from './TogetherModeSubscriber';
3434
import { MediaAccessSubscriber } from './MediaAccessSubscriber';
3535
import { _isTeamsMeeting } from './TypeGuards';
36-
/* @conditional-compile-remove(rtt) */
3736
import { RealTimeTextSubscriber } from './RealTimeTextSubscriber';
3837

3938
/**
@@ -56,7 +55,6 @@ export class CallSubscriber {
5655
private _pptLiveSubscriber: PPTLiveSubscriber;
5756
private _optimalVideoCountSubscriber: OptimalVideoCountSubscriber;
5857
private _CaptionsFeatureSubscriber?: CaptionsFeatureSubscriber;
59-
/* @conditional-compile-remove(rtt) */
6058
private _realTimeTextSubscriber?: RealTimeTextSubscriber;
6159
private _raiseHandSubscriber?: RaiseHandSubscriber;
6260
private _reactionSubscriber?: ReactionSubscriber;
@@ -249,7 +247,6 @@ export class CallSubscriber {
249247
this._optimalVideoCountSubscriber.unsubscribe();
250248
this._pptLiveSubscriber.unsubscribe();
251249
this._CaptionsFeatureSubscriber?.unsubscribe();
252-
/* @conditional-compile-remove(rtt) */
253250
if (this._realTimeTextSubscriber) {
254251
this._realTimeTextSubscriber.unsubscribe();
255252
}

packages/calling-stateful-client/src/Converter.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ import {
99
IncomingCall,
1010
IncomingCallCommon
1111
} from '@azure/communication-calling';
12-
/* @conditional-compile-remove(rtt) */
1312
import { RealTimeTextInfo as ACSRealTimeTextInfo } from '@azure/communication-calling';
14-
/* @conditional-compile-remove(rtt) */
1513
import { RealTimeTextInfo } from './CallClientState';
1614
/* @conditional-compile-remove(together-mode) */
1715
import { TogetherModeVideoStream as SdkTogetherModeVideoStream } from '@azure/communication-calling';
@@ -196,7 +194,6 @@ export function convertSdkCallToDeclarativeCall(call: CallCommon): CallState {
196194
startCaptionsInProgress: false,
197195
captionsKind: _isTeamsCall(call) ? 'TeamsCaptions' : 'Captions'
198196
},
199-
/* @conditional-compile-remove(rtt) */
200197
realTimeTextFeature: {
201198
realTimeTexts: {},
202199
isRealTimeTextFeatureActive: false
@@ -279,7 +276,7 @@ export function convertFromSDKToCaptionInfoState(caption: AcsCaptionsInfo): Capt
279276
...caption
280277
};
281278
}
282-
/* @conditional-compile-remove(rtt) */
279+
283280
/**
284281
* @private
285282
*/

packages/calling-stateful-client/src/RealTimeTextSubscriber.ts

-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4-
/* @conditional-compile-remove(rtt) */
54
import { RealTimeTextFeature, RealTimeTextInfo, RealTimeTextReceivedEventHandler } from '@azure/communication-calling';
6-
/* @conditional-compile-remove(rtt) */
75
import { CallContext } from './CallContext';
8-
/* @conditional-compile-remove(rtt) */
96
import { CallIdRef } from './CallIdRef';
10-
/* @conditional-compile-remove(rtt) */
117
/**
128
* @private
139
*/

packages/calling-stateful-client/src/StreamUtils.test.ts

-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ function createMockCall(mockCallId: string): CallState {
105105
startCaptionsInProgress: false,
106106
captionsKind: 'Captions'
107107
},
108-
/* @conditional-compile-remove(rtt) */
109108
realTimeTextFeature: {
110109
realTimeTexts: {},
111110
isRealTimeTextFeatureActive: false

packages/calling-stateful-client/src/index-public.ts

-1
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,4 @@ export type { LocalRecordingCallFeatureState } from './CallClientState';
5757
export type { ConferencePhoneInfo } from './CallClientState';
5858
export type { BreakoutRoomsState } from './CallClientState';
5959
export type { MediaAccessState } from './CallClientState';
60-
/* @conditional-compile-remove(rtt) */
6160
export type { RealTimeTextInfo, RealTimeTextCallFeatureState } from './CallClientState';

packages/communication-react/review/beta/communication-react.api.md

+2-8
Original file line numberDiff line numberDiff line change
@@ -1714,7 +1714,7 @@ export interface CallWithChatControlOptions extends CommonCallControlOptions {
17141714
}
17151715

17161716
// @public
1717-
export type CallWithChatEvent = 'callError' | 'chatError' | 'callEnded' | 'isMutedChanged' | 'callIdChanged' | 'isLocalScreenSharingActiveChanged' | 'displayNameChanged' | 'isSpeakingChanged' | 'callParticipantsJoined' | 'callParticipantsLeft' | 'selectedMicrophoneChanged' | 'selectedSpeakerChanged' | 'isCaptionsActiveChanged' | 'captionsReceived' | 'isCaptionLanguageChanged' | 'isSpokenLanguageChanged' | /* @conditional-compile-remove(rtt) */ 'realTimeTextReceived' | 'capabilitiesChanged' | 'spotlightChanged' | 'breakoutRoomsUpdated' | 'messageReceived' | 'messageEdited' | 'messageDeleted' | 'messageSent' | 'messageRead' | 'chatParticipantsAdded' | 'chatParticipantsRemoved' | 'chatInitialized';
1717+
export type CallWithChatEvent = 'callError' | 'chatError' | 'callEnded' | 'isMutedChanged' | 'callIdChanged' | 'isLocalScreenSharingActiveChanged' | 'displayNameChanged' | 'isSpeakingChanged' | 'callParticipantsJoined' | 'callParticipantsLeft' | 'selectedMicrophoneChanged' | 'selectedSpeakerChanged' | 'isCaptionsActiveChanged' | 'captionsReceived' | 'isCaptionLanguageChanged' | 'isSpokenLanguageChanged' | 'realTimeTextReceived' | 'capabilitiesChanged' | 'spotlightChanged' | 'breakoutRoomsUpdated' | 'messageReceived' | 'messageEdited' | 'messageDeleted' | 'messageSent' | 'messageRead' | 'chatParticipantsAdded' | 'chatParticipantsRemoved' | 'chatInitialized';
17181718

17191719
// @beta
17201720
export const CameraAndMicrophoneSitePermissions: (props: CameraAndMicrophoneSitePermissionsProps) => JSX.Element;
@@ -3229,13 +3229,7 @@ export const DEFAULT_COMPOSITE_ICONS: {
32293229
SplitButtonPrimaryActionCameraOn: React_2.JSX.Element;
32303230
SplitButtonPrimaryActionCameraOff: React_2.JSX.Element;
32313231
SplitButtonPrimaryActionMicUnmuted: React_2.JSX.Element;
3232-
SplitButtonPrimaryActionMicMuted: React_2.JSX.Element; /**
3233-
* Icon wrapper to use when including customizable icons inside the CallWithChatComposite.
3234-
* This wrapper ensures the icon name is being type-checked helping ensure no typos
3235-
* and ensure that icon is customizable through the composite API.
3236-
*
3237-
* @private
3238-
*/
3232+
SplitButtonPrimaryActionMicMuted: React_2.JSX.Element;
32393233
VerticalGalleryLeftButton: React_2.JSX.Element;
32403234
VerticalGalleryRightButton: React_2.JSX.Element;
32413235
ControlButtonVideoEffectsOption: React_2.JSX.Element;

0 commit comments

Comments
 (0)