@cometchat/calls-sdk-react-native 4.0.5-beta1 → 4.0.7-t1

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.
@@ -106,5 +106,5 @@ export declare class CometChatCalls {
106
106
  * @returns A Promise that resolves to a CallLog object containing the call details.
107
107
  * @throws {CometChatCallsException} If there is an error retrieving the call details.
108
108
  */
109
- static getCallDetails(sessionID: string, authToken: string): Promise<CallLog>;
109
+ static getCallDetails(sessionID: string, authToken: string): Promise<Array<CallLog>>;
110
110
  }
@@ -1,3 +1,4 @@
1
+ import { REGION } from "../Constants";
1
2
  import { CallSettings } from "../models/CallSettings";
2
3
  export type Position = typeof CallSettings.POSITION[keyof typeof CallSettings.POSITION];
3
4
  export type AspectRatio = typeof CallSettings.ASPECT_RATIO[keyof typeof CallSettings.ASPECT_RATIO];
@@ -6,7 +7,7 @@ export type ColorRGBA = `rgba(${number}, ${number}, ${number}, ${number})`;
6
7
  export type ColorHEX = `#${string}`;
7
8
  type _ColorValue = ColorRGB | ColorRGBA | ColorHEX;
8
9
  export type ColorValue = _ColorValue | Omit<string, _ColorValue>;
9
- type _Region = "eu" | "us" | "in";
10
+ type _Region = keyof typeof REGION;
10
11
  export type Region = _Region | Omit<string, _Region>;
11
12
  type _THost = `rtc-${_Region}.cometchat.io`;
12
13
  export type Host = _THost | Omit<string, _THost>;
package/ios/AudioMode.m CHANGED
@@ -245,6 +245,21 @@ RCT_EXPORT_METHOD(updateDeviceList) {
245
245
  [self notifyDevicesChanged];
246
246
  }
247
247
 
248
+ RCT_EXPORT_METHOD(releaseAudioSession)
249
+ {
250
+ RTCAudioSession *session = [RTCAudioSession sharedInstance];
251
+ [session lockForConfiguration];
252
+ NSError *error = nil;
253
+ [session setActive:NO error:&error];
254
+ [session unlockForConfiguration];
255
+
256
+ if (error) {
257
+ NSLog(@"Failed to release audio session: %@", error.localizedDescription);
258
+ } else {
259
+ NSLog(@"Audio session released successfully");
260
+ }
261
+ }
262
+
248
263
  RCT_EXPORT_METHOD(removeListener) {
249
264
  RTCAudioSession *session = [RTCAudioSession sharedInstance];
250
265
  [session removeDelegate:self];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cometchat/calls-sdk-react-native",
3
- "version": "4.0.5-beta1",
3
+ "version": "4.0.7-t1",
4
4
  "description": "Cometchat React Native Calling component for iOS and Android",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -31,7 +31,7 @@
31
31
  ],
32
32
  "repository": "https://github.com/github_account/react-native-react-native-cometchat-rtc",
33
33
  "author": "cometchat <engineering.pro@cometchat.com> (https://github.com/cometchat-pro)",
34
- "license": "MIT",
34
+ "license": "https://www.cometchat.com/legal-terms-of-service",
35
35
  "bugs": {
36
36
  "url": "https://github.com/github_account/react-native-react-native-cometchat-rtc/issues"
37
37
  },