@azure/communication-react 1.9.0-alpha-202310201708 → 1.9.0-alpha-202310230329

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,5 +2,5 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT License.
4
4
  // GENERATED FILE. DO NOT EDIT MANUALLY.
5
- module.exports = '1.9.0-alpha-202310201708';
5
+ module.exports = '1.9.0-alpha-202310230329';
6
6
  //# sourceMappingURL=telemetryVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,0BAA0B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.9.0-alpha-202310201708';\n"]}
1
+ {"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,0BAA0B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.9.0-alpha-202310230329';\n"]}
@@ -19,5 +19,4 @@ export type { CaptionsReceivedListener, IsCaptionsActiveChangedListener, IsCapti
19
19
  export type { TransferRequestedListener } from './adapter';
20
20
  export type { CapabilitiesChangedListener } from './adapter';
21
21
  export type { CapabilityChangedNotificationStrings } from './components/CapabilitiesChangedNotificationBar';
22
- export * from './MockCallAdapter';
23
22
  //# sourceMappingURL=index.d.ts.map
@@ -5,5 +5,4 @@ export * from './Strings';
5
5
  export { createAzureCommunicationCallAdapter, createAzureCommunicationCallAdapterFromClient, useAzureCommunicationCallAdapter } from './adapter';
6
6
  /* @conditional-compile-remove(teams-identity-support) */
7
7
  export { createTeamsCallAdapter, createTeamsCallAdapterFromClient, useTeamsCallAdapter } from './adapter';
8
- export * from './MockCallAdapter';
9
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallComposite/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAUhD,cAAc,WAAW,CAAC;AAE1B,OAAO,EACL,mCAAmC,EACnC,6CAA6C,EAC7C,gCAAgC,EACjC,MAAM,WAAW,CAAC;AAEnB,yDAAyD;AACzD,OAAO,EAAE,sBAAsB,EAAE,gCAAgC,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAwE1G,cAAc,mBAAmB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { CallComposite } from './CallComposite';\nexport type { CallCompositeOptions, CallCompositeProps } from './CallComposite';\n/* @conditional-compile-remove(call-readiness) */\nexport type { DeviceCheckOptions } from './CallComposite';\n/* @conditional-compile-remove(pinned-participants) */\nexport type { RemoteVideoTileMenuOptions } from './CallComposite';\n/* @conditional-compile-remove(click-to-call) */\nexport type { LocalVideoTileOptions } from './CallComposite';\nexport type { CallControlOptions } from './types/CallControlOptions';\n\nexport * from './Strings';\n\nexport {\n createAzureCommunicationCallAdapter,\n createAzureCommunicationCallAdapterFromClient,\n useAzureCommunicationCallAdapter\n} from './adapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport { createTeamsCallAdapter, createTeamsCallAdapterFromClient, useTeamsCallAdapter } from './adapter';\n\nexport type { TeamsAdapterOptions } from './adapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallAdapter, TeamsCallAdapterArgs, Profile, OnFetchProfileCallback } from './adapter';\n\nexport type {\n AzureCommunicationCallAdapterArgs,\n CallAdapterLocator,\n CommonCallAdapter,\n CallAdapterCallOperations\n} from './adapter';\n\n/* @conditional-compile-remove(video-background-effects) */\nexport type { AzureCommunicationCallAdapterOptions } from './adapter';\n\n/* @conditional-compile-remove(video-background-effects) */\nexport type { CommonCallAdapterOptions } from './adapter';\n\n/* @conditional-compile-remove(teams-adhoc-call) */\nexport type { CallParticipantsLocator } from './adapter';\n\n/* @conditional-compile-remove(video-background-effects) */\nexport type {\n VideoBackgroundImage,\n VideoBackgroundEffect,\n VideoBackgroundNoEffect,\n VideoBackgroundBlurEffect,\n VideoBackgroundReplacementEffect\n} from './adapter/CallAdapter';\n\nexport type {\n CallAdapter,\n CallAdapterCallEndedEvent,\n CallAdapterCallManagement,\n CallAdapterClientState,\n CallAdapterDeviceManagement,\n CallAdapterState,\n CallAdapterSubscribers,\n CallAdapterUiState,\n CallCompositePage,\n CallEndedListener,\n CallIdChangedListener,\n DiagnosticChangedEventListner,\n DisplayNameChangedListener,\n IsLocalScreenSharingActiveChangedListener,\n IsMutedChangedListener,\n IsSpeakingChangedListener,\n MediaDiagnosticChangedEvent,\n NetworkDiagnosticChangedEvent,\n ParticipantsJoinedListener,\n ParticipantsLeftListener,\n JoinCallOptions\n} from './adapter';\n\n/* @conditional-compile-remove(close-captions) */\nexport type {\n CaptionsReceivedListener,\n IsCaptionsActiveChangedListener,\n IsCaptionLanguageChangedListener,\n IsSpokenLanguageChangedListener\n} from './adapter';\n\n/* @conditional-compile-remove(call-transfer) */\nexport type { TransferRequestedListener } from './adapter';\n\n/* @conditional-compile-remove(capabilities) */\nexport type { CapabilitiesChangedListener } from './adapter';\n/* @conditional-compile-remove(capabilities) */\nexport type { CapabilityChangedNotificationStrings } from './components/CapabilitiesChangedNotificationBar';\n\nexport * from './MockCallAdapter';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallComposite/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAUhD,cAAc,WAAW,CAAC;AAE1B,OAAO,EACL,mCAAmC,EACnC,6CAA6C,EAC7C,gCAAgC,EACjC,MAAM,WAAW,CAAC;AAEnB,yDAAyD;AACzD,OAAO,EAAE,sBAAsB,EAAE,gCAAgC,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { CallComposite } from './CallComposite';\nexport type { CallCompositeOptions, CallCompositeProps } from './CallComposite';\n/* @conditional-compile-remove(call-readiness) */\nexport type { DeviceCheckOptions } from './CallComposite';\n/* @conditional-compile-remove(pinned-participants) */\nexport type { RemoteVideoTileMenuOptions } from './CallComposite';\n/* @conditional-compile-remove(click-to-call) */\nexport type { LocalVideoTileOptions } from './CallComposite';\nexport type { CallControlOptions } from './types/CallControlOptions';\n\nexport * from './Strings';\n\nexport {\n createAzureCommunicationCallAdapter,\n createAzureCommunicationCallAdapterFromClient,\n useAzureCommunicationCallAdapter\n} from './adapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport { createTeamsCallAdapter, createTeamsCallAdapterFromClient, useTeamsCallAdapter } from './adapter';\n\nexport type { TeamsAdapterOptions } from './adapter';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallAdapter, TeamsCallAdapterArgs, Profile, OnFetchProfileCallback } from './adapter';\n\nexport type {\n AzureCommunicationCallAdapterArgs,\n CallAdapterLocator,\n CommonCallAdapter,\n CallAdapterCallOperations\n} from './adapter';\n\n/* @conditional-compile-remove(video-background-effects) */\nexport type { AzureCommunicationCallAdapterOptions } from './adapter';\n\n/* @conditional-compile-remove(video-background-effects) */\nexport type { CommonCallAdapterOptions } from './adapter';\n\n/* @conditional-compile-remove(teams-adhoc-call) */\nexport type { CallParticipantsLocator } from './adapter';\n\n/* @conditional-compile-remove(video-background-effects) */\nexport type {\n VideoBackgroundImage,\n VideoBackgroundEffect,\n VideoBackgroundNoEffect,\n VideoBackgroundBlurEffect,\n VideoBackgroundReplacementEffect\n} from './adapter/CallAdapter';\n\nexport type {\n CallAdapter,\n CallAdapterCallEndedEvent,\n CallAdapterCallManagement,\n CallAdapterClientState,\n CallAdapterDeviceManagement,\n CallAdapterState,\n CallAdapterSubscribers,\n CallAdapterUiState,\n CallCompositePage,\n CallEndedListener,\n CallIdChangedListener,\n DiagnosticChangedEventListner,\n DisplayNameChangedListener,\n IsLocalScreenSharingActiveChangedListener,\n IsMutedChangedListener,\n IsSpeakingChangedListener,\n MediaDiagnosticChangedEvent,\n NetworkDiagnosticChangedEvent,\n ParticipantsJoinedListener,\n ParticipantsLeftListener,\n JoinCallOptions\n} from './adapter';\n\n/* @conditional-compile-remove(close-captions) */\nexport type {\n CaptionsReceivedListener,\n IsCaptionsActiveChangedListener,\n IsCaptionLanguageChangedListener,\n IsSpokenLanguageChangedListener\n} from './adapter';\n\n/* @conditional-compile-remove(call-transfer) */\nexport type { TransferRequestedListener } from './adapter';\n\n/* @conditional-compile-remove(capabilities) */\nexport type { CapabilitiesChangedListener } from './adapter';\n/* @conditional-compile-remove(capabilities) */\nexport type { CapabilityChangedNotificationStrings } from './components/CapabilitiesChangedNotificationBar';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/communication-react",
3
- "version": "1.9.0-alpha-202310201708",
3
+ "version": "1.9.0-alpha-202310230329",
4
4
  "sideEffects": false,
5
5
  "description": "React library for building modern communication user experiences utilizing Azure Communication Services",
6
6
  "keywords": [
@@ -67,7 +67,7 @@
67
67
  "copy-preprocess": "cpx \"../*/preprocessed/**\" ./preprocess-dist && renamer --find preprocessed --replace src ./preprocess-dist/**/*",
68
68
  "build": "rushx check-deps && rushx _by-flavor \"rushx _build:by-flavor\"",
69
69
  "build:cjs": "rollup -c --silent",
70
- "build:esm": "rushx _if-preprocess && rushx copy-original && rushx preprocess && rushx copy-preprocess && ttsc -project tsconfig.preprocess.json || (if-env COMMUNICATION_REACT_FLAVOR=beta && ttsc)",
70
+ "build:esm": "npm run _if-preprocess && rushx copy-original && rushx preprocess && rushx copy-preprocess && ttsc -project tsconfig.preprocess.json || (if-env COMMUNICATION_REACT_FLAVOR=beta && ttsc)",
71
71
  "build:watch": "",
72
72
  "clean": "rimraf dist && rimraf ../**/preprocessed && rimraf ../**/preprocess-dist",
73
73
  "test": "",
@@ -90,73 +90,5 @@
90
90
  "_build:by-flavor": "rushx clean && rushx build:esm && rushx build:cjs && rushx _api-extractor:by-flavor",
91
91
  "_current-flavor": "echo You are running under COMMUNICATION_REACT_FLAVOR: && env-cmd -f ../../common/config/env/.env node -p process.env.COMMUNICATION_REACT_FLAVOR",
92
92
  "_by-flavor": "rushx _current-flavor && env-cmd -f ../../common/config/env/.env --use-shell"
93
- },
94
- "devDependencies": {
95
- "@azure/communication-calling": "1.18.2-beta.1",
96
- "@azure/communication-calling-effects": "1.0.1",
97
- "@azure/communication-chat": "1.4.0-beta.2",
98
- "@azure/core-auth": "^1.4.0",
99
- "@babel/cli": "^7.16.0",
100
- "@babel/core": "^7.16.0",
101
- "@internal/calling-component-bindings": "1.9.0-alpha-202310201708",
102
- "@internal/calling-stateful-client": "1.9.0-alpha-202310201708",
103
- "@internal/chat-component-bindings": "1.9.0-alpha-202310201708",
104
- "@internal/chat-stateful-client": "1.9.0-alpha-202310201708",
105
- "@internal/fake-backends": "1.9.0-alpha-202310201708",
106
- "@internal/react-components": "1.9.0-alpha-202310201708",
107
- "@internal/react-composites": "1.9.0-alpha-202310201708",
108
- "@microsoft/api-documenter": "~7.23.9",
109
- "@microsoft/api-extractor": "~7.38.0",
110
- "@rollup/plugin-json": "^4.1.0",
111
- "@testing-library/jest-dom": "^5.16.5",
112
- "@testing-library/react": "^14.0.0",
113
- "@types/dompurify": "^3.0.2",
114
- "@types/jest": "^29.5.2",
115
- "@types/json-stringify-safe": "^5.0.0",
116
- "@types/node": "^16.11.7",
117
- "@types/react-dom": "18.2.14",
118
- "@types/react-linkify": "^1.0.0",
119
- "@types/react": "18.2.29",
120
- "@types/uuid": "^9.0.6",
121
- "@typescript-eslint/eslint-plugin": "^4.12.0",
122
- "@typescript-eslint/parser": "^4.12.0",
123
- "@zerollup/ts-transform-paths": "^1.7.18",
124
- "ajv": "^8.12.0",
125
- "copyfiles": "^2.4.1",
126
- "cpx": "^1.5.0",
127
- "cross-env": "^7.0.3",
128
- "env-cmd": "^10.1.0",
129
- "eslint-config-prettier": "^6.12.0",
130
- "eslint-plugin-header": "^3.1.0",
131
- "eslint-plugin-import": "^2.22.1",
132
- "eslint-plugin-jsx-a11y": "^6.3.1",
133
- "eslint-plugin-prettier": "^3.1.4",
134
- "eslint-plugin-react-hooks": "^4.1.2",
135
- "eslint-plugin-react": "^7.18.3",
136
- "eslint": "^7.7.0",
137
- "if-env": "^1.0.4",
138
- "jest": "29.7.0",
139
- "json-stringify-safe": "^5.0.1",
140
- "node-forge": ">=1.0.0",
141
- "prettier": "2.3.1",
142
- "pretty-quick": "^3.1.0",
143
- "react-dom": "18.2.0",
144
- "react-is": "^17.0.1",
145
- "react": "18.2.0",
146
- "regenerator-runtime": "^0.14.0",
147
- "renamer": "^4.0.0",
148
- "rimraf": "^2.6.2",
149
- "rollup": "^2.42.4",
150
- "scheduler": "^0.23.0",
151
- "source-map-explorer": "^2.5.0",
152
- "styled-components": "^5.2.1",
153
- "ts-jest": "^29.1.0",
154
- "ts-node": "^10.9.1",
155
- "ttypescript": "^1.5.12",
156
- "type-fest": "^2.5.4",
157
- "typescript": "4.3.5"
158
- },
159
- "beachball": {
160
- "shouldPublish": false
161
93
  }
162
94
  }
@@ -1,61 +0,0 @@
1
- import { AudioDeviceInfo, Call, DtmfTone, ParticipantRole, PermissionConstraints, VideoDeviceInfo } from '@azure/communication-calling';
2
- import { EnvironmentInfo } from '@azure/communication-calling';
3
- import type { CallAdapter, CallAdapterState } from './adapter';
4
- /**
5
- * Temporary copy of the packages/react-composites/tests/browser/call/app/mocks/MockCallAdapter.ts
6
- * @internal
7
- */
8
- export declare class _MockCallAdapter implements CallAdapter {
9
- constructor(testState: {
10
- askDevicePermission?: (constrain: PermissionConstraints) => Promise<void>;
11
- localParticipantRole?: ParticipantRole;
12
- });
13
- state: CallAdapterState;
14
- private emitter;
15
- setState(state: CallAdapterState): void;
16
- addParticipant(): Promise<void>;
17
- onStateChange(handler: (state: CallAdapterState) => void): void;
18
- offStateChange(handler: (state: CallAdapterState) => void): void;
19
- allowUnsupportedBrowserVersion(): void;
20
- getState(): CallAdapterState;
21
- dispose(): void;
22
- joinCall(): Call | undefined;
23
- leaveCall(): Promise<void>;
24
- startCamera(): Promise<void>;
25
- stopCamera(): Promise<void>;
26
- mute(): Promise<void>;
27
- unmute(): Promise<void>;
28
- startCall(): Call | undefined;
29
- holdCall(): Promise<void>;
30
- resumeCall(): Promise<void>;
31
- startScreenShare(): Promise<void>;
32
- stopScreenShare(): Promise<void>;
33
- raiseHand(): Promise<void>;
34
- lowerHand(): Promise<void>;
35
- removeParticipant(): Promise<void>;
36
- createStreamView(): Promise<void>;
37
- disposeStreamView(): Promise<void>;
38
- disposeScreenShareStreamView(): Promise<void>;
39
- disposeLocalVideoStreamView(): Promise<void>;
40
- disposeRemoteVideoStreamView(): Promise<void>;
41
- askDevicePermission(constrain: PermissionConstraints): Promise<void>;
42
- queryCameras(): Promise<VideoDeviceInfo[]>;
43
- queryMicrophones(): Promise<AudioDeviceInfo[]>;
44
- querySpeakers(): Promise<AudioDeviceInfo[]>;
45
- setCamera(): Promise<void>;
46
- setMicrophone(): Promise<void>;
47
- setSpeaker(): Promise<void>;
48
- sendDtmfTone(dtmfTone: DtmfTone): Promise<void>;
49
- on(): void;
50
- off(): void;
51
- getEnvironmentInfo(): Promise<EnvironmentInfo>;
52
- startCaptions(): Promise<void>;
53
- setCaptionLanguage(): Promise<void>;
54
- setSpokenLanguage(): Promise<void>;
55
- stopCaptions(): Promise<void>;
56
- startVideoBackgroundEffect(): Promise<void>;
57
- stopVideoBackgroundEffects(): Promise<void>;
58
- updateBackgroundPickerImages(): void;
59
- updateSelectedVideoBackgroundEffect(): void;
60
- }
61
- //# sourceMappingURL=MockCallAdapter.d.ts.map
@@ -1,255 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
4
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5
- return new (P || (P = Promise))(function (resolve, reject) {
6
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
7
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
8
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
9
- step((generator = generator.apply(thisArg, _arguments || [])).next());
10
- });
11
- };
12
- /* @conditional-compile-remove(teams-identity-support) */
13
- import { CallKind } from '@azure/communication-calling';
14
- import { EventEmitter } from 'events';
15
- /**
16
- * Temporary copy of the packages/react-composites/tests/browser/call/app/mocks/MockCallAdapter.ts
17
- * @internal
18
- */
19
- // TODO: Remove this simplified copy of the MockCallAdapter when the original MockCallAdapter is moved to fake-backends package and can be imported
20
- export class _MockCallAdapter {
21
- constructor(testState) {
22
- this.emitter = new EventEmitter();
23
- this.state = Object.assign({}, createDefaultCallAdapterState(/* @conditional-compile-remove(rooms) */ testState.localParticipantRole));
24
- if (testState.askDevicePermission) {
25
- this.askDevicePermission = testState.askDevicePermission;
26
- }
27
- }
28
- setState(state) {
29
- this.state = state;
30
- this.emitter.emit('stateChanged', state);
31
- }
32
- addParticipant() {
33
- throw Error('addParticipant not implemented');
34
- }
35
- onStateChange(handler) {
36
- this.emitter.addListener('stateChanged', handler);
37
- }
38
- offStateChange(handler) {
39
- this.emitter.removeListener('stateChanged', handler);
40
- }
41
- allowUnsupportedBrowserVersion() {
42
- throw Error('allowWithUnsupportedBrowserVersion not implemented');
43
- }
44
- getState() {
45
- return this.state;
46
- }
47
- dispose() {
48
- throw Error('dispose not implemented');
49
- }
50
- joinCall() {
51
- throw Error('joinCall not implemented');
52
- }
53
- leaveCall() {
54
- throw Error('leaveCall not implemented');
55
- }
56
- startCamera() {
57
- throw Error('leaveCall not implemented');
58
- }
59
- stopCamera() {
60
- throw Error('stopCamera not implemented');
61
- }
62
- mute() {
63
- throw Error('mute not implemented');
64
- }
65
- unmute() {
66
- throw Error('unmute not implemented');
67
- }
68
- startCall() {
69
- throw Error('startCall not implemented');
70
- }
71
- holdCall() {
72
- return Promise.resolve();
73
- }
74
- resumeCall() {
75
- return Promise.resolve();
76
- }
77
- startScreenShare() {
78
- throw Error('startScreenShare not implemented');
79
- }
80
- stopScreenShare() {
81
- throw Error('stopScreenShare not implemented');
82
- }
83
- /* @conditional-compile-remove(raise-hand) */
84
- raiseHand() {
85
- throw Error('raiseHand not implemented');
86
- }
87
- /* @conditional-compile-remove(raise-hand) */
88
- lowerHand() {
89
- throw Error('lowerHand not implemented');
90
- }
91
- removeParticipant() {
92
- throw Error('removeParticipant not implemented');
93
- }
94
- createStreamView() {
95
- throw Error('createStreamView not implemented');
96
- }
97
- disposeStreamView() {
98
- return Promise.resolve();
99
- }
100
- disposeScreenShareStreamView() {
101
- return Promise.resolve();
102
- }
103
- disposeLocalVideoStreamView() {
104
- return Promise.resolve();
105
- }
106
- disposeRemoteVideoStreamView() {
107
- return Promise.resolve();
108
- }
109
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
110
- askDevicePermission(constrain) {
111
- throw Error('askDevicePermission not implemented');
112
- }
113
- queryCameras() {
114
- return __awaiter(this, void 0, void 0, function* () {
115
- return [];
116
- });
117
- }
118
- queryMicrophones() {
119
- return __awaiter(this, void 0, void 0, function* () {
120
- return [];
121
- });
122
- }
123
- querySpeakers() {
124
- return __awaiter(this, void 0, void 0, function* () {
125
- return [];
126
- });
127
- }
128
- setCamera() {
129
- throw Error('setCamera not implemented');
130
- }
131
- setMicrophone() {
132
- throw Error('setMicrophone not implemented');
133
- }
134
- setSpeaker() {
135
- throw Error('setSpeaker not implemented');
136
- }
137
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
138
- sendDtmfTone(dtmfTone) {
139
- throw Error('sendDtmfTone not implemented');
140
- }
141
- on() {
142
- throw Error('on not implemented');
143
- }
144
- off() {
145
- throw Error('off not implemented');
146
- }
147
- /* @conditional-compile-remove(PSTN-calls) */
148
- getEnvironmentInfo() {
149
- throw Error('getEnvironmentInfo not implemented');
150
- }
151
- /* @conditional-compile-remove(close-captions) */
152
- startCaptions() {
153
- throw Error('start captions not implemented');
154
- }
155
- /* @conditional-compile-remove(close-captions) */
156
- setCaptionLanguage() {
157
- throw Error('setCaptionLanguage not implemented');
158
- }
159
- /* @conditional-compile-remove(close-captions) */
160
- setSpokenLanguage() {
161
- throw Error('setSpokenLanguage not implemented');
162
- }
163
- /* @conditional-compile-remove(close-captions) */
164
- stopCaptions() {
165
- throw Error('stopCaptions not implemented');
166
- }
167
- /* @conditional-compile-remove(video-background-effects) */
168
- startVideoBackgroundEffect() {
169
- throw new Error('startVideoBackgroundEffect not implemented.');
170
- }
171
- /* @conditional-compile-remove(video-background-effects) */
172
- stopVideoBackgroundEffects() {
173
- throw new Error('stopVideoBackgroundEffects not implemented.');
174
- }
175
- /* @conditional-compile-remove(video-background-effects) */
176
- updateBackgroundPickerImages() {
177
- throw new Error('updateBackgroundPickerImages not implemented.');
178
- }
179
- /* @conditional-compile-remove(video-background-effects) */
180
- updateSelectedVideoBackgroundEffect() {
181
- throw new Error('updateSelectedVideoBackgroundEffect not implemented.');
182
- }
183
- }
184
- /**
185
- * Default call adapter state that the {@link _MockCallAdapter} class is initialized with an optional role.
186
- */
187
- const createDefaultCallAdapterState = (role) => {
188
- return {
189
- displayName: 'Agnes Thompson',
190
- isLocalPreviewMicrophoneEnabled: true,
191
- page: 'call',
192
- call: {
193
- id: 'call1',
194
- /* @conditional-compile-remove(teams-identity-support) */
195
- kind: CallKind.Call,
196
- callerInfo: { displayName: 'caller', identifier: { kind: 'communicationUser', communicationUserId: '1' } },
197
- direction: 'Incoming',
198
- transcription: { isTranscriptionActive: false },
199
- recording: { isRecordingActive: false },
200
- startTime: new Date(500000000000),
201
- endTime: new Date(500000000000),
202
- diagnostics: { network: { latest: {} }, media: { latest: {} } },
203
- state: 'Connected',
204
- localVideoStreams: [],
205
- isMuted: false,
206
- isScreenSharingOn: false,
207
- remoteParticipants: {},
208
- remoteParticipantsEnded: {},
209
- /* @conditional-compile-remove(raise-hand) */
210
- raiseHand: { raisedHands: [] },
211
- /* @conditional-compile-remove(rooms) */
212
- role,
213
- /* @conditional-compile-remove(close-captions) */
214
- captionsFeature: {
215
- captions: [],
216
- supportedSpokenLanguages: [],
217
- supportedCaptionLanguages: [],
218
- currentCaptionLanguage: '',
219
- currentSpokenLanguage: '',
220
- isCaptionsFeatureActive: false,
221
- startCaptionsInProgress: false
222
- },
223
- /* @conditional-compile-remove(call-transfer) */
224
- transfer: {
225
- acceptedTransfers: {}
226
- },
227
- /* @conditional-compile-remove(optimal-video-count) */
228
- optimalVideoCount: {
229
- maxRemoteVideoStreams: 4
230
- }
231
- },
232
- userId: { kind: 'communicationUser', communicationUserId: '1' },
233
- devices: {
234
- isSpeakerSelectionAvailable: true,
235
- selectedCamera: { id: 'camera1', name: '1st Camera', deviceType: 'UsbCamera' },
236
- cameras: [{ id: 'camera1', name: '1st Camera', deviceType: 'UsbCamera' }],
237
- selectedMicrophone: {
238
- id: 'microphone1',
239
- name: '1st Microphone',
240
- deviceType: 'Microphone',
241
- isSystemDefault: true
242
- },
243
- microphones: [{ id: 'microphone1', name: '1st Microphone', deviceType: 'Microphone', isSystemDefault: true }],
244
- selectedSpeaker: { id: 'speaker1', name: '1st Speaker', deviceType: 'Speaker', isSystemDefault: true },
245
- speakers: [{ id: 'speaker1', name: '1st Speaker', deviceType: 'Speaker', isSystemDefault: true }],
246
- unparentedViews: [],
247
- deviceAccess: { video: true, audio: true }
248
- },
249
- isTeamsCall: false,
250
- /* @conditional-compile-remove(rooms) */
251
- isRoomsCall: false,
252
- latestErrors: {}
253
- };
254
- };
255
- //# sourceMappingURL=MockCallAdapter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MockCallAdapter.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallComposite/MockCallAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAUlC,yDAAyD;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAGxD,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGtC;;;GAGG;AACH,mJAAmJ;AACnJ,MAAM,OAAO,gBAAgB;IAC3B,YAAY,SAGX;QAYO,YAAO,GAAG,IAAI,YAAY,EAAE,CAAC;QAXnC,IAAI,CAAC,KAAK,qBACL,6BAA6B,CAAC,wCAAwC,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAC1G,CAAC;QAEF,IAAI,SAAS,CAAC,mBAAmB,EAAE;YACjC,IAAI,CAAC,mBAAmB,GAAG,SAAS,CAAC,mBAAmB,CAAC;SAC1D;IACH,CAAC;IAMD,QAAQ,CAAC,KAAuB;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED,cAAc;QACZ,MAAM,KAAK,CAAC,gCAAgC,CAAC,CAAC;IAChD,CAAC;IACD,aAAa,CAAC,OAA0C;QACtD,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;IACpD,CAAC;IACD,cAAc,CAAC,OAA0C;QACvD,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IACD,8BAA8B;QAC5B,MAAM,KAAK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UAAU,EAAE,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,IAAI,EAAE;YACtG,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;YACjG,eAAe,EAAE,EAAE;YACnB,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;SAC3C;QACD,WAAW,EAAE,KAAK;QAClB,wCAAwC;QACxC,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,EAAE;KACjB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n AudioDeviceInfo,\n Call,\n DtmfTone,\n ParticipantRole,\n PermissionConstraints,\n VideoDeviceInfo\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { CallKind } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\nimport { EventEmitter } from 'events';\nimport type { CallAdapter, CallAdapterState } from './adapter';\n\n/**\n * Temporary copy of the packages/react-composites/tests/browser/call/app/mocks/MockCallAdapter.ts\n * @internal\n */\n// TODO: Remove this simplified copy of the MockCallAdapter when the original MockCallAdapter is moved to fake-backends package and can be imported\nexport class _MockCallAdapter implements CallAdapter {\n constructor(testState: {\n askDevicePermission?: (constrain: PermissionConstraints) => Promise<void>;\n localParticipantRole?: ParticipantRole;\n }) {\n this.state = {\n ...createDefaultCallAdapterState(/* @conditional-compile-remove(rooms) */ testState.localParticipantRole)\n };\n\n if (testState.askDevicePermission) {\n this.askDevicePermission = testState.askDevicePermission;\n }\n }\n\n state: CallAdapterState;\n\n private emitter = new EventEmitter();\n\n setState(state: CallAdapterState): void {\n this.state = state;\n this.emitter.emit('stateChanged', state);\n }\n\n addParticipant(): Promise<void> {\n throw Error('addParticipant not implemented');\n }\n onStateChange(handler: (state: CallAdapterState) => void): void {\n this.emitter.addListener('stateChanged', handler);\n }\n offStateChange(handler: (state: CallAdapterState) => void): void {\n this.emitter.removeListener('stateChanged', handler);\n }\n allowUnsupportedBrowserVersion(): void {\n throw Error('allowWithUnsupportedBrowserVersion not implemented');\n }\n getState(): CallAdapterState {\n return this.state;\n }\n dispose(): void {\n throw Error('dispose not implemented');\n }\n joinCall(): Call | undefined {\n throw Error('joinCall not implemented');\n }\n leaveCall(): Promise<void> {\n throw Error('leaveCall not implemented');\n }\n startCamera(): Promise<void> {\n throw Error('leaveCall not implemented');\n }\n stopCamera(): Promise<void> {\n throw Error('stopCamera not implemented');\n }\n mute(): Promise<void> {\n throw Error('mute not implemented');\n }\n unmute(): Promise<void> {\n throw Error('unmute not implemented');\n }\n startCall(): Call | undefined {\n throw Error('startCall not implemented');\n }\n holdCall(): Promise<void> {\n return Promise.resolve();\n }\n resumeCall(): Promise<void> {\n return Promise.resolve();\n }\n startScreenShare(): Promise<void> {\n throw Error('startScreenShare not implemented');\n }\n stopScreenShare(): Promise<void> {\n throw Error('stopScreenShare not implemented');\n }\n /* @conditional-compile-remove(raise-hand) */\n raiseHand(): Promise<void> {\n throw Error('raiseHand not implemented');\n }\n /* @conditional-compile-remove(raise-hand) */\n lowerHand(): Promise<void> {\n throw Error('lowerHand not implemented');\n }\n removeParticipant(): Promise<void> {\n throw Error('removeParticipant not implemented');\n }\n createStreamView(): Promise<void> {\n throw Error('createStreamView not implemented');\n }\n disposeStreamView(): Promise<void> {\n return Promise.resolve();\n }\n disposeScreenShareStreamView(): Promise<void> {\n return Promise.resolve();\n }\n disposeLocalVideoStreamView(): Promise<void> {\n return Promise.resolve();\n }\n disposeRemoteVideoStreamView(): Promise<void> {\n return Promise.resolve();\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n askDevicePermission(constrain: PermissionConstraints): Promise<void> {\n throw Error('askDevicePermission not implemented');\n }\n async queryCameras(): Promise<VideoDeviceInfo[]> {\n return [];\n }\n async queryMicrophones(): Promise<AudioDeviceInfo[]> {\n return [];\n }\n async querySpeakers(): Promise<AudioDeviceInfo[]> {\n return [];\n }\n setCamera(): Promise<void> {\n throw Error('setCamera not implemented');\n }\n setMicrophone(): Promise<void> {\n throw Error('setMicrophone not implemented');\n }\n setSpeaker(): Promise<void> {\n throw Error('setSpeaker not implemented');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n sendDtmfTone(dtmfTone: DtmfTone): Promise<void> {\n throw Error('sendDtmfTone not implemented');\n }\n on(): void {\n throw Error('on not implemented');\n }\n off(): void {\n throw Error('off not implemented');\n }\n /* @conditional-compile-remove(PSTN-calls) */\n getEnvironmentInfo(): Promise<EnvironmentInfo> {\n throw Error('getEnvironmentInfo not implemented');\n }\n\n /* @conditional-compile-remove(close-captions) */\n startCaptions(): Promise<void> {\n throw Error('start captions not implemented');\n }\n\n /* @conditional-compile-remove(close-captions) */\n setCaptionLanguage(): Promise<void> {\n throw Error('setCaptionLanguage not implemented');\n }\n\n /* @conditional-compile-remove(close-captions) */\n setSpokenLanguage(): Promise<void> {\n throw Error('setSpokenLanguage not implemented');\n }\n\n /* @conditional-compile-remove(close-captions) */\n stopCaptions(): Promise<void> {\n throw Error('stopCaptions not implemented');\n }\n /* @conditional-compile-remove(video-background-effects) */\n startVideoBackgroundEffect(): Promise<void> {\n throw new Error('startVideoBackgroundEffect not implemented.');\n }\n\n /* @conditional-compile-remove(video-background-effects) */\n stopVideoBackgroundEffects(): Promise<void> {\n throw new Error('stopVideoBackgroundEffects not implemented.');\n }\n /* @conditional-compile-remove(video-background-effects) */\n updateBackgroundPickerImages(): void {\n throw new Error('updateBackgroundPickerImages not implemented.');\n }\n /* @conditional-compile-remove(video-background-effects) */\n public updateSelectedVideoBackgroundEffect(): void {\n throw new Error('updateSelectedVideoBackgroundEffect not implemented.');\n }\n}\n\n/**\n * Default call adapter state that the {@link _MockCallAdapter} class is initialized with an optional role.\n */\nconst createDefaultCallAdapterState = (role?: ParticipantRole): CallAdapterState => {\n return {\n displayName: 'Agnes Thompson',\n isLocalPreviewMicrophoneEnabled: true,\n page: 'call',\n call: {\n id: 'call1',\n /* @conditional-compile-remove(teams-identity-support) */\n kind: CallKind.Call,\n callerInfo: { displayName: 'caller', identifier: { kind: 'communicationUser', communicationUserId: '1' } },\n direction: 'Incoming',\n transcription: { isTranscriptionActive: false },\n recording: { isRecordingActive: false },\n startTime: new Date(500000000000),\n endTime: new Date(500000000000),\n diagnostics: { network: { latest: {} }, media: { latest: {} } },\n state: 'Connected',\n localVideoStreams: [],\n isMuted: false,\n isScreenSharingOn: false,\n remoteParticipants: {},\n remoteParticipantsEnded: {},\n /* @conditional-compile-remove(raise-hand) */\n raiseHand: { raisedHands: [] },\n /* @conditional-compile-remove(rooms) */\n role,\n /* @conditional-compile-remove(close-captions) */\n captionsFeature: {\n captions: [],\n supportedSpokenLanguages: [],\n supportedCaptionLanguages: [],\n currentCaptionLanguage: '',\n currentSpokenLanguage: '',\n isCaptionsFeatureActive: false,\n startCaptionsInProgress: false\n },\n /* @conditional-compile-remove(call-transfer) */\n transfer: {\n acceptedTransfers: {}\n },\n /* @conditional-compile-remove(optimal-video-count) */\n optimalVideoCount: {\n maxRemoteVideoStreams: 4\n }\n },\n userId: { kind: 'communicationUser', communicationUserId: '1' },\n devices: {\n isSpeakerSelectionAvailable: true,\n selectedCamera: { id: 'camera1', name: '1st Camera', deviceType: 'UsbCamera' },\n cameras: [{ id: 'camera1', name: '1st Camera', deviceType: 'UsbCamera' }],\n selectedMicrophone: {\n id: 'microphone1',\n name: '1st Microphone',\n deviceType: 'Microphone',\n isSystemDefault: true\n },\n microphones: [{ id: 'microphone1', name: '1st Microphone', deviceType: 'Microphone', isSystemDefault: true }],\n selectedSpeaker: { id: 'speaker1', name: '1st Speaker', deviceType: 'Speaker', isSystemDefault: true },\n speakers: [{ id: 'speaker1', name: '1st Speaker', deviceType: 'Speaker', isSystemDefault: true }],\n unparentedViews: [],\n deviceAccess: { video: true, audio: true }\n },\n isTeamsCall: false,\n /* @conditional-compile-remove(rooms) */\n isRoomsCall: false,\n latestErrors: {}\n };\n};\n"]}