vorqard-ai-sdk 1.0.2 → 1.0.4

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.
package/README.md CHANGED
@@ -23,7 +23,7 @@ The SDK relies on standard React Native libraries for image picking, safe area v
23
23
 
24
24
  Run the following command in your main application folder (`groupin-app/`):
25
25
  ```bash
26
- npm install axios react-native-linear-gradient react-native-image-crop-picker react-native-vision-camera react-native-vector-icons react-native-safe-area-context
26
+ npm install axios react-native-linear-gradient react-native-image-crop-picker react-native-vision-camera react-native-vector-icons react-native-safe-area-context react-native-webrtc expo-av
27
27
  ```
28
28
 
29
29
  ### Step 3: Install the SDK
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vorqard-ai-sdk",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Standalone React Native SDK for VORQARD AI Health Assistant and Report Analyzer",
5
5
  "main": "src/index.js",
6
6
  "repository": {
@@ -19,7 +19,8 @@
19
19
  "react-native-linear-gradient": "*",
20
20
  "react-native-safe-area-context": "*",
21
21
  "react-native-vector-icons": "*",
22
- "react-native-vision-camera": "*"
22
+ "react-native-vision-camera": "*",
23
+ "react-native-webrtc": "*"
23
24
  },
24
25
  "keywords": [
25
26
  "vorqard",
@@ -31,8 +32,6 @@
31
32
  "author": "VORQARD Developer",
32
33
  "license": "Abhivorn Technologies",
33
34
  "dependencies": {
34
- "expo-av": "^16.0.8",
35
- "expo-file-system": "~18.0.0",
36
35
  "react-native-live-audio-stream": "^1.1.1"
37
36
  }
38
37
  }
@@ -1,7 +1,7 @@
1
1
  import { useState, useEffect, useRef, useCallback } from 'react';
2
2
  import { Platform, PermissionsAndroid } from 'react-native';
3
3
  import { mediaDevices, RTCPeerConnection, RTCSessionDescription } from 'react-native-webrtc';
4
- import { Audio } from 'expo-av';
4
+
5
5
 
6
6
  export const VOICE_STATE = {
7
7
  IDLE: 'idle',
@@ -30,14 +30,6 @@ export const useRealtimeVoice = ({ onMessageAdded, backendUrl, userToken } = {})
30
30
  setAiResponse('');
31
31
  setUiAction(null);
32
32
 
33
- // 1. Audio Session permissions (mostly needed for iOS routing)
34
- const { status } = await Audio.requestPermissionsAsync();
35
- if (status !== 'granted') {
36
- setError('Microphone permission denied by Expo AV.');
37
- setVoiceState(VOICE_STATE.ERROR);
38
- return;
39
- }
40
-
41
33
  // 1b. Explicitly request Android microphone permission using PermissionsAndroid
42
34
  if (Platform.OS === 'android') {
43
35
  const granted = await PermissionsAndroid.request(
@@ -57,13 +49,6 @@ export const useRealtimeVoice = ({ onMessageAdded, backendUrl, userToken } = {})
57
49
  }
58
50
  }
59
51
 
60
- await Audio.setAudioModeAsync({
61
- allowsRecordingIOS: true,
62
- playsInSilentModeIOS: true,
63
- playThroughEarpieceAndroid: false, // FORCE SPEAKERPHONE ON ANDROID
64
- staysActiveInBackground: true,
65
- });
66
-
67
52
  // 2. Setup WebRTC Peer Connection
68
53
  const pc = new RTCPeerConnection({
69
54
  iceServers: [{ urls: 'stun:stun.l.google.com:19302' }],
@@ -228,9 +213,7 @@ export const useRealtimeVoice = ({ onMessageAdded, backendUrl, userToken } = {})
228
213
  dcRef.current.close();
229
214
  dcRef.current = null;
230
215
  }
231
- try {
232
- await Audio.setAudioModeAsync({ allowsRecordingIOS: false });
233
- } catch (_) {}
216
+
234
217
 
235
218
  setVoiceState(VOICE_STATE.IDLE);
236
219
  }, []);