Skip to content

Commit b094e2a

Browse files
authored
Rename blurred background callback args (#2866) (#2869)
* Rename blurred background callback arguments * Change files * Duplicate change files for beta release
1 parent 0b9a472 commit b094e2a

12 files changed

Lines changed: 56 additions & 38 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "Rename blurred background callback arguments",
4+
"packageName": "@azure/communication-react",
5+
"email": "79475487+mgamis-msft@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "Rename blurred background callback arguments",
4+
"packageName": "@azure/communication-react",
5+
"email": "79475487+mgamis-msft@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}

packages/calling-component-bindings/review/beta/calling-component-bindings.api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export interface CommonCallingHandlers {
116116
// (undocumented)
117117
onAddParticipant(participant: PhoneNumberIdentifier, options: AddPhoneNumberOptions): Promise<void>;
118118
// (undocumented)
119-
onBlurVideoBackground: (bgBlurConfig?: BackgroundBlurConfig) => Promise<void>;
119+
onBlurVideoBackground: (backgroundBlurConfig?: BackgroundBlurConfig) => Promise<void>;
120120
// (undocumented)
121121
onCreateLocalStreamView: (options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>;
122122
// (undocumented)
@@ -134,7 +134,7 @@ export interface CommonCallingHandlers {
134134
// (undocumented)
135135
onRemoveVideoBackgroundEffects: () => Promise<void>;
136136
// (undocumented)
137-
onReplaceVideoBackground: (bgReplacementConfig: BackgroundReplacementConfig) => Promise<void>;
137+
onReplaceVideoBackground: (backgroundReplacementConfig: BackgroundReplacementConfig) => Promise<void>;
138138
// (undocumented)
139139
onSelectCamera: (device: VideoDeviceInfo, options?: VideoStreamOptions) => Promise<void>;
140140
// (undocumented)

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ export interface CommonCallingHandlers {
7878
/* @conditional-compile-remove(video-background-effects) */
7979
onRemoveVideoBackgroundEffects: () => Promise<void>;
8080
/* @conditional-compile-remove(video-background-effects) */
81-
onBlurVideoBackground: (bgBlurConfig?: BackgroundBlurConfig) => Promise<void>;
81+
onBlurVideoBackground: (backgroundBlurConfig?: BackgroundBlurConfig) => Promise<void>;
8282
/* @conditional-compile-remove(video-background-effects) */
83-
onReplaceVideoBackground: (bgReplacementConfig: BackgroundReplacementConfig) => Promise<void>;
83+
onReplaceVideoBackground: (backgroundReplacementConfig: BackgroundReplacementConfig) => Promise<void>;
8484
}
8585

8686
/**
@@ -389,22 +389,26 @@ export const createDefaultCommonCallingHandlers = memoizeOne(
389389
};
390390

391391
/* @conditional-compile-remove(video-background-effects) */
392-
const onBlurVideoBackground = async (bgBlurConfig?: BackgroundBlurConfig): Promise<void> => {
392+
const onBlurVideoBackground = async (backgroundBlurConfig?: BackgroundBlurConfig): Promise<void> => {
393393
const stream =
394394
call?.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video') ||
395395
deviceManager?.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video');
396396
if (stream) {
397-
return stream.feature(Features.VideoEffects).startEffects(new BackgroundBlurEffect(bgBlurConfig));
397+
return stream.feature(Features.VideoEffects).startEffects(new BackgroundBlurEffect(backgroundBlurConfig));
398398
}
399399
};
400400

401401
/* @conditional-compile-remove(video-background-effects) */
402-
const onReplaceVideoBackground = async (bgReplacementConfig: BackgroundReplacementConfig): Promise<void> => {
402+
const onReplaceVideoBackground = async (
403+
backgroundReplacementConfig: BackgroundReplacementConfig
404+
): Promise<void> => {
403405
const stream =
404406
call?.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video') ||
405407
deviceManager?.getUnparentedVideoStreams().find((stream) => stream.mediaStreamType === 'Video');
406408
if (stream) {
407-
return stream.feature(Features.VideoEffects).startEffects(new BackgroundReplacementEffect(bgReplacementConfig));
409+
return stream
410+
.feature(Features.VideoEffects)
411+
.startEffects(new BackgroundReplacementEffect(backgroundReplacementConfig));
408412
}
409413
};
410414

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ export interface CallAdapterCallOperations {
276276
addParticipant(participant: CommunicationUserIdentifier): Promise<void>;
277277
allowUnsupportedBrowserVersion(): void;
278278
// @beta
279-
blurVideoBackground(bgBlurConfig?: BackgroundBlurConfig): Promise<void>;
279+
blurVideoBackground(backgroundBlurConfig?: BackgroundBlurConfig): Promise<void>;
280280
createStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void | CreateVideoStreamViewResult>;
281281
disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void>;
282282
// @beta
@@ -287,7 +287,7 @@ export interface CallAdapterCallOperations {
287287
// @beta
288288
removeParticipant(participant: CommunicationIdentifier): Promise<void>;
289289
// @beta
290-
replaceVideoBackground(bgReplacementConfig: BackgroundReplacementConfig): Promise<void>;
290+
replaceVideoBackground(backgroundReplacementConfig: BackgroundReplacementConfig): Promise<void>;
291291
// @beta
292292
resumeCall(): Promise<void>;
293293
// @beta
@@ -743,7 +743,7 @@ export interface CallWithChatAdapterManagement {
743743
allowUnsupportedBrowserVersion(): void;
744744
askDevicePermission(constrain: PermissionConstraints): Promise<void>;
745745
// @beta
746-
blurVideoBackground(bgBlurConfig?: BackgroundBlurConfig): Promise<void>;
746+
blurVideoBackground(backgroundBlurConfig?: BackgroundBlurConfig): Promise<void>;
747747
// @beta (undocumented)
748748
cancelFileUpload: (id: string) => void;
749749
// @beta (undocumented)
@@ -769,7 +769,7 @@ export interface CallWithChatAdapterManagement {
769769
// @beta
770770
removeParticipant(participant: CommunicationIdentifier): Promise<void>;
771771
// @beta
772-
replaceVideoBackground(bgReplacementConfig: BackgroundReplacementConfig): Promise<void>;
772+
replaceVideoBackground(backgroundReplacementConfig: BackgroundReplacementConfig): Promise<void>;
773773
// @beta
774774
resumeCall: () => Promise<void>;
775775
// @beta
@@ -1393,7 +1393,7 @@ export interface CommonCallingHandlers {
13931393
// (undocumented)
13941394
onAddParticipant(participant: PhoneNumberIdentifier, options: AddPhoneNumberOptions): Promise<void>;
13951395
// (undocumented)
1396-
onBlurVideoBackground: (bgBlurConfig?: BackgroundBlurConfig) => Promise<void>;
1396+
onBlurVideoBackground: (backgroundBlurConfig?: BackgroundBlurConfig) => Promise<void>;
13971397
// (undocumented)
13981398
onCreateLocalStreamView: (options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>;
13991399
// (undocumented)
@@ -1411,7 +1411,7 @@ export interface CommonCallingHandlers {
14111411
// (undocumented)
14121412
onRemoveVideoBackgroundEffects: () => Promise<void>;
14131413
// (undocumented)
1414-
onReplaceVideoBackground: (bgReplacementConfig: BackgroundReplacementConfig) => Promise<void>;
1414+
onReplaceVideoBackground: (backgroundReplacementConfig: BackgroundReplacementConfig) => Promise<void>;
14151415
// (undocumented)
14161416
onSelectCamera: (device: VideoDeviceInfo, options?: VideoStreamOptions) => Promise<void>;
14171417
// (undocumented)

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export interface CallAdapterCallOperations {
174174
addParticipant(participant: CommunicationUserIdentifier): Promise<void>;
175175
allowUnsupportedBrowserVersion(): void;
176176
// @beta
177-
blurVideoBackground(bgBlurConfig?: BackgroundBlurConfig): Promise<void>;
177+
blurVideoBackground(backgroundBlurConfig?: BackgroundBlurConfig): Promise<void>;
178178
createStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void | CreateVideoStreamViewResult>;
179179
disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void>;
180180
// @beta
@@ -185,7 +185,7 @@ export interface CallAdapterCallOperations {
185185
// @beta
186186
removeParticipant(participant: CommunicationIdentifier): Promise<void>;
187187
// @beta
188-
replaceVideoBackground(bgReplacementConfig: BackgroundReplacementConfig): Promise<void>;
188+
replaceVideoBackground(backgroundReplacementConfig: BackgroundReplacementConfig): Promise<void>;
189189
// @beta
190190
resumeCall(): Promise<void>;
191191
// @beta
@@ -498,7 +498,7 @@ export interface CallWithChatAdapterManagement {
498498
allowUnsupportedBrowserVersion(): void;
499499
askDevicePermission(constrain: PermissionConstraints): Promise<void>;
500500
// @beta
501-
blurVideoBackground(bgBlurConfig?: BackgroundBlurConfig): Promise<void>;
501+
blurVideoBackground(backgroundBlurConfig?: BackgroundBlurConfig): Promise<void>;
502502
// @beta (undocumented)
503503
cancelFileUpload: (id: string) => void;
504504
// @beta (undocumented)
@@ -524,7 +524,7 @@ export interface CallWithChatAdapterManagement {
524524
// @beta
525525
removeParticipant(participant: CommunicationIdentifier): Promise<void>;
526526
// @beta
527-
replaceVideoBackground(bgReplacementConfig: BackgroundReplacementConfig): Promise<void>;
527+
replaceVideoBackground(backgroundReplacementConfig: BackgroundReplacementConfig): Promise<void>;
528528
// @beta
529529
resumeCall: () => Promise<void>;
530530
// @beta

packages/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -556,12 +556,12 @@ export class AzureCommunicationCallAdapter<AgentType extends CallAgent | BetaTea
556556
}
557557

558558
/* @conditional-compile-remove(video-background-effects) */
559-
public async blurVideoBackground(bgBlurConfig?: BackgroundBlurConfig): Promise<void> {
560-
await this.handlers.onBlurVideoBackground(bgBlurConfig);
559+
public async blurVideoBackground(backgroundBlurConfig?: BackgroundBlurConfig): Promise<void> {
560+
await this.handlers.onBlurVideoBackground(backgroundBlurConfig);
561561
}
562562
/* @conditional-compile-remove(video-background-effects) */
563-
public async replaceVideoBackground(bgReplacementConfig: BackgroundReplacementConfig): Promise<void> {
564-
await this.handlers.onReplaceVideoBackground(bgReplacementConfig);
563+
public async replaceVideoBackground(backgroundReplacementConfig: BackgroundReplacementConfig): Promise<void> {
564+
await this.handlers.onReplaceVideoBackground(backgroundReplacementConfig);
565565
}
566566

567567
/* @conditional-compile-remove(video-background-effects) */

packages/react-composites/src/composites/CallComposite/adapter/CallAdapter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,14 +381,14 @@ export interface CallAdapterCallOperations {
381381
*
382382
* @beta
383383
*/
384-
blurVideoBackground(bgBlurConfig?: BackgroundBlurConfig): Promise<void>;
384+
blurVideoBackground(backgroundBlurConfig?: BackgroundBlurConfig): Promise<void>;
385385
/* @conditional-compile-remove(video-background-effects) */
386386
/**
387387
* Start the video background replacement effect.
388388
*
389389
* @beta
390390
*/
391-
replaceVideoBackground(bgReplacementConfig: BackgroundReplacementConfig): Promise<void>;
391+
replaceVideoBackground(backgroundReplacementConfig: BackgroundReplacementConfig): Promise<void>;
392392
/* @conditional-compile-remove(video-background-effects) */
393393
/**
394394
* Stop the video background effect.

packages/react-composites/src/composites/CallComposite/hooks/useHandlers.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ const createCompositeHandlers = memoizeOne(
100100
return await adapter.stopVideoBackgroundEffect();
101101
},
102102
/* @conditional-compile-remove(video-background-effects) */
103-
onBlurVideoBackground: async (bgBlurConfig?: BackgroundBlurConfig) => {
104-
return await adapter.blurVideoBackground(bgBlurConfig);
103+
onBlurVideoBackground: async (backgroundBlurConfig?: BackgroundBlurConfig) => {
104+
return await adapter.blurVideoBackground(backgroundBlurConfig);
105105
},
106106
/* @conditional-compile-remove(video-background-effects) */
107-
onReplaceVideoBackground: async (bgReplacementConfig: BackgroundReplacementConfig) => {
108-
return await adapter.replaceVideoBackground(bgReplacementConfig);
107+
onReplaceVideoBackground: async (backgroundReplacementConfig: BackgroundReplacementConfig) => {
108+
return await adapter.replaceVideoBackground(backgroundReplacementConfig);
109109
}
110110
})
111111
);

packages/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -425,12 +425,12 @@ export class AzureCommunicationCallWithChatAdapter implements CallWithChatAdapte
425425
}
426426

427427
/* @conditional-compile-remove(video-background-effects) */
428-
public async blurVideoBackground(bgBlurConfig?: BackgroundBlurConfig): Promise<void> {
429-
await this.callAdapter.blurVideoBackground(bgBlurConfig);
428+
public async blurVideoBackground(backgroundBlurConfig?: BackgroundBlurConfig): Promise<void> {
429+
await this.callAdapter.blurVideoBackground(backgroundBlurConfig);
430430
}
431431
/* @conditional-compile-remove(video-background-effects) */
432-
public async replaceVideoBackground(bgReplacementConfig: BackgroundReplacementConfig): Promise<void> {
433-
await this.callAdapter.replaceVideoBackground(bgReplacementConfig);
432+
public async replaceVideoBackground(backgroundReplacementConfig: BackgroundReplacementConfig): Promise<void> {
433+
await this.callAdapter.replaceVideoBackground(backgroundReplacementConfig);
434434
}
435435

436436
/* @conditional-compile-remove(video-background-effects) */

0 commit comments

Comments
 (0)