Skip to content
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "minor",
"area": "feature",
"workstream": "Calling sounds",
"comment": "Stabilize the Calling sounds feature",
"packageName": "@azure/communication-react",
"email": "94866715+dmceachernmsft@users.noreply.github.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "minor",
"area": "feature",
"workstream": "Calling sounds",
"comment": "Stabilize the Calling sounds feature",
"packageName": "@azure/communication-react",
"email": "94866715+dmceachernmsft@users.noreply.github.com",
"dependentChangeType": "patch"
}
4 changes: 2 additions & 2 deletions common/config/babel/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ module.exports = {
"hide-attendee-name",
// custom branding for the composites
"custom-branding",
// Feature for sounds during different calling events
"calling-sounds",
// Feature for end of call survey
'end-of-call-survey',
// Feature for the DTMF dialer for Teams voice apps
Expand Down Expand Up @@ -134,5 +132,7 @@ module.exports = {
"control-bar-button-injection",
// rooms
"rooms",
// feature for calling sounds
"calling-sounds",
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ export type CallAdapterClientState = {
userId: CommunicationIdentifierKind;
displayName?: string;
call?: CallState;
targetCallees?: CommunicationIdentifier[];
devices: DeviceManagerState;
endedCall?: CallState;
isTeamsCall: boolean;
Expand All @@ -261,6 +262,7 @@ export type CallAdapterClientState = {
videoBackgroundImages?: VideoBackgroundImage[];
onResolveVideoEffectDependency?: () => Promise<VideoBackgroundEffectsDependency>;
selectedVideoBackgroundEffect?: VideoBackgroundEffect;
sounds?: CallingSounds;
};

// @public
Expand Down Expand Up @@ -426,6 +428,7 @@ export type CallCompositeIcons = {
NoticePageJoinCallFailedDueToNoNetwork?: JSX.Element;
NoticePageLeftCall?: JSX.Element;
NoticePageRemovedFromCall?: JSX.Element;
NoticePageCallRejected?: JSX.Element;
NoticePageNotInvitedToRoom?: JSX.Element;
NoticePageRoomNotFound?: JSX.Element;
NoticePageRoomNotValid?: JSX.Element;
Expand Down Expand Up @@ -477,6 +480,8 @@ export interface CallCompositeProps extends BaseCompositeProps<CallCompositeIcon
export interface CallCompositeStrings {
blurBackgroundEffectButtonLabel?: string;
blurBackgroundTooltip?: string;
callRejectedMoreDetails?: string;
callRejectedTitle: string;
callTimeoutDetails?: string;
callTimeoutTitle?: string;
cameraLabel: string;
Expand Down Expand Up @@ -649,6 +654,13 @@ export type CallingHandlersOptions = {
// @public
export type CallingReturnProps<Component extends (props: any) => JSX.Element> = GetCallingSelector<Component> extends (state: CallClientState, props: any) => any ? ReturnType<GetCallingSelector<Component>> & Common<CallingHandlers, Parameters<Component>[0]> : never;

// @public
export type CallingSounds = {
callEnded?: SoundEffect;
callRinging?: SoundEffect;
callBusy?: SoundEffect;
};

// @public
export interface CallingTheme {
// (undocumented)
Expand Down Expand Up @@ -1455,6 +1467,7 @@ export type CommonCallAdapterOptions = {
videoBackgroundImages?: VideoBackgroundImage[];
onResolveDependency?: () => Promise<VideoBackgroundEffectsDependency>;
};
callingSounds?: CallingSounds;
};

// @public
Expand Down Expand Up @@ -2010,6 +2023,7 @@ export const DEFAULT_COMPOSITE_ICONS: {
NoticePageJoinCallFailedDueToNoNetwork?: JSX.Element | undefined;
NoticePageLeftCall?: JSX.Element | undefined;
NoticePageRemovedFromCall?: JSX.Element | undefined;
NoticePageCallRejected?: JSX.Element | undefined;
NoticePageNotInvitedToRoom?: JSX.Element | undefined;
NoticePageRoomNotFound?: JSX.Element | undefined;
NoticePageRoomNotValid?: JSX.Element | undefined;
Expand Down Expand Up @@ -3016,6 +3030,11 @@ export interface SendBoxStylesProps extends BaseCustomStyles {
textFieldContainer?: IStyle;
}

// @public
export type SoundEffect = {
url: string;
};

// @public
export interface SpokenLanguageStrings {
// (undocumented)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import type { ChatMessage } from '@azure/communication-chat';
import { ChatParticipant } from '@azure/communication-chat';
import { ChatThreadClient } from '@azure/communication-chat';
import { ChatThreadClientState } from '@internal/chat-stateful-client';
import { CommunicationIdentifier } from '@azure/communication-common';
import { CommunicationIdentifierKind } from '@azure/communication-common';
import { CommunicationParticipant } from '@internal/react-components';
import { CommunicationTokenCredential } from '@azure/communication-common';
Expand Down Expand Up @@ -201,6 +202,7 @@ export type CallAdapterClientState = {
userId: CommunicationIdentifierKind;
displayName?: string;
call?: CallState;
targetCallees?: CommunicationIdentifier[];
devices: DeviceManagerState;
endedCall?: CallState;
isTeamsCall: boolean;
Expand All @@ -210,6 +212,7 @@ export type CallAdapterClientState = {
videoBackgroundImages?: VideoBackgroundImage[];
onResolveVideoEffectDependency?: () => Promise<VideoBackgroundEffectsDependency>;
selectedVideoBackgroundEffect?: VideoBackgroundEffect;
sounds?: CallingSounds;
};

// @public
Expand Down Expand Up @@ -328,6 +331,7 @@ export type CallCompositeIcons = {
NoticePageJoinCallFailedDueToNoNetwork?: JSX.Element;
NoticePageLeftCall?: JSX.Element;
NoticePageRemovedFromCall?: JSX.Element;
NoticePageCallRejected?: JSX.Element;
NoticePageNotInvitedToRoom?: JSX.Element;
NoticePageRoomNotFound?: JSX.Element;
NoticePageRoomNotValid?: JSX.Element;
Expand Down Expand Up @@ -379,6 +383,8 @@ export interface CallCompositeProps extends BaseCompositeProps<CallCompositeIcon
export interface CallCompositeStrings {
blurBackgroundEffectButtonLabel?: string;
blurBackgroundTooltip?: string;
callRejectedMoreDetails?: string;
callRejectedTitle: string;
callTimeoutDetails?: string;
callTimeoutTitle?: string;
cameraLabel: string;
Expand Down Expand Up @@ -511,6 +517,13 @@ export type CallIdChangedListener = (event: {
callId: string;
}) => void;

// @public
export type CallingSounds = {
callEnded?: SoundEffect;
callRinging?: SoundEffect;
callBusy?: SoundEffect;
};

// @public
export interface CallWithChatAdapter extends CallWithChatAdapterManagement, AdapterState<CallWithChatAdapterState>, Disposable_2, CallWithChatAdapterSubscriptions {
}
Expand Down Expand Up @@ -952,6 +965,7 @@ export type CommonCallAdapterOptions = {
videoBackgroundImages?: VideoBackgroundImage[];
onResolveDependency?: () => Promise<VideoBackgroundEffectsDependency>;
};
callingSounds?: CallingSounds;
};

// @public
Expand Down Expand Up @@ -1086,7 +1100,7 @@ export const createAzureCommunicationCallWithChatAdapterFromClients: ({ callClie
export const createAzureCommunicationChatAdapter: ({ endpoint: endpointUrl, userId, displayName, credential, threadId }: AzureCommunicationChatAdapterArgs) => Promise<ChatAdapter>;

// @public
export function createAzureCommunicationChatAdapterFromClient(chatClient: StatefulChatClient, chatThreadClient: ChatThreadClient, options?: {
export function createAzureCommunicationChatAdapterFromClient(chatClient: StatefulChatClient, chatThreadClient: ChatThreadClient, options?: {
credential?: CommunicationTokenCredential;
}): Promise<ChatAdapter>;

Expand Down Expand Up @@ -1179,6 +1193,7 @@ export const DEFAULT_COMPOSITE_ICONS: {
NoticePageJoinCallFailedDueToNoNetwork?: JSX.Element | undefined;
NoticePageLeftCall?: JSX.Element | undefined;
NoticePageRemovedFromCall?: JSX.Element | undefined;
NoticePageCallRejected?: JSX.Element | undefined;
NoticePageNotInvitedToRoom?: JSX.Element | undefined;
NoticePageRoomNotFound?: JSX.Element | undefined;
NoticePageRoomNotValid?: JSX.Element | undefined;
Expand Down Expand Up @@ -1488,6 +1503,11 @@ export interface RemoteVideoTileMenuOptions {
isHidden?: boolean;
}

// @public
export type SoundEffect = {
url: string;
};

// @public
export type TeamsAdapterOptions = CommonCallAdapterOptions;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('Adapter is created as expected', () => {
const mockCallClient = new MockCallClient() as unknown as StatefulCallClient;

const mockCallAgent = new MockCallAgent();
const locator = { participantIds: ['some user id'] };
const locator = { groupId: 'some group id' };
Comment thread
JamesBurnside marked this conversation as resolved.

const adapter = await createAzureCommunicationCallAdapterFromClient(mockCallClient, mockCallAgent, locator);
expect(adapter).toBeDefined();
Expand All @@ -30,7 +30,7 @@ describe('Adapter is created as expected', () => {
const mockCallClient = new MockCallClient() as unknown as StatefulCallClient;

const mockCallAgent = new MockCallAgent();
const locator = { participantIds: ['some user id'] };
const locator = { groupId: 'some group id' };
const options: CommonCallAdapterOptions = {
callingSounds: {
callEnded: { url: 'test/url/ended' },
Expand Down Expand Up @@ -59,7 +59,7 @@ describe('Adapter is created as expected', () => {
const mockCallClient = new MockCallClient() as unknown as StatefulCallClient;

const mockCallAgent = new MockCallAgent();
const locator = { participantIds: ['some user id'] };
const locator = { groupId: 'some group id' };
const options: CommonCallAdapterOptions = {
callingSounds: {
callEnded: { url: 'test/url/ended' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,9 @@ import { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react
import type { CommunicationIdentifierKind } from '@azure/communication-common';
/* @conditional-compile-remove(PSTN-calls) */
import { AddPhoneNumberOptions, DtmfTone } from '@azure/communication-calling';

import { CommunicationIdentifier } from '@azure/communication-common';
/* @conditional-compile-remove(PSTN-calls) */
import type {
CommunicationIdentifier,
CommunicationUserIdentifier,
PhoneNumberIdentifier
} from '@azure/communication-common';
import type { CommunicationUserIdentifier, PhoneNumberIdentifier } from '@azure/communication-common';
import type { AdapterState, Disposable, AdapterError, AdapterErrors } from '../../common/adapters';
/* @conditional-compile-remove(video-background-effects) */
import { VideoBackgroundEffectsDependency } from '@internal/calling-component-bindings';
Expand Down Expand Up @@ -285,7 +281,7 @@ export interface VideoBackgroundImage {
}

/**
* @beta
* @public
* Type for representing a custom sound to use for a calling event
*/
export type SoundEffect = {
Expand All @@ -296,7 +292,7 @@ export type SoundEffect = {
};

/**
* @beta
* @public
* Type for representing a set of sounds to use for different calling events
*/
export type CallingSounds = {
Expand Down