Skip to content

Commit f9cb264

Browse files
prabhjot-msftPorterNangithub-actions[bot]
authored
Stabilize Blur & Custom Background (#3551)
* Treeshaking video blur if not needed * Treeshaking video effects * config changes * Lazy loading config * Changes for lazyloading + treeshaking * Change files * Duplicate change files for beta release * UI changes if resolve dependency is not passed * minor changes * Update embed html bundle snapshots * Update packages/react-composites CallWithChatComposite browser test snapshots * Addressed comments * Minor * Fixed cc * Minor changes * minor changes * Updated hermetic tests * Update packages/react-composites CallComposite browser test snapshots * Fixed CC * minor changes * minor * Fixed naming for video effects dependency * minor * Stabilize Blur * stabilize blur * Change files * Duplicate change files for beta release * update beta api.md * minor * Update packages/react-composites CallComposite browser test snapshots * minor * update calling-effects version * minor * minor * minor * addressed comments --------- Co-authored-by: Porter Nan <jiangnanhello@live.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 72c89fc commit f9cb264

93 files changed

Lines changed: 567 additions & 303 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "minor",
3+
"area": "feature",
4+
"workstream": "Calling",
5+
"comment": "General Availability release of Background Effects - your users can now blur or replace their video background",
6+
"packageName": "@azure/communication-react",
7+
"email": "97124699+prabhjot-msft@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "minor",
3+
"area": "feature",
4+
"workstream": "Calling",
5+
"comment": "General Availability release of Background Effects - your users can now blur or replace their video background",
6+
"packageName": "@azure/communication-react",
7+
"email": "97124699+prabhjot-msft@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}

common/config/babel/.babelrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ process.env['COMMUNICATION_REACT_FLAVOR'] !== 'beta' &&
5858
'total-participant-count',
5959
// feature for tracking environment info API different than unsupported browser. stable use of environment info affects other components possibly sooner
6060
'calling-environment-info',
61-
// feature for blurred background and replace background effects
62-
'video-background-effects',
6361
// feature for vertical gallery layouts in VideoGallery
6462
'vertical-gallery',
6563
// Feature for updates needed for Click to Call (C2C) scenarios
@@ -97,6 +95,8 @@ process.env['COMMUNICATION_REACT_FLAVOR'] !== 'beta' &&
9795
// Demo feature. Used in live-documentation of conditional compilation.
9896
// Do not use in production code.
9997
'stabilizedDemo',
98+
// feature for blurred background and replace background effects
99+
'video-background-effects',
100100
// Pinned Participants
101101
'pinned-participants',
102102
// Feature for capabilities

common/config/rush/pnpm-lock.yaml

Lines changed: 90 additions & 72 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/config/rush/variants/stable/pnpm-lock.yaml

Lines changed: 90 additions & 72 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/scripts/force-build-flavor.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function restrictBuildFlavorForWorkflows(target) {
4242
// Dependencies to choose the right version for beta and stable
4343
const SDK_DEPS = ["@azure/communication-calling", "@azure/communication-common", "@azure/communication-chat"]
4444
// Depencies that are beta only and should be removed from stable packages
45-
const BETA_ONLY_DEPS = ["@azure/communication-calling-effects"]
45+
const BETA_ONLY_DEPS = []
4646

4747
function chooseSdkDependencies(target) {
4848
const action = target === 'stable' ? chooseStableVersion : chooseBetaVersion;

packages/calling-component-bindings/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@
3939
},
4040
"peerDependencies": {
4141
"@azure/communication-calling": "1.16.3-beta.1 || ^1.16.3",
42-
"@azure/communication-calling-effects": "1.0.0-beta.2",
42+
"@azure/communication-calling-effects": "1.0.1",
4343
"@types/react": ">=16.8.0 <19.0.0",
4444
"react": ">=16.8.0 <19.0.0"
4545
},
4646
"devDependencies": {
4747
"@azure/communication-calling": "1.16.3-beta.1 || ^1.16.3",
48-
"@azure/communication-calling-effects": "1.0.0-beta.2",
48+
"@azure/communication-calling-effects": "1.0.1",
4949
"@babel/cli": "~7.16.0",
5050
"@babel/core": "~7.16.0",
5151
"@microsoft/api-documenter": "~7.12.11",

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
@@ -88,7 +88,7 @@ export interface CallingHandlers extends CommonCallingHandlers {
8888
onStartCall: (participants: CommunicationIdentifier[], options?: StartCallOptions) => Call | undefined;
8989
}
9090

91-
// @beta
91+
// @public
9292
export type CallingHandlersOptions = {
9393
onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency>;
9494
};
@@ -364,7 +364,7 @@ export const useTeamsCall: () => undefined | /* @conditional-compile-remove(team
364364
// @beta
365365
export const useTeamsCallAgent: () => undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent;
366366

367-
// @beta
367+
// @public
368368
export type VideoBackgroundEffectsDependency = {
369369
createBackgroundBlurEffect: (config?: BackgroundBlurConfig) => BackgroundBlurEffect;
370370
createBackgroundReplacementEffect: (config: BackgroundReplacementConfig) => BackgroundReplacementEffect;

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

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
import { ActiveErrorMessage } from '@internal/react-components';
1010
import { AreEqual } from '@internal/acs-ui-common';
1111
import { AudioDeviceInfo } from '@azure/communication-calling';
12+
import { BackgroundBlurConfig } from '@azure/communication-calling';
13+
import { BackgroundBlurEffect } from '@azure/communication-calling';
14+
import { BackgroundReplacementConfig } from '@azure/communication-calling';
15+
import { BackgroundReplacementEffect } from '@azure/communication-calling';
1216
import { Call } from '@azure/communication-calling';
1317
import { CallAgent } from '@azure/communication-calling';
1418
import { CallClientState } from '@internal/calling-stateful-client';
@@ -76,6 +80,11 @@ export interface CallingHandlers extends CommonCallingHandlers {
7680
onStartCall: (participants: CommunicationIdentifier[], options?: StartCallOptions) => Call | undefined;
7781
}
7882

83+
// @public
84+
export type CallingHandlersOptions = {
85+
onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency>;
86+
};
87+
7988
// @public
8089
export const CallProvider: (props: CallProviderProps) => JSX.Element;
8190

@@ -126,6 +135,8 @@ export type CaptionsOptions = {
126135

127136
// @public
128137
export interface CommonCallingHandlers {
138+
// (undocumented)
139+
onBlurVideoBackground: (backgroundBlurConfig?: BackgroundBlurConfig) => Promise<void>;
129140
// (undocumented)
130141
onCreateLocalStreamView: (options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>;
131142
// (undocumented)
@@ -143,6 +154,10 @@ export interface CommonCallingHandlers {
143154
// (undocumented)
144155
onRemoveParticipant(userId: string): Promise<void>;
145156
// (undocumented)
157+
onRemoveVideoBackgroundEffects: () => Promise<void>;
158+
// (undocumented)
159+
onReplaceVideoBackground: (backgroundReplacementConfig: BackgroundReplacementConfig) => Promise<void>;
160+
// (undocumented)
146161
onSelectCamera: (device: VideoDeviceInfo, options?: VideoStreamOptions) => Promise<void>;
147162
// (undocumented)
148163
onSelectMicrophone: (device: AudioDeviceInfo) => Promise<void>;
@@ -173,7 +188,7 @@ export interface CommonCallingHandlers {
173188
}
174189

175190
// @public
176-
export type CreateDefaultCallingHandlers = (callClient: StatefulCallClient, callAgent: CallAgent | undefined, deviceManager: StatefulDeviceManager | undefined, call: Call | undefined) => CallingHandlers;
191+
export type CreateDefaultCallingHandlers = (callClient: StatefulCallClient, callAgent: CallAgent | undefined, deviceManager: StatefulDeviceManager | undefined, call: Call | undefined, /* @conditional-compile-remove(video-background-effects) */ options?: CallingHandlersOptions) => CallingHandlers;
177192

178193
// @public
179194
export const createDefaultCallingHandlers: CreateDefaultCallingHandlers;
@@ -282,6 +297,12 @@ export const useCallingSelector: <SelectorT extends (state: CallClientState, pro
282297
// @public
283298
export const useDeviceManager: () => StatefulDeviceManager | undefined;
284299

300+
// @public
301+
export type VideoBackgroundEffectsDependency = {
302+
createBackgroundBlurEffect: (config?: BackgroundBlurConfig) => BackgroundBlurEffect;
303+
createBackgroundReplacementEffect: (config: BackgroundReplacementConfig) => BackgroundReplacementEffect;
304+
};
305+
285306
// @internal (undocumented)
286307
export const _videoGalleryRemoteParticipantsMemo: (remoteParticipants: RemoteParticipantState[] | undefined) => VideoGalleryRemoteParticipant[];
287308

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export const areStreamsEqual = (prevStream: LocalVideoStream, newStream: LocalVi
120120
/**
121121
* Dependency type to be injected for video background effects
122122
*
123-
* @beta
123+
* @public
124124
*/
125125
export type VideoBackgroundEffectsDependency = {
126126
createBackgroundBlurEffect: (config?: BackgroundBlurConfig) => BackgroundBlurEffect;

0 commit comments

Comments
 (0)