-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathStringeeHelper.js
More file actions
executable file
·78 lines (73 loc) · 2.52 KB
/
StringeeHelper.js
File metadata and controls
executable file
·78 lines (73 loc) · 2.52 KB
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
const clientEvents = {
ios: {
onConnect: 'didConnect',
onDisConnect: 'didDisConnect',
onFailWithError: 'didFailWithError',
onRequestAccessToken: 'requestAccessToken',
onIncomingCall: 'incomingCall',
onIncomingCall2: 'incomingCall2',
onCustomMessage: 'didReceiveCustomMessage',
onObjectChange: 'objectChangeNotification',
onReceiveChatRequest: 'didReceiveChatRequest',
onReceiveTransferChatRequest: 'didReceiveTransferChatRequest',
onTimeoutAnswerChat: 'timeoutAnswerChat',
onTimeoutInQueue: 'timeoutInQueue',
onConversationEnded: 'conversationEnded',
onUserBeginTyping: 'userBeginTyping',
onUserEndTyping: 'userEndTyping',
},
android: {
onConnect: 'onConnectionConnected',
onDisConnect: 'onConnectionDisconnected',
onFailWithError: 'onConnectionError',
onRequestAccessToken: 'onRequestNewToken',
onIncomingCall: 'onIncomingCall',
onIncomingCall2: 'onIncomingCall2',
onCustomMessage: 'onCustomMessage',
onObjectChange: 'onChangeEvent',
onReceiveChatRequest: 'onReceiveChatRequest',
onReceiveTransferChatRequest: 'onReceiveTransferChatRequest',
onTimeoutAnswerChat: 'onTimeoutAnswerChat',
onTimeoutInQueue: 'onTimeoutInQueue',
onConversationEnded: 'onConversationEnded',
onUserBeginTyping: 'onTyping',
onUserEndTyping: 'onEndTyping',
},
};
const callEvents = {
ios: {
onChangeSignalingState: 'didChangeSignalingState',
onChangeMediaState: 'didChangeMediaState',
onReceiveLocalStream: 'didReceiveLocalStream',
onReceiveRemoteStream: 'didReceiveRemoteStream',
onReceiveDtmfDigit: 'didReceiveDtmfDigit',
onReceiveCallInfo: 'didReceiveCallInfo',
onHandleOnAnotherDevice: 'didHandleOnAnotherDevice',
onTrackMediaStateChange: 'trackMediaStateChange',
},
android: {
onChangeSignalingState: 'onSignalingStateChange',
onChangeMediaState: 'onMediaStateChange',
onReceiveLocalStream: 'onLocalStream',
onReceiveRemoteStream: 'onRemoteStream',
onReceiveDtmfDigit: 'onDTMF',
onReceiveCallInfo: 'onCallInfo',
onHandleOnAnotherDevice: 'onHandledOnAnotherDevice',
onAudioDeviceChange: 'onAudioDeviceChange', ///only for android
onTrackMediaStateChange: 'onTrackMediaStateChange',
},
};
const StringeeVideoScalingType = {
fit: 'fit',
fill: 'fill',
};
const MediaType = {
AUDIO: 'AUDIO',
VIDEO: 'VIDEO',
};
export type RNStringeeEventCallback = (
status: boolean,
code: number,
message: string,
) => void;
export {clientEvents, callEvents, MediaType, StringeeVideoScalingType};