opensips-js 0.1.41 → 0.1.42

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opensips-js",
3
- "version": "0.1.41",
3
+ "version": "0.1.42",
4
4
  "description": "The JS package for opensips",
5
5
  "default": "src/index.ts",
6
6
  "jsdelivr": "dist/opensips-js.iife.js",
@@ -1,115 +1,115 @@
1
- import { UAEventMap } from 'jssip/lib/UA'
2
-
3
- import { IMessage, MSRPSessionExtended } from '@/types/msrp'
4
- import { ICall, RoomChangeEmitType, ICallStatus, RTCSessionExtended } from '@/types/rtc'
5
- import MSRPMessage from '@/lib/msrp/message'
6
- import { ITimeData } from '@/types/timer'
7
- import { IncomingMSRPSessionEvent, OutgoingMSRPSessionEvent } from '@/helpers/UA'
8
-
9
- export type MSRPMessageEventType = {
10
- message: MSRPMessage,
11
- session: MSRPSessionExtended
12
- }
13
-
14
- export type ChangeVolumeEventType = {
15
- callId: string
16
- volume: number
17
- }
18
-
19
- export type ConnectionStateChangeType = {
20
- session: RTCSessionExtended,
21
- connectionState: string
22
- }
23
-
24
- export type readyListener = (value: boolean) => void
25
- export type connectionListener = (value: boolean) => void
26
- export type reconnectionListener = (value: boolean) => void
27
- export type reconnectionAttemptsLimitListener = () => void
28
- export type changeActiveCallsListener = (event: { [key: string]: ICall }) => void
29
- export type changeActiveMessagesListener = (event: { [key: string]: IMessage }) => void
30
- export type TestEventListener = (event: { test: string }) => void
31
- export type ActiveRoomListener = (event: number | undefined) => void
32
- export type CallAddingProgressListener = (callId: string | undefined) => void
33
- export type MSRPInitializingListener = (sessionId: string | undefined) => void
34
- export type RoomDeletedListener = (roomId: number) => void
35
- export type changeActiveInputMediaDeviceListener = (event: string) => void
36
- export type changeActiveOutputMediaDeviceListener = (event: string) => void
37
- export type changeAvailableDeviceListListener = (event: Array<MediaDeviceInfo>) => void
38
- export type changeMuteWhenJoinListener = (value: boolean) => void
39
- export type changeIsDNDListener = (value: boolean) => void
40
- export type changeIsCallWaitingListener = (value: boolean) => void
41
- export type changeIsMutedListener = (value: boolean) => void
42
- export type changeActiveStreamListener = (value: MediaStream) => void
43
- export type addRoomListener = (value: RoomChangeEmitType) => void
44
- export type updateRoomListener = (value: RoomChangeEmitType) => void
45
- export type removeRoomListener = (value: RoomChangeEmitType) => void
46
- export type IncomingMSRPSessionListener = (event: IncomingMSRPSessionEvent) => void;
47
- export type OutgoingMSRPSessionListener = (event: OutgoingMSRPSessionEvent) => void;
48
- export type MSRPSessionListener = IncomingMSRPSessionListener | OutgoingMSRPSessionListener;
49
- export type MSRPMessageListener = (event: MSRPMessageEventType) => void;
50
- export type changeCallStatusListener = (event: { [key: string]: ICallStatus }) => void
51
- export type changeCallTimeListener = (event: { [key: string]: ITimeData }) => void
52
- export type changeCallMetricsListener = (event: { [key: string]: any }) => void
53
- export type changeCallVolumeListener = (event: ChangeVolumeEventType) => void
54
- export type changeNoiseReductionStateListener = (event: boolean) => void
55
- export type connectionStateChangeListener = (event: ConnectionStateChangeType) => void
56
- export type conferenceStartListener = () => void
57
- export type conferenceEndListener = (sessionId) => void
58
- export type changeMainVideoStreamListener = (event: { name: string, event: MediaStream }) => void
59
- export type startScreenShareListener = (event: MediaStream) => void
60
- export type stopScreenShareListener = () => void
61
- export type startBlurListener = () => void
62
- export type stopBlurListener = () => void
63
- export type memberJoinListener = (event: object) => void
64
- export type memberHangupListener = (event: object) => void
65
- export type changeAudioStateListener = (state: boolean) => void
66
- export type changeVideoStateListener = (state: boolean) => void
67
-
68
- export interface OpenSIPSEventMap extends UAEventMap {
69
- ready: readyListener
70
- connection: connectionListener
71
- reconnecting: reconnectionListener
72
- reconnectionAttemptsLimitReached: reconnectionAttemptsLimitListener
73
- // JSSIP
74
- changeActiveCalls: changeActiveCallsListener
75
- changeActiveMessages: changeActiveMessagesListener
76
- callConfirmed: TestEventListener
77
- currentActiveRoomChanged: ActiveRoomListener
78
- callAddingInProgressChanged: CallAddingProgressListener
79
- isMSRPInitializingChanged: MSRPInitializingListener
80
- roomDeleted: RoomDeletedListener
81
- changeActiveInputMediaDevice: changeActiveInputMediaDeviceListener
82
- changeActiveOutputMediaDevice: changeActiveOutputMediaDeviceListener
83
- changeAvailableDeviceList: changeAvailableDeviceListListener
84
- changeMuteWhenJoin: changeMuteWhenJoinListener
85
- changeIsDND: changeIsDNDListener
86
- changeIsCallWaiting: changeIsCallWaitingListener
87
- changeIsMuted: changeIsMutedListener
88
- changeActiveStream: changeActiveStreamListener
89
- addRoom: addRoomListener
90
- updateRoom: updateRoomListener
91
- removeRoom: removeRoomListener
92
- changeCallStatus: changeCallStatusListener
93
- changeCallTime: changeCallTimeListener
94
- changeCallMetrics: changeCallMetricsListener
95
- changeCallVolume: changeCallVolumeListener
96
- changeNoiseReductionState: changeNoiseReductionStateListener
97
- connectionStateChange: connectionStateChangeListener
98
- newMSRPMessage: MSRPMessageListener
99
- newMSRPSession: MSRPSessionListener
100
- // JANUS
101
- conferenceStart: conferenceStartListener
102
- conferenceEnd: conferenceEndListener
103
- startScreenShare: startScreenShareListener
104
- stopScreenShare: stopScreenShareListener
105
- startBlur: startBlurListener
106
- stopBlur: stopBlurListener
107
- memberJoin: memberJoinListener
108
- memberHangup: memberHangupListener
109
- changeAudioState: changeAudioStateListener
110
- changeVideoState: changeVideoStateListener
111
- }
112
-
113
- export type ListenersKeyType = keyof OpenSIPSEventMap
114
- export type ListenersCallbackFnType = OpenSIPSEventMap[ListenersKeyType]
115
- export type ListenerCallbackFnType<T extends ListenersKeyType> = OpenSIPSEventMap[T]
1
+ import { UAEventMap } from 'jssip/lib/UA'
2
+
3
+ import { IMessage, MSRPSessionExtended } from '@/types/msrp'
4
+ import { ICall, RoomChangeEmitType, ICallStatus, RTCSessionExtended } from '@/types/rtc'
5
+ import MSRPMessage from '@/lib/msrp/message'
6
+ import { ITimeData } from '@/types/timer'
7
+ import { IncomingMSRPSessionEvent, OutgoingMSRPSessionEvent } from '@/helpers/UA'
8
+
9
+ export type MSRPMessageEventType = {
10
+ message: MSRPMessage,
11
+ session: MSRPSessionExtended
12
+ }
13
+
14
+ export type ChangeVolumeEventType = {
15
+ callId: string
16
+ volume: number
17
+ }
18
+
19
+ export type ConnectionStateChangeType = {
20
+ session: RTCSessionExtended,
21
+ connectionState: string
22
+ }
23
+
24
+ export type readyListener = (value: boolean) => void
25
+ export type connectionListener = (value: boolean) => void
26
+ export type reconnectionListener = (value: boolean) => void
27
+ export type reconnectionAttemptsLimitListener = () => void
28
+ export type changeActiveCallsListener = (event: { [key: string]: ICall }) => void
29
+ export type changeActiveMessagesListener = (event: { [key: string]: IMessage }) => void
30
+ export type TestEventListener = (event: { test: string }) => void
31
+ export type ActiveRoomListener = (event: number | undefined) => void
32
+ export type CallAddingProgressListener = (callId: string | undefined) => void
33
+ export type MSRPInitializingListener = (sessionId: string | undefined) => void
34
+ export type RoomDeletedListener = (roomId: number) => void
35
+ export type changeActiveInputMediaDeviceListener = (event: string) => void
36
+ export type changeActiveOutputMediaDeviceListener = (event: string) => void
37
+ export type changeAvailableDeviceListListener = (event: Array<MediaDeviceInfo>) => void
38
+ export type changeMuteWhenJoinListener = (value: boolean) => void
39
+ export type changeIsDNDListener = (value: boolean) => void
40
+ export type changeIsCallWaitingListener = (value: boolean) => void
41
+ export type changeIsMutedListener = (value: boolean) => void
42
+ export type changeActiveStreamListener = (value: MediaStream) => void
43
+ export type addRoomListener = (value: RoomChangeEmitType) => void
44
+ export type updateRoomListener = (value: RoomChangeEmitType) => void
45
+ export type removeRoomListener = (value: RoomChangeEmitType) => void
46
+ export type IncomingMSRPSessionListener = (event: IncomingMSRPSessionEvent) => void;
47
+ export type OutgoingMSRPSessionListener = (event: OutgoingMSRPSessionEvent) => void;
48
+ export type MSRPSessionListener = IncomingMSRPSessionListener | OutgoingMSRPSessionListener;
49
+ export type MSRPMessageListener = (event: MSRPMessageEventType) => void;
50
+ export type changeCallStatusListener = (event: { [key: string]: ICallStatus }) => void
51
+ export type changeCallTimeListener = (event: { [key: string]: ITimeData }) => void
52
+ export type changeCallMetricsListener = (event: { [key: string]: any }) => void
53
+ export type changeCallVolumeListener = (event: ChangeVolumeEventType) => void
54
+ export type changeNoiseReductionStateListener = (event: boolean) => void
55
+ export type connectionStateChangeListener = (event: ConnectionStateChangeType) => void
56
+ export type conferenceStartListener = () => void
57
+ export type conferenceEndListener = (sessionId) => void
58
+ export type changeMainVideoStreamListener = (event: { name: string, event: MediaStream }) => void
59
+ export type startScreenShareListener = (event: MediaStream) => void
60
+ export type stopScreenShareListener = () => void
61
+ export type startBlurListener = () => void
62
+ export type stopBlurListener = () => void
63
+ export type memberJoinListener = (event: object) => void
64
+ export type memberHangupListener = (event: object) => void
65
+ export type changeAudioStateListener = (state: boolean) => void
66
+ export type changeVideoStateListener = (state: boolean) => void
67
+
68
+ export interface OpenSIPSEventMap extends UAEventMap {
69
+ ready: readyListener
70
+ connection: connectionListener
71
+ reconnecting: reconnectionListener
72
+ reconnectionAttemptsLimitReached: reconnectionAttemptsLimitListener
73
+ // JSSIP
74
+ changeActiveCalls: changeActiveCallsListener
75
+ changeActiveMessages: changeActiveMessagesListener
76
+ callConfirmed: TestEventListener
77
+ currentActiveRoomChanged: ActiveRoomListener
78
+ callAddingInProgressChanged: CallAddingProgressListener
79
+ isMSRPInitializingChanged: MSRPInitializingListener
80
+ roomDeleted: RoomDeletedListener
81
+ changeActiveInputMediaDevice: changeActiveInputMediaDeviceListener
82
+ changeActiveOutputMediaDevice: changeActiveOutputMediaDeviceListener
83
+ changeAvailableDeviceList: changeAvailableDeviceListListener
84
+ changeMuteWhenJoin: changeMuteWhenJoinListener
85
+ changeIsDND: changeIsDNDListener
86
+ changeIsCallWaiting: changeIsCallWaitingListener
87
+ changeIsMuted: changeIsMutedListener
88
+ changeActiveStream: changeActiveStreamListener
89
+ addRoom: addRoomListener
90
+ updateRoom: updateRoomListener
91
+ removeRoom: removeRoomListener
92
+ changeCallStatus: changeCallStatusListener
93
+ changeCallTime: changeCallTimeListener
94
+ changeCallMetrics: changeCallMetricsListener
95
+ changeCallVolume: changeCallVolumeListener
96
+ changeNoiseReductionState: changeNoiseReductionStateListener
97
+ connectionStateChange: connectionStateChangeListener
98
+ newMSRPMessage: MSRPMessageListener
99
+ newMSRPSession: MSRPSessionListener
100
+ // JANUS
101
+ conferenceStart: conferenceStartListener
102
+ conferenceEnd: conferenceEndListener
103
+ startScreenShare: startScreenShareListener
104
+ stopScreenShare: stopScreenShareListener
105
+ startBlur: startBlurListener
106
+ stopBlur: stopBlurListener
107
+ memberJoin: memberJoinListener
108
+ memberHangup: memberHangupListener
109
+ changeAudioState: changeAudioStateListener
110
+ changeVideoState: changeVideoStateListener
111
+ }
112
+
113
+ export type ListenersKeyType = keyof OpenSIPSEventMap
114
+ export type ListenersCallbackFnType = OpenSIPSEventMap[ListenersKeyType]
115
+ export type ListenerCallbackFnType<T extends ListenersKeyType> = OpenSIPSEventMap[T]