react-native-visit-rn-sdk 6.0.4 → 7.1.0

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.
Files changed (79) hide show
  1. package/README.md +297 -191
  2. package/android/build.gradle +4 -1
  3. package/android/gradle.properties +4 -4
  4. package/android/src/main/AndroidManifest.xml +11 -5
  5. package/android/src/main/AndroidManifestNew.xml +11 -5
  6. package/android/src/main/java/com/visitrnsdk/VisitFitnessModule.kt +642 -0
  7. package/android/src/main/java/com/visitrnsdk/VisitRnSdkPackage.kt +1 -1
  8. package/android/src/main/java/com/visitrnsdk/VisitSessionStorage.kt +50 -0
  9. package/ios/VisitRnSdkViewManager.h +23 -1
  10. package/ios/VisitRnSdkViewManager.m +1259 -8
  11. package/lib/commonjs/index.android.js +328 -205
  12. package/lib/commonjs/index.android.js.map +1 -1
  13. package/lib/commonjs/index.ios.js +159 -116
  14. package/lib/commonjs/index.ios.js.map +1 -1
  15. package/lib/module/index.android.js +328 -206
  16. package/lib/module/index.android.js.map +1 -1
  17. package/lib/module/index.ios.js +161 -117
  18. package/lib/module/index.ios.js.map +1 -1
  19. package/lib/typescript/index.android.d.ts +8 -3
  20. package/lib/typescript/index.android.d.ts.map +1 -1
  21. package/lib/typescript/index.ios.d.ts +6 -3
  22. package/lib/typescript/index.ios.d.ts.map +1 -1
  23. package/package.json +18 -26
  24. package/react-native-visit-rn-sdk.podspec +2 -1
  25. package/src/index.android.js +579 -0
  26. package/src/index.ios.js +284 -0
  27. package/android/src/main/java/com/visitrnsdk/VisitRnSdkLocationModule.kt +0 -37
  28. package/lib/commonjs/assets/video-call/connecting-lottie.gif +0 -0
  29. package/lib/commonjs/assets/video-call/end-call.png +0 -0
  30. package/lib/commonjs/assets/video-call/mic-off.png +0 -0
  31. package/lib/commonjs/assets/video-call/reconnecting.gif +0 -0
  32. package/lib/commonjs/assets/video-call/switch-camera.png +0 -0
  33. package/lib/commonjs/assets/video-call/toggle-down.png +0 -0
  34. package/lib/commonjs/assets/video-call/toggle-up.png +0 -0
  35. package/lib/commonjs/assets/video-call/video-off.png +0 -0
  36. package/lib/commonjs/components/VideoCallComponent.js +0 -1088
  37. package/lib/commonjs/components/VideoCallComponent.js.map +0 -1
  38. package/lib/commonjs/index.js +0 -6
  39. package/lib/commonjs/index.js.map +0 -1
  40. package/lib/commonjs/shims.d.js +0 -2
  41. package/lib/commonjs/shims.d.js.map +0 -1
  42. package/lib/commonjs/types.js +0 -2
  43. package/lib/commonjs/types.js.map +0 -1
  44. package/lib/module/assets/video-call/connecting-lottie.gif +0 -0
  45. package/lib/module/assets/video-call/end-call.png +0 -0
  46. package/lib/module/assets/video-call/mic-off.png +0 -0
  47. package/lib/module/assets/video-call/reconnecting.gif +0 -0
  48. package/lib/module/assets/video-call/switch-camera.png +0 -0
  49. package/lib/module/assets/video-call/toggle-down.png +0 -0
  50. package/lib/module/assets/video-call/toggle-up.png +0 -0
  51. package/lib/module/assets/video-call/video-off.png +0 -0
  52. package/lib/module/components/VideoCallComponent.js +0 -1081
  53. package/lib/module/components/VideoCallComponent.js.map +0 -1
  54. package/lib/module/index.js +0 -2
  55. package/lib/module/index.js.map +0 -1
  56. package/lib/module/shims.d.js +0 -2
  57. package/lib/module/shims.d.js.map +0 -1
  58. package/lib/module/types.js +0 -2
  59. package/lib/module/types.js.map +0 -1
  60. package/lib/typescript/components/VideoCallComponent.d.ts +0 -79
  61. package/lib/typescript/components/VideoCallComponent.d.ts.map +0 -1
  62. package/lib/typescript/index.d.ts +0 -17
  63. package/lib/typescript/index.d.ts.map +0 -1
  64. package/lib/typescript/types.d.ts +0 -24
  65. package/lib/typescript/types.d.ts.map +0 -1
  66. package/src/assets/video-call/connecting-lottie.gif +0 -0
  67. package/src/assets/video-call/end-call.png +0 -0
  68. package/src/assets/video-call/mic-off.png +0 -0
  69. package/src/assets/video-call/reconnecting.gif +0 -0
  70. package/src/assets/video-call/switch-camera.png +0 -0
  71. package/src/assets/video-call/toggle-down.png +0 -0
  72. package/src/assets/video-call/toggle-up.png +0 -0
  73. package/src/assets/video-call/video-off.png +0 -0
  74. package/src/components/VideoCallComponent.tsx +0 -1484
  75. package/src/index.android.tsx +0 -459
  76. package/src/index.ios.tsx +0 -238
  77. package/src/index.tsx +0 -25
  78. package/src/shims.d.ts +0 -49
  79. package/src/types.ts +0 -25
@@ -1,1081 +0,0 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
3
- import { Alert, Animated, Dimensions, Image, LayoutAnimation, Linking, PanResponder, PermissionsAndroid, Platform, Pressable, StatusBar, StyleSheet, Text, TouchableOpacity, UIManager, View } from 'react-native';
4
- import { TwilioVideo, TwilioVideoLocalView, TwilioVideoParticipantView } from '@twilio/video-react-native-sdk';
5
- const {
6
- width: SCREEN_WIDTH,
7
- height: SCREEN_HEIGHT
8
- } = Dimensions.get('screen');
9
- const LOCAL_PREVIEW_WIDTH = 120;
10
- const LOCAL_PREVIEW_HEIGHT = 180;
11
- const LOCAL_PREVIEW_SIDE_MARGIN = 16;
12
- const LOCAL_PREVIEW_MAX_BOTTOM_OFFSET = 224;
13
- const LOCAL_PREVIEW_BOTTOM_DRAG_ALLOWANCE = 56;
14
- const VIDEO_CALL_ERROR_STATUS = Object.freeze({
15
- MISSING_ROOM_NAME_OR_ACCESS_TOKEN: 'MISSING_ROOM_NAME_OR_ACCESS_TOKEN',
16
- PERMISSIONS_REQUIRED: 'PERMISSIONS_REQUIRED',
17
- PERMISSION_CHECK_FAILED: 'PERMISSION_CHECK_FAILED',
18
- INVALID_OR_EXPIRED_TOKEN: 'INVALID_OR_EXPIRED_TOKEN',
19
- CONNECT_FAILED: 'CONNECT_FAILED'
20
- });
21
- const ICONS = {
22
- mute: require('../assets/video-call/mic-off.png'),
23
- videoOff: require('../assets/video-call/video-off.png'),
24
- flip: require('../assets/video-call/switch-camera.png'),
25
- end: require('../assets/video-call/end-call.png'),
26
- connecting: require('../assets/video-call/connecting-lottie.gif'),
27
- reconnecting: require('../assets/video-call/reconnecting.gif'),
28
- toggleUp: require('../assets/video-call/toggle-up.png'),
29
- toggleDown: require('../assets/video-call/toggle-down.png')
30
- };
31
- const initialCallState = {
32
- isVisible: false,
33
- loading: false,
34
- status: 'idle',
35
- roomName: '',
36
- accessToken: '',
37
- remoteTrackSid: '',
38
- remoteTrackIdentifier: null,
39
- participantVideoEnabled: false,
40
- participantAudioEnabled: true,
41
- isMuted: false,
42
- isVideoEnabled: true,
43
- isFrontCameraEnabled: true,
44
- signalStrength: null,
45
- participantSignalStrength: null,
46
- showLowSignalStrengthMessage: false,
47
- showParticipantReconnectingScreen: false,
48
- showUserReconnectingScreen: false,
49
- showBottomBar: true,
50
- durationMins: '00',
51
- durationSecs: '00',
52
- doctorName: '',
53
- visibleDoctorName: '',
54
- userName: ''
55
- };
56
- const VideoCallComponent = /*#__PURE__*/forwardRef(function VideoCallComponentInner({
57
- onCallConnected,
58
- onCallEnded,
59
- onError,
60
- onLowNetworkQuality,
61
- onStateChange,
62
- style
63
- }, ref) {
64
- const twilioVideoRef = useRef(null);
65
- const durationTimerRef = useRef(null);
66
- const timerRunningRef = useRef(false);
67
- const reconnectingTimerRef = useRef(null);
68
- const localPreviewRefreshTimeoutRef = useRef(null);
69
- const localPreviewSecondRefreshTimeoutRef = useRef(null);
70
- const localPreviewDrag = useRef(new Animated.ValueXY({
71
- x: 0,
72
- y: 0
73
- })).current;
74
- const localPreviewDragOffsetRef = useRef({
75
- x: 0,
76
- y: 0
77
- });
78
- const callRef = useRef({
79
- roomJoined: false,
80
- unmounted: false
81
- });
82
- callRef.current.onCallEnded = onCallEnded;
83
- const [state, setState] = useState(initialCallState);
84
- const [localPreviewRefreshKey, setLocalPreviewRefreshKey] = useState(0);
85
- const maxHorizontalDrag = SCREEN_WIDTH - LOCAL_PREVIEW_WIDTH - LOCAL_PREVIEW_SIDE_MARGIN * 2;
86
- const maxUpwardDrag = Math.max(0, SCREEN_HEIGHT - LOCAL_PREVIEW_HEIGHT - LOCAL_PREVIEW_MAX_BOTTOM_OFFSET);
87
- const maxDownwardDrag = LOCAL_PREVIEW_BOTTOM_DRAG_ALLOWANCE;
88
- const clampDrag = useCallback((value, min, max) => Math.min(Math.max(value, min), max), []);
89
- const localPreviewPanResponder = useRef(PanResponder.create({
90
- onMoveShouldSetPanResponder: (_, gestureState) => Math.abs(gestureState.dx) > 2 || Math.abs(gestureState.dy) > 2,
91
- onPanResponderMove: (_, gestureState) => {
92
- const nextX = clampDrag(localPreviewDragOffsetRef.current.x + gestureState.dx, -maxHorizontalDrag, 0);
93
- const nextY = clampDrag(localPreviewDragOffsetRef.current.y + gestureState.dy, -maxUpwardDrag, maxDownwardDrag);
94
- localPreviewDrag.setValue({
95
- x: nextX,
96
- y: nextY
97
- });
98
- },
99
- onPanResponderRelease: (_, gestureState) => {
100
- const nextX = clampDrag(localPreviewDragOffsetRef.current.x + gestureState.dx, -maxHorizontalDrag, 0);
101
- const nextY = clampDrag(localPreviewDragOffsetRef.current.y + gestureState.dy, -maxUpwardDrag, maxDownwardDrag);
102
- localPreviewDragOffsetRef.current = {
103
- x: nextX,
104
- y: nextY
105
- };
106
- localPreviewDrag.setValue(localPreviewDragOffsetRef.current);
107
- }
108
- })).current;
109
- useEffect(() => {
110
- if (Platform.OS === 'android' && UIManager.setLayoutAnimationEnabledExperimental) {
111
- UIManager.setLayoutAnimationEnabledExperimental(true);
112
- }
113
- }, []);
114
- const clearDurationTimer = useCallback(() => {
115
- timerRunningRef.current = false;
116
- if (durationTimerRef.current) {
117
- clearInterval(durationTimerRef.current);
118
- durationTimerRef.current = null;
119
- }
120
- }, []);
121
- const clearReconnectTimer = useCallback(() => {
122
- if (reconnectingTimerRef.current) {
123
- clearInterval(reconnectingTimerRef.current);
124
- reconnectingTimerRef.current = null;
125
- }
126
- }, []);
127
- const clearLocalPreviewRefreshTimers = useCallback(() => {
128
- if (localPreviewRefreshTimeoutRef.current) {
129
- clearTimeout(localPreviewRefreshTimeoutRef.current);
130
- localPreviewRefreshTimeoutRef.current = null;
131
- }
132
- if (localPreviewSecondRefreshTimeoutRef.current) {
133
- clearTimeout(localPreviewSecondRefreshTimeoutRef.current);
134
- localPreviewSecondRefreshTimeoutRef.current = null;
135
- }
136
- }, []);
137
- const refreshLocalPreview = useCallback(() => {
138
- setLocalPreviewRefreshKey(prev => prev + 1);
139
- }, []);
140
- const emitState = useCallback(nextState => {
141
- if (onStateChange) {
142
- onStateChange(nextState);
143
- }
144
- }, [onStateChange]);
145
- const emitErrorStatus = useCallback((status, error, metadata = {}) => {
146
- if (!onError) {
147
- return;
148
- }
149
- onError({
150
- status,
151
- error,
152
- metadata
153
- });
154
- }, [onError]);
155
- const updateState = useCallback(updater => {
156
- setState(prev => {
157
- const next = typeof updater === 'function' ? updater(prev) : {
158
- ...prev,
159
- ...updater
160
- };
161
- emitState(next);
162
- return next;
163
- });
164
- }, [emitState]);
165
- const leaveVideo = useCallback((reason, error) => {
166
- clearDurationTimer();
167
- clearReconnectTimer();
168
- clearLocalPreviewRefreshTimers();
169
- if (callRef.current.unmounted) {
170
- return;
171
- }
172
- callRef.current.roomJoined = false;
173
- setState(() => {
174
- const finalState = JSON.parse(JSON.stringify(initialCallState));
175
- emitState(finalState);
176
- return finalState;
177
- });
178
- if (onCallEnded) {
179
- onCallEnded({
180
- reason,
181
- error
182
- });
183
- }
184
- }, [clearDurationTimer, clearReconnectTimer, clearLocalPreviewRefreshTimers, emitState, onCallEnded]);
185
- const startDurationTimer = useCallback(() => {
186
- timerRunningRef.current = true;
187
- if (durationTimerRef.current) {
188
- return;
189
- }
190
- durationTimerRef.current = setInterval(() => {
191
- if (!timerRunningRef.current) {
192
- return;
193
- }
194
- updateState(prev => {
195
- let secs = parseInt(prev.durationSecs, 10) + 1;
196
- let mins = parseInt(prev.durationMins, 10);
197
- if (secs >= 60) {
198
- mins += 1;
199
- secs = 0;
200
- }
201
- return {
202
- ...prev,
203
- durationMins: mins < 10 ? `0${mins}` : String(mins),
204
- durationSecs: secs < 10 ? `0${secs}` : String(secs)
205
- };
206
- });
207
- }, 1000);
208
- }, [updateState]);
209
- const checkAndroidVideoPermissions = useCallback(async () => {
210
- if (Platform.OS !== 'android') {
211
- return true;
212
- }
213
- try {
214
- const cameraPermission = PermissionsAndroid.PERMISSIONS.CAMERA;
215
- const micPermission = PermissionsAndroid.PERMISSIONS.RECORD_AUDIO;
216
- const hasCamera = await PermissionsAndroid.check(cameraPermission);
217
- const hasMic = await PermissionsAndroid.check(micPermission);
218
- if (hasCamera && hasMic) {
219
- return true;
220
- }
221
- const permissionResults = await PermissionsAndroid.requestMultiple([cameraPermission, micPermission]);
222
- const isCameraGranted = permissionResults[cameraPermission] === PermissionsAndroid.RESULTS.GRANTED;
223
- const isMicGranted = permissionResults[micPermission] === PermissionsAndroid.RESULTS.GRANTED;
224
- if (isCameraGranted && isMicGranted) {
225
- return true;
226
- }
227
- const missing = [];
228
- if (!isCameraGranted) {
229
- missing.push('camera');
230
- }
231
- if (!isMicGranted) {
232
- missing.push('microphone');
233
- }
234
- Alert.alert('Permissions required', `Please allow ${missing.join(' and ')} access to start a video call. You can enable this in Settings.`, [{
235
- text: 'Cancel',
236
- style: 'cancel'
237
- }, {
238
- text: 'Open Settings',
239
- onPress: () => Linking.openSettings()
240
- }]);
241
- emitErrorStatus(VIDEO_CALL_ERROR_STATUS.PERMISSIONS_REQUIRED, new Error('Camera and microphone permissions are required to start a video call.'));
242
- return false;
243
- } catch (error) {
244
- Alert.alert('Permission error', 'Unable to check camera and microphone permissions. Please try again or open Settings to grant access.', [{
245
- text: 'Cancel',
246
- style: 'cancel'
247
- }, {
248
- text: 'Open Settings',
249
- onPress: () => Linking.openSettings()
250
- }]);
251
- emitErrorStatus(VIDEO_CALL_ERROR_STATUS.PERMISSION_CHECK_FAILED, error, {
252
- message: 'Unable to check camera and microphone permissions.'
253
- });
254
- return false;
255
- }
256
- }, [emitErrorStatus]);
257
- const connectToRoom = useCallback(async ({
258
- roomName,
259
- accessToken,
260
- doctorName,
261
- visibleDoctorName,
262
- userName
263
- }) => {
264
- if (!roomName || !accessToken) {
265
- const err = new Error('roomName and accessToken are required');
266
- emitErrorStatus(VIDEO_CALL_ERROR_STATUS.MISSING_ROOM_NAME_OR_ACCESS_TOKEN, err);
267
- return;
268
- }
269
- const canStartCall = await checkAndroidVideoPermissions();
270
- if (!canStartCall) {
271
- return;
272
- }
273
- callRef.current.roomJoined = false;
274
- callRef.current.unmounted = false;
275
- localPreviewDragOffsetRef.current = {
276
- x: 0,
277
- y: 0
278
- };
279
- localPreviewDrag.setValue({
280
- x: 0,
281
- y: 0
282
- });
283
- refreshLocalPreview();
284
- const visible = visibleDoctorName != null && visibleDoctorName !== '' ? visibleDoctorName : doctorName || '';
285
- updateState(prev => ({
286
- ...prev,
287
- isVisible: true,
288
- loading: true,
289
- status: 'connecting',
290
- roomName,
291
- accessToken,
292
- doctorName: doctorName || '',
293
- visibleDoctorName: visible,
294
- userName: userName || '',
295
- durationMins: '00',
296
- durationSecs: '00'
297
- }));
298
- setTimeout(() => {
299
- var _twilioVideoRef$curre;
300
- (_twilioVideoRef$curre = twilioVideoRef.current) === null || _twilioVideoRef$curre === void 0 || _twilioVideoRef$curre.connect({
301
- accessToken,
302
- roomName,
303
- cameraType: 'front',
304
- enableNetworkQualityReporting: true
305
- });
306
- }, 600);
307
- }, [localPreviewDrag, refreshLocalPreview, checkAndroidVideoPermissions, updateState, emitErrorStatus]);
308
- const endCall = useCallback(() => {
309
- var _twilioVideoRef$curre2;
310
- (_twilioVideoRef$curre2 = twilioVideoRef.current) === null || _twilioVideoRef$curre2 === void 0 || _twilioVideoRef$curre2.disconnect();
311
- leaveVideo('ended-by-user');
312
- }, [leaveVideo]);
313
- useImperativeHandle(ref, () => ({
314
- startVideoCall: ({
315
- roomName,
316
- accessToken,
317
- doctorName,
318
- visibleDoctorName,
319
- userName
320
- }) => connectToRoom({
321
- roomName,
322
- accessToken,
323
- doctorName,
324
- visibleDoctorName,
325
- userName
326
- }),
327
- endCall,
328
- isConnected: () => state.isVisible
329
- }), [connectToRoom, endCall, state.isVisible]);
330
- useEffect(() => {
331
- callRef.current.unmounted = false;
332
- return () => {
333
- var _twilioVideoRef$curre3;
334
- const wasJoined = callRef.current.roomJoined;
335
- callRef.current.unmounted = true;
336
- callRef.current.roomJoined = false;
337
- clearDurationTimer();
338
- clearReconnectTimer();
339
- clearLocalPreviewRefreshTimers();
340
- // Intentionally read current refs on unmount to disconnect an active room.
341
- // eslint-disable-next-line react-hooks/exhaustive-deps
342
- (_twilioVideoRef$curre3 = twilioVideoRef.current) === null || _twilioVideoRef$curre3 === void 0 || _twilioVideoRef$curre3.disconnect();
343
- if (wasJoined) {
344
- var _callRef$current$onCa, _callRef$current;
345
- // eslint-disable-next-line react-hooks/exhaustive-deps
346
- (_callRef$current$onCa = (_callRef$current = callRef.current).onCallEnded) === null || _callRef$current$onCa === void 0 || _callRef$current$onCa.call(_callRef$current, {
347
- reason: 'component-unmount'
348
- });
349
- }
350
- };
351
- }, [clearDurationTimer, clearReconnectTimer, clearLocalPreviewRefreshTimers]);
352
- const onRoomDidConnect = ({
353
- roomName
354
- }) => {
355
- console.log('onRoomDidConnect', roomName);
356
- callRef.current.roomJoined = true;
357
- updateState(prev => ({
358
- ...prev,
359
- loading: false,
360
- status: 'connected',
361
- showUserReconnectingScreen: false
362
- }));
363
- clearReconnectTimer();
364
- if (onCallConnected) {
365
- onCallConnected({
366
- roomName
367
- });
368
- }
369
-
370
- // Twilio local preview can miss the first bind on some Android devices.
371
- // Force a couple of refresh passes right after connect.
372
- clearLocalPreviewRefreshTimers();
373
- refreshLocalPreview();
374
- localPreviewRefreshTimeoutRef.current = setTimeout(() => {
375
- var _twilioVideoRef$curre4;
376
- (_twilioVideoRef$curre4 = twilioVideoRef.current) === null || _twilioVideoRef$curre4 === void 0 || _twilioVideoRef$curre4.setLocalVideoEnabled(true);
377
- refreshLocalPreview();
378
- }, 220);
379
- localPreviewSecondRefreshTimeoutRef.current = setTimeout(() => {
380
- refreshLocalPreview();
381
- }, 700);
382
- };
383
- const onRoomDidDisconnect = ({
384
- error
385
- }) => {
386
- leaveVideo('room-disconnected', error);
387
- };
388
- const onRoomDidFailToConnect = error => {
389
- var _errorMessage$toLower;
390
- const errorMessage = String((error === null || error === void 0 ? void 0 : error.error) || (error === null || error === void 0 ? void 0 : error.message) || '');
391
- const hasTokenError = errorMessage === null || errorMessage === void 0 || (_errorMessage$toLower = errorMessage.toLowerCase()) === null || _errorMessage$toLower === void 0 ? void 0 : _errorMessage$toLower.includes('token');
392
- if (hasTokenError) {
393
- Alert.alert('Unable to join call', 'Your video session token is invalid or has expired.', [{
394
- text: 'OK'
395
- }]);
396
- emitErrorStatus(VIDEO_CALL_ERROR_STATUS.INVALID_OR_EXPIRED_TOKEN, error);
397
- leaveVideo('connect-failed', error);
398
- return;
399
- }
400
- emitErrorStatus(VIDEO_CALL_ERROR_STATUS.CONNECT_FAILED, error);
401
- leaveVideo('connect-failed', error);
402
- };
403
- const onParticipantAddedVideoTrack = ({
404
- participant,
405
- track
406
- }) => {
407
- updateState(prev => {
408
- if (prev.remoteTrackSid) {
409
- return prev;
410
- }
411
- return {
412
- ...prev,
413
- remoteTrackSid: (track === null || track === void 0 ? void 0 : track.trackSid) ?? '',
414
- remoteTrackIdentifier: {
415
- participantSid: (participant === null || participant === void 0 ? void 0 : participant.sid) ?? '',
416
- videoTrackSid: (track === null || track === void 0 ? void 0 : track.trackSid) ?? ''
417
- },
418
- participantVideoEnabled: !!(track !== null && track !== void 0 && track.enabled),
419
- loading: false,
420
- status: 'connected'
421
- };
422
- });
423
- startDurationTimer();
424
- };
425
- const onParticipantRemovedVideoTrack = ({
426
- track
427
- }) => {
428
- updateState(prev => {
429
- if ((track === null || track === void 0 ? void 0 : track.trackSid) !== prev.remoteTrackSid) {
430
- return prev;
431
- }
432
- timerRunningRef.current = false;
433
- return {
434
- ...prev,
435
- remoteTrackSid: '',
436
- remoteTrackIdentifier: null,
437
- status: 'participantDisconnected'
438
- };
439
- });
440
- };
441
- const onParticipantDisabledVideoTrack = event => {
442
- updateState(prev => {
443
- var _event$track;
444
- return {
445
- ...prev,
446
- participantVideoEnabled: !!((_event$track = event.track) !== null && _event$track !== void 0 && _event$track.enabled)
447
- };
448
- });
449
- };
450
- const onParticipantEnabledVideoTrack = event => {
451
- updateState(prev => {
452
- var _event$track2;
453
- return {
454
- ...prev,
455
- participantVideoEnabled: !!((_event$track2 = event.track) !== null && _event$track2 !== void 0 && _event$track2.enabled)
456
- };
457
- });
458
- };
459
- const onParticipantAudioToggled = event => {
460
- updateState(prev => {
461
- var _event$track3;
462
- return {
463
- ...prev,
464
- participantAudioEnabled: !!((_event$track3 = event.track) !== null && _event$track3 !== void 0 && _event$track3.enabled)
465
- };
466
- });
467
- };
468
- const onNetworkQualityLevelsChanged = payload => {
469
- if (payload.isLocalUser) {
470
- const isLow = payload.quality > 0 && payload.quality < 3;
471
- updateState(prev => ({
472
- ...prev,
473
- signalStrength: payload.quality,
474
- showLowSignalStrengthMessage: isLow,
475
- showUserReconnectingScreen: false
476
- }));
477
- if (isLow && onLowNetworkQuality) {
478
- onLowNetworkQuality({
479
- quality: payload.quality,
480
- participant: 'local'
481
- });
482
- }
483
- } else {
484
- updateState(prev => ({
485
- ...prev,
486
- participantSignalStrength: payload.quality,
487
- showParticipantReconnectingScreen: payload.quality <= 1
488
- }));
489
- }
490
- };
491
- const onMuteButtonPress = () => {
492
- var _twilioVideoRef$curre5;
493
- (_twilioVideoRef$curre5 = twilioVideoRef.current) === null || _twilioVideoRef$curre5 === void 0 || _twilioVideoRef$curre5.setLocalAudioEnabled(state.isMuted).then(enabled => {
494
- updateState(prev => ({
495
- ...prev,
496
- isMuted: !enabled
497
- }));
498
- });
499
- };
500
- const onVideoToggle = () => {
501
- var _twilioVideoRef$curre6;
502
- (_twilioVideoRef$curre6 = twilioVideoRef.current) === null || _twilioVideoRef$curre6 === void 0 || _twilioVideoRef$curre6.setLocalVideoEnabled(!state.isVideoEnabled).then(enabled => {
503
- console.log('onVideoToggle', enabled);
504
- updateState(prev => ({
505
- ...prev,
506
- isVideoEnabled: enabled
507
- }));
508
- }).catch(error => {
509
- console.error('Error toggling video:', error);
510
- });
511
- };
512
- const onFlipButtonPress = () => {
513
- var _twilioVideoRef$curre7;
514
- (_twilioVideoRef$curre7 = twilioVideoRef.current) === null || _twilioVideoRef$curre7 === void 0 || _twilioVideoRef$curre7.flipCamera();
515
- updateState(prev => ({
516
- ...prev,
517
- isFrontCameraEnabled: !prev.isFrontCameraEnabled
518
- }));
519
- };
520
- const onRoomReconnectingWithError = () => {
521
- updateState(prev => ({
522
- ...prev,
523
- showUserReconnectingScreen: true
524
- }));
525
- clearReconnectTimer();
526
- reconnectingTimerRef.current = setInterval(() => {
527
- var _twilioVideoRef$curre8;
528
- const {
529
- accessToken,
530
- roomName,
531
- isMuted,
532
- isVideoEnabled
533
- } = state;
534
- if (!accessToken || !roomName) {
535
- return;
536
- }
537
- (_twilioVideoRef$curre8 = twilioVideoRef.current) === null || _twilioVideoRef$curre8 === void 0 || _twilioVideoRef$curre8.connect({
538
- accessToken,
539
- roomName,
540
- enableAudio: !isMuted,
541
- enableVideo: isVideoEnabled,
542
- enableNetworkQualityReporting: true
543
- });
544
- }, 3000);
545
- };
546
- if (!state.isVisible) {
547
- return /*#__PURE__*/React.createElement(TwilioVideo, {
548
- ref: twilioVideoRef,
549
- onRoomDidConnect: onRoomDidConnect,
550
- onRoomDidDisconnect: onRoomDidDisconnect,
551
- onRoomDidFailToConnect: onRoomDidFailToConnect,
552
- onParticipantAddedVideoTrack: onParticipantAddedVideoTrack,
553
- onParticipantDisabledVideoTrack: onParticipantDisabledVideoTrack,
554
- onParticipantEnabledVideoTrack: onParticipantEnabledVideoTrack,
555
- onParticipantRemovedVideoTrack: onParticipantRemovedVideoTrack,
556
- onParticipantAddedAudioTrack: onParticipantAudioToggled,
557
- onParticipantEnabledAudioTrack: onParticipantAudioToggled,
558
- onParticipantDisabledAudioTrack: onParticipantAudioToggled,
559
- onNetworkQualityLevelsChanged: onNetworkQualityLevelsChanged,
560
- onRoomReconnectingWithError: onRoomReconnectingWithError,
561
- onRoomParticipantIsReconnecting: () => updateState(prev => ({
562
- ...prev,
563
- showParticipantReconnectingScreen: true
564
- })),
565
- onRoomParticipantReconnected: () => updateState(prev => ({
566
- ...prev,
567
- showParticipantReconnectingScreen: false
568
- }))
569
- });
570
- }
571
- const isReconnecting = state.showParticipantReconnectingScreen || state.showUserReconnectingScreen;
572
- const isConnecting = state.loading || state.status === 'connecting';
573
- const showDoctorInitial = state.status === 'participantDisconnected' || !isReconnecting && !isConnecting;
574
- return /*#__PURE__*/React.createElement(View, {
575
- style: [styles.container, style]
576
- }, /*#__PURE__*/React.createElement(StatusBar, {
577
- barStyle: "light-content"
578
- }), /*#__PURE__*/React.createElement(View, {
579
- style: styles.topHeader
580
- }, /*#__PURE__*/React.createElement(View, {
581
- style: styles.headerTitleWrap
582
- }, /*#__PURE__*/React.createElement(Text, {
583
- style: styles.nameText
584
- }, state.doctorName || 'Doctor'), /*#__PURE__*/React.createElement(Text, {
585
- style: styles.timerText
586
- }, state.durationMins, ":", state.durationSecs)), (state.signalStrength !== null || state.participantSignalStrength !== null) && /*#__PURE__*/React.createElement(View, {
587
- style: styles.signalHeaderRow
588
- }, state.participantSignalStrength !== null ? /*#__PURE__*/React.createElement(SignalStrengthIndicator, {
589
- strength: state.participantSignalStrength,
590
- participantLabel: "Doctor"
591
- }) : null, state.signalStrength !== null ? /*#__PURE__*/React.createElement(View, {
592
- style: styles.signalItemSpacer
593
- }, /*#__PURE__*/React.createElement(SignalStrengthIndicator, {
594
- strength: state.signalStrength,
595
- participantLabel: "Patient"
596
- })) : null)), state.remoteTrackIdentifier && state.participantVideoEnabled && !state.showParticipantReconnectingScreen && !state.showUserReconnectingScreen ? /*#__PURE__*/React.createElement(TwilioVideoParticipantView, {
597
- style: styles.remoteVideo,
598
- key: state === null || state === void 0 ? void 0 : state.remoteTrackSid,
599
- trackIdentifier: state.remoteTrackIdentifier
600
- }) : /*#__PURE__*/React.createElement(View, {
601
- style: styles.remotePlaceholder
602
- }, isReconnecting || isConnecting ? /*#__PURE__*/React.createElement(View, {
603
- style: [styles.connectingView, {
604
- backgroundColor: 'rgba(164, 171, 180, 0.36)'
605
- }]
606
- }, /*#__PURE__*/React.createElement(Image, {
607
- style: styles.connectingGif,
608
- source: isReconnecting ? ICONS.reconnecting : ICONS.connecting
609
- }), /*#__PURE__*/React.createElement(Text, {
610
- style: styles.connectingText
611
- }, isReconnecting ? 'Reconnecting...' : 'Connecting...')) : /*#__PURE__*/React.createElement(Text, {
612
- style: [styles.placeholderText, showDoctorInitial ? styles.placeholderInitialText : null]
613
- }, (state.visibleDoctorName || state.doctorName || 'Doctor').trim().charAt(0).toUpperCase())), !isConnecting ? /*#__PURE__*/React.createElement(Animated.View, _extends({
614
- style: [styles.localPreview, state.showLowSignalStrengthMessage ? state.showBottomBar ? styles.localPreviewAboveLowSignalExpanded : styles.localPreviewAboveLowSignalCollapsed : state.showBottomBar ? styles.localPreviewAboveControls : styles.localPreviewAboveCollapsedControls, {
615
- transform: localPreviewDrag.getTranslateTransform()
616
- }]
617
- }, localPreviewPanResponder.panHandlers), /*#__PURE__*/React.createElement(View, {
618
- style: styles.localPreviewInner
619
- }, state.isVideoEnabled ? /*#__PURE__*/React.createElement(TwilioVideoLocalView, {
620
- key: `local-preview-${localPreviewRefreshKey}`,
621
- enabled: true,
622
- style: styles.localVideo
623
- }) : /*#__PURE__*/React.createElement(View, {
624
- style: [styles.localVideo, styles.localVideoOff]
625
- }, /*#__PURE__*/React.createElement(Text, {
626
- style: styles.localVideoOffText
627
- }, (state.userName || 'Patient').charAt(0).toUpperCase())))) : null, !state.participantAudioEnabled && !state.showLowSignalStrengthMessage ? /*#__PURE__*/React.createElement(View, {
628
- style: [styles.participantMicOffBadge, state.showBottomBar ? styles.participantMicOffBadgeAboveControls : styles.participantMicOffBadgeAboveCollapsed]
629
- }, /*#__PURE__*/React.createElement(Image, {
630
- source: ICONS.mute,
631
- style: styles.participantMicOffIcon,
632
- resizeMode: "contain"
633
- })) : null, state.showLowSignalStrengthMessage ? /*#__PURE__*/React.createElement(View, {
634
- style: [styles.lowSignalBanner, state.showBottomBar ? styles.lowSignalBannerAboveControls : styles.lowSignalBannerAboveCollapsed]
635
- }, /*#__PURE__*/React.createElement(Text, {
636
- style: styles.lowSignalText
637
- }, "Poor connection detected. Try moving for better signal."), /*#__PURE__*/React.createElement(Pressable, {
638
- onPress: () => updateState(prev => ({
639
- ...prev,
640
- showLowSignalStrengthMessage: false
641
- }))
642
- }, /*#__PURE__*/React.createElement(Text, {
643
- style: styles.lowSignalDismiss
644
- }, "Dismiss"))) : null, /*#__PURE__*/React.createElement(View, {
645
- style: styles.bottomBarContainer
646
- }, /*#__PURE__*/React.createElement(View, {
647
- style: [styles.controls, !state.showBottomBar ? styles.controlsCollapsed : null]
648
- }, /*#__PURE__*/React.createElement(TouchableOpacity, {
649
- activeOpacity: 0.8,
650
- style: styles.controlsTopLineTouch,
651
- onPress: () => {
652
- LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
653
- updateState(prev => ({
654
- ...prev,
655
- showBottomBar: !prev.showBottomBar
656
- }));
657
- }
658
- }, /*#__PURE__*/React.createElement(View, {
659
- style: styles.controlsTogglePill
660
- }, /*#__PURE__*/React.createElement(Image, {
661
- source: state.showBottomBar ? ICONS.toggleDown : ICONS.toggleUp,
662
- style: styles.controlsToggleIcon,
663
- resizeMode: "contain"
664
- }))), state.showBottomBar ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ControlButton, {
665
- label: "Mute",
666
- icon: ICONS.mute,
667
- onPress: onMuteButtonPress,
668
- active: state.isMuted
669
- }), /*#__PURE__*/React.createElement(ControlButton, {
670
- label: "Video on",
671
- icon: ICONS.videoOff,
672
- onPress: onVideoToggle,
673
- active: !state.isVideoEnabled
674
- }), /*#__PURE__*/React.createElement(ControlButton, {
675
- label: "Flip Camera",
676
- icon: ICONS.flip,
677
- onPress: onFlipButtonPress,
678
- useTouchableOpacity: true
679
- }), /*#__PURE__*/React.createElement(ControlButton, {
680
- label: "End Call",
681
- icon: ICONS.end,
682
- onPress: endCall,
683
- danger: true,
684
- iconSize: 18,
685
- useTouchableOpacity: true
686
- })) : null)), /*#__PURE__*/React.createElement(TwilioVideo, {
687
- ref: twilioVideoRef,
688
- onRoomDidConnect: onRoomDidConnect,
689
- onRoomDidDisconnect: onRoomDidDisconnect,
690
- onRoomDidFailToConnect: onRoomDidFailToConnect,
691
- onParticipantAddedVideoTrack: onParticipantAddedVideoTrack,
692
- onParticipantDisabledVideoTrack: onParticipantDisabledVideoTrack,
693
- onParticipantEnabledVideoTrack: onParticipantEnabledVideoTrack,
694
- onParticipantRemovedVideoTrack: onParticipantRemovedVideoTrack,
695
- onParticipantAddedAudioTrack: onParticipantAudioToggled,
696
- onParticipantEnabledAudioTrack: onParticipantAudioToggled,
697
- onParticipantDisabledAudioTrack: onParticipantAudioToggled,
698
- onNetworkQualityLevelsChanged: onNetworkQualityLevelsChanged,
699
- onRoomReconnectingWithError: onRoomReconnectingWithError,
700
- onRoomParticipantIsReconnecting: () => updateState(prev => ({
701
- ...prev,
702
- showParticipantReconnectingScreen: true
703
- })),
704
- onRoomParticipantReconnected: () => updateState(prev => ({
705
- ...prev,
706
- showParticipantReconnectingScreen: false
707
- }))
708
- }));
709
- });
710
- const SignalStrengthIndicator = ({
711
- strength,
712
- participantLabel
713
- }) => {
714
- const bars = [1, 2, 3, 4, 5];
715
- const barColor = strength <= 1 ? '#f04d5a' : strength === 2 ? '#f48f31' : strength === 3 ? '#f9ca24' : '#5dd670';
716
- return /*#__PURE__*/React.createElement(View, {
717
- style: styles.signalContainer
718
- }, /*#__PURE__*/React.createElement(View, {
719
- style: styles.signalBars
720
- }, bars.map((bar, idx) => /*#__PURE__*/React.createElement(View, {
721
- key: `bar-${bar}`,
722
- style: [styles.signalBar, {
723
- backgroundColor: strength >= bar ? barColor : '#6f6f6f',
724
- height: idx === 0 ? 2 : idx * 4,
725
- marginRight: idx === 4 ? 0 : 3
726
- }]
727
- }))), /*#__PURE__*/React.createElement(Text, {
728
- style: styles.signalLabel
729
- }, participantLabel));
730
- };
731
- const ControlButton = ({
732
- onPress,
733
- danger,
734
- icon,
735
- customIconText,
736
- active,
737
- iconSize,
738
- useTouchableOpacity
739
- }) => {
740
- const content = /*#__PURE__*/React.createElement(View, {
741
- style: [styles.controlIconShell, active ? styles.controlIconShellActive : null, danger ? styles.controlButtonDanger : null]
742
- }, icon ? /*#__PURE__*/React.createElement(Image, {
743
- source: icon,
744
- style: [styles.controlButtonIcon, iconSize ? {
745
- width: iconSize,
746
- height: iconSize
747
- } : null, active ? styles.controlButtonIconActive : null, danger ? styles.controlButtonIconDanger : null],
748
- resizeMode: "contain"
749
- }) : /*#__PURE__*/React.createElement(Text, {
750
- style: [styles.controlFallbackIcon, active ? styles.controlFallbackIconActive : null]
751
- }, customIconText || '?'));
752
- if (useTouchableOpacity) {
753
- return /*#__PURE__*/React.createElement(TouchableOpacity, {
754
- style: styles.controlButton,
755
- onPress: onPress,
756
- activeOpacity: 0.65
757
- }, content);
758
- }
759
- return /*#__PURE__*/React.createElement(Pressable, {
760
- style: styles.controlButton,
761
- onPress: onPress
762
- }, content);
763
- };
764
- const styles = StyleSheet.create({
765
- container: {
766
- position: 'absolute',
767
- top: 0,
768
- left: 0,
769
- right: 0,
770
- bottom: 0,
771
- zIndex: 99,
772
- backgroundColor: '#000',
773
- justifyContent: 'space-between'
774
- },
775
- topHeader: {
776
- position: 'absolute',
777
- top: 0,
778
- left: 0,
779
- right: 0,
780
- zIndex: 10,
781
- flexDirection: 'row',
782
- justifyContent: 'space-between',
783
- alignItems: 'flex-end',
784
- paddingHorizontal: 16,
785
- paddingTop: 56
786
- },
787
- headerTitleWrap: {
788
- flex: 1,
789
- paddingRight: 12
790
- },
791
- nameText: {
792
- color: '#fff',
793
- fontSize: 24,
794
- fontWeight: '700'
795
- },
796
- timerText: {
797
- color: '#fff',
798
- marginTop: 4,
799
- fontSize: 13
800
- },
801
- closeButton: {
802
- paddingVertical: 8,
803
- paddingHorizontal: 12,
804
- borderRadius: 16,
805
- backgroundColor: 'rgba(255,255,255,0.2)'
806
- },
807
- closeButtonText: {
808
- color: '#fff',
809
- fontWeight: '700'
810
- },
811
- remoteVideo: {
812
- position: 'absolute',
813
- top: 0,
814
- left: 0,
815
- right: 0,
816
- bottom: 0,
817
- width: SCREEN_WIDTH,
818
- height: SCREEN_HEIGHT
819
- },
820
- remotePlaceholder: {
821
- flex: 1,
822
- alignItems: 'center',
823
- justifyContent: 'center',
824
- paddingHorizontal: 32
825
- },
826
- placeholderText: {
827
- color: '#fff',
828
- fontSize: 18,
829
- textAlign: 'center'
830
- },
831
- placeholderInitialText: {
832
- fontSize: 40,
833
- fontWeight: '700',
834
- width: 120,
835
- height: 120,
836
- lineHeight: 120,
837
- textAlign: 'center',
838
- textAlignVertical: 'center',
839
- includeFontPadding: false,
840
- borderRadius: 60,
841
- backgroundColor: 'rgb(113, 79, 255)',
842
- overflow: 'hidden'
843
- },
844
- connectingView: {
845
- minHeight: 200,
846
- width: 271,
847
- borderRadius: 16,
848
- paddingVertical: 32,
849
- paddingHorizontal: 24,
850
- alignItems: 'center',
851
- justifyContent: 'center',
852
- alignSelf: 'center',
853
- position: 'absolute',
854
- top: 0.35 * SCREEN_HEIGHT
855
- },
856
- connectingGif: {
857
- width: 108,
858
- height: 108
859
- },
860
- connectingText: {
861
- marginTop: 14,
862
- color: '#fff',
863
- fontSize: 16,
864
- fontWeight: '600',
865
- textAlign: 'center'
866
- },
867
- localPreview: {
868
- position: 'absolute',
869
- top: 'auto',
870
- right: 16,
871
- width: LOCAL_PREVIEW_WIDTH,
872
- height: LOCAL_PREVIEW_HEIGHT,
873
- zIndex: 999
874
- },
875
- localPreviewInner: {
876
- flex: 1,
877
- backgroundColor: '#1b1b1b'
878
- },
879
- localPreviewAboveControls: {
880
- bottom: 140
881
- },
882
- localPreviewAboveCollapsedControls: {
883
- bottom: 78
884
- },
885
- localPreviewAboveLowSignalExpanded: {
886
- bottom: 224
887
- },
888
- localPreviewAboveLowSignalCollapsed: {
889
- bottom: 162
890
- },
891
- localVideo: {
892
- width: '100%',
893
- height: '100%',
894
- backgroundColor: '#1b1b1b'
895
- },
896
- localVideoOff: {
897
- alignItems: 'center',
898
- justifyContent: 'center'
899
- },
900
- localVideoOffText: {
901
- color: '#fff',
902
- fontSize: 28,
903
- fontWeight: '700',
904
- width: 60,
905
- height: 60,
906
- lineHeight: 60,
907
- textAlign: 'center',
908
- textAlignVertical: 'center',
909
- includeFontPadding: false,
910
- borderRadius: 40,
911
- backgroundColor: 'rgb(113, 79, 255)',
912
- overflow: 'hidden'
913
- },
914
- controls: {
915
- zIndex: 20,
916
- flexDirection: 'row',
917
- justifyContent: 'space-around',
918
- alignItems: 'flex-start',
919
- width: SCREEN_WIDTH,
920
- paddingHorizontal: 10,
921
- paddingBottom: 20,
922
- paddingTop: 30,
923
- marginBottom: 0,
924
- borderTopLeftRadius: 24,
925
- borderTopRightRadius: 24,
926
- borderWidth: 0.5,
927
- borderColor: 'rgba(129, 186, 255, 0.18)',
928
- backgroundColor: 'rgba(164, 171, 180, 0.36)'
929
- },
930
- controlsCollapsed: {
931
- paddingTop: 16,
932
- paddingBottom: 24
933
- },
934
- bottomBarContainer: {
935
- position: 'absolute',
936
- left: 0,
937
- right: 0,
938
- bottom: 0,
939
- zIndex: 20,
940
- alignItems: 'center',
941
- justifyContent: 'flex-end',
942
- pointerEvents: 'box-none'
943
- },
944
- controlsTopLineTouch: {
945
- position: 'absolute',
946
- top: 6,
947
- alignSelf: 'center',
948
- width: 72,
949
- height: 16,
950
- alignItems: 'center',
951
- justifyContent: 'center',
952
- zIndex: 5
953
- },
954
- controlsTogglePill: {
955
- width: 40,
956
- height: 24,
957
- borderRadius: 12,
958
- alignItems: 'center',
959
- justifyContent: 'center'
960
- },
961
- controlsToggleIcon: {
962
- width: 20,
963
- height: 20,
964
- tintColor: '#fff'
965
- },
966
- controlButton: {
967
- alignItems: 'center',
968
- width: 72
969
- },
970
- controlButtonDanger: {
971
- backgroundColor: '#f04d5a'
972
- },
973
- controlIconShell: {
974
- width: 64,
975
- height: 64,
976
- borderRadius: 32,
977
- alignItems: 'center',
978
- justifyContent: 'center',
979
- backgroundColor: 'rgba(255,255,255,0.25)'
980
- },
981
- controlIconShellActive: {
982
- backgroundColor: '#ffffff'
983
- },
984
- controlButtonIcon: {
985
- width: 30,
986
- height: 30,
987
- tintColor: '#ffffff'
988
- },
989
- controlButtonIconActive: {
990
- tintColor: 'rgba(70,70,70,0.8)'
991
- },
992
- controlButtonIconDanger: {
993
- tintColor: '#ffffff'
994
- },
995
- controlFallbackIcon: {
996
- color: '#fff',
997
- fontSize: 28,
998
- fontWeight: '700'
999
- },
1000
- controlFallbackIconActive: {
1001
- color: 'rgba(70,70,70,0.8)'
1002
- },
1003
- signalHeaderRow: {
1004
- flexDirection: 'row',
1005
- alignItems: 'flex-end',
1006
- marginTop: 0
1007
- },
1008
- signalContainer: {
1009
- alignItems: 'center'
1010
- },
1011
- signalItemSpacer: {
1012
- marginLeft: 10
1013
- },
1014
- signalBars: {
1015
- flexDirection: 'row',
1016
- alignItems: 'flex-end'
1017
- },
1018
- signalBar: {
1019
- width: 3,
1020
- borderRadius: 2
1021
- },
1022
- signalLabel: {
1023
- color: '#fff',
1024
- fontSize: 10,
1025
- marginTop: 3,
1026
- textAlign: 'center',
1027
- width: '100%'
1028
- },
1029
- participantMicOffBadge: {
1030
- position: 'absolute',
1031
- alignSelf: 'center',
1032
- zIndex: 21,
1033
- width: 52,
1034
- height: 52,
1035
- alignItems: 'center',
1036
- justifyContent: 'center'
1037
- },
1038
- participantMicOffBadgeAboveControls: {
1039
- bottom: 118
1040
- },
1041
- participantMicOffBadgeAboveCollapsed: {
1042
- bottom: 58
1043
- },
1044
- participantMicOffIcon: {
1045
- width: 22,
1046
- height: 22,
1047
- tintColor: '#fff'
1048
- },
1049
- lowSignalBanner: {
1050
- position: 'absolute',
1051
- left: 16,
1052
- right: 16,
1053
- zIndex: 20,
1054
- borderRadius: 12,
1055
- backgroundColor: 'rgba(0,0,0,0.6)',
1056
- paddingHorizontal: 12,
1057
- paddingVertical: 10,
1058
- flexDirection: 'row',
1059
- alignItems: 'center',
1060
- justifyContent: 'space-between'
1061
- },
1062
- lowSignalBannerAboveControls: {
1063
- bottom: 130
1064
- },
1065
- lowSignalBannerAboveCollapsed: {
1066
- bottom: 68
1067
- },
1068
- lowSignalText: {
1069
- color: '#fff',
1070
- fontSize: 12,
1071
- flex: 1,
1072
- paddingRight: 8
1073
- },
1074
- lowSignalDismiss: {
1075
- color: '#7ec8ff',
1076
- fontWeight: '700',
1077
- fontSize: 12
1078
- }
1079
- });
1080
- export default VideoCallComponent;
1081
- //# sourceMappingURL=VideoCallComponent.js.map