This repository was archived by the owner on Jun 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.tsx
112 lines (104 loc) · 2.4 KB
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
import React from 'react';
import { View } from 'react-native';
const {
EndpointType,
TrackType,
VadStatus,
EncodingReason,
VideoLayout,
VideoQuality,
ScreencastQuality,
AudioOutputDeviceType,
AudioSessionMode,
CaptureDevice,
LoggingSeverity,
} = jest.requireActual('../index');
export {
EndpointType,
TrackType,
VadStatus,
EncodingReason,
VideoLayout,
VideoQuality,
ScreencastQuality,
AudioOutputDeviceType,
AudioSessionMode,
LoggingSeverity,
};
const NOOP = () => {
// noop
};
const emptyPromise = async (): Promise<void> => {
return new Promise<void>((resolve) => {
resolve();
});
};
export const useEndpoints = () => [];
export const setTargetTrackEncoding = emptyPromise;
export const useCamera = () => {
return {
isCameraOn: false,
simulcastConfig: { enabled: false, activeEncodings: [] },
toggleCamera: NOOP,
startCamera: NOOP,
flipCamera: emptyPromise,
switchCamera: emptyPromise,
getCaptureDevices: async (): Promise<(typeof CaptureDevice)[]> => {
return new Promise((resolve) => {
resolve([]);
});
},
toggleVideoTrackEncoding: NOOP,
setVideoTrackEncodingBandwidth: NOOP,
setVideoTrackBandwidth: NOOP,
};
};
export const useMicrophone = () => {
return {
isMicrophoneOn: false,
toggleMicrophone: NOOP,
startMicrophone: NOOP,
};
};
export const useScreencast = () => {
return {
isScreencastOn: false,
toggleScreencast: NOOP,
updateScreencastTrackMetadata: NOOP,
toggleScreencastTrackEncoding: NOOP,
simulcastConfig: NOOP,
setScreencastTrackEncodingBandwidth: NOOP,
setScreencastTrackBandwidth: NOOP,
};
};
export const useEndpointMetadata = () => {
return {
updateEndpointMetadata: NOOP,
};
};
export const updateVideoTrackMetadata = emptyPromise;
export const updateAudioTrackMetadata = emptyPromise;
export const useAudioSettings = () => {
return {
selectedAudioOutputDevice: null,
availableDevices: [],
selectOutputAudioDevice: NOOP,
selectAudioSessionMode: NOOP,
showAudioRoutePicker: NOOP,
};
};
export const useBandwidthEstimation = () => {
return {
estimation: null,
};
};
export const changeWebRTCLoggingSeverity = emptyPromise;
export const useRTCStatistics = () => {
return { statistics: [] };
};
export const VideoRendererView = () => {
return <View />;
};
export const VideoPreviewView = () => {
return <View />;
};