@100mslive/react-native-hms 0.7.2 → 0.8.1
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 +37 -39
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/android/.project +34 -0
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/reactnativehmssdk/HmsDecoder.kt +129 -29
- package/android/src/main/java/com/reactnativehmssdk/HmsHelper.kt +124 -2
- package/android/src/main/java/com/reactnativehmssdk/HmsModule.kt +138 -495
- package/android/src/main/java/com/reactnativehmssdk/HmsSDK.kt +899 -0
- package/android/src/main/java/com/reactnativehmssdk/HmsView.kt +26 -8
- package/android/src/main/java/com/reactnativehmssdk/HmssdkViewManager.kt +8 -6
- package/ios/HmsDecoder.swift +142 -20
- package/ios/HmsHelper.swift +110 -0
- package/ios/HmsManager.m +13 -7
- package/ios/HmsManager.swift +115 -375
- package/ios/HmsSDK.swift +716 -0
- package/ios/HmsView.swift +16 -8
- package/lib/commonjs/classes/HMSAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioTrackSettings.js +3 -0
- package/lib/commonjs/classes/HMSAudioTrackSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSBrowserRecordingState.js +23 -0
- package/lib/commonjs/classes/HMSBrowserRecordingState.js.map +1 -0
- package/lib/commonjs/classes/HMSCameraFacing.js +14 -0
- package/lib/commonjs/classes/HMSCameraFacing.js.map +1 -0
- package/lib/commonjs/classes/HMSConfig.js +3 -7
- package/lib/commonjs/classes/HMSConfig.js.map +1 -1
- package/lib/commonjs/classes/HMSEncoder.js +60 -32
- package/lib/commonjs/classes/HMSEncoder.js.map +1 -1
- package/lib/commonjs/classes/HMSException.js +30 -0
- package/lib/commonjs/classes/HMSException.js.map +1 -0
- package/lib/commonjs/classes/HMSHelper.js +2 -2
- package/lib/commonjs/classes/HMSHelper.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalAudioTrack.js +19 -1
- package/lib/commonjs/classes/HMSLocalAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalPeer.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalVideoTrack.js +10 -2
- package/lib/commonjs/classes/HMSLocalVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSLogger.js.map +1 -1
- package/lib/commonjs/classes/HMSPeer.js +3 -0
- package/lib/commonjs/classes/HMSPeer.js.map +1 -1
- package/lib/commonjs/classes/HMSPeerUpdate.js +1 -0
- package/lib/commonjs/classes/HMSPeerUpdate.js.map +1 -1
- package/lib/commonjs/classes/HMSPermissions.js +7 -7
- package/lib/commonjs/classes/HMSPermissions.js.map +1 -1
- package/lib/commonjs/classes/HMSRTMPConfig.js +26 -0
- package/lib/commonjs/classes/HMSRTMPConfig.js.map +1 -0
- package/lib/commonjs/classes/HMSRemoteAudioTrack.js +2 -0
- package/lib/commonjs/classes/HMSRemoteAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSRemotePeer.js.map +1 -1
- package/lib/commonjs/classes/HMSRemoteVideoTrack.js +2 -0
- package/lib/commonjs/classes/HMSRemoteVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSRoom.js +9 -0
- package/lib/commonjs/classes/HMSRoom.js.map +1 -1
- package/lib/commonjs/classes/HMSRtmpStreamingState.js +23 -0
- package/lib/commonjs/classes/HMSRtmpStreamingState.js.map +1 -0
- package/lib/commonjs/classes/HMSSDK.js +336 -109
- package/lib/commonjs/classes/HMSSDK.js.map +1 -1
- package/lib/commonjs/classes/HMSServerRecordingState.js +23 -0
- package/lib/commonjs/classes/HMSServerRecordingState.js.map +1 -0
- package/lib/commonjs/classes/HMSTrack.js +8 -18
- package/lib/commonjs/classes/HMSTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSTrackType.js +14 -0
- package/lib/commonjs/classes/HMSTrackType.js.map +1 -0
- package/lib/commonjs/classes/HMSVideoResolution.js +23 -0
- package/lib/commonjs/classes/HMSVideoResolution.js.map +1 -0
- package/lib/commonjs/classes/HMSVideoSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoTrack.js +2 -0
- package/lib/commonjs/classes/HMSVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoTrackSettings.js +0 -3
- package/lib/commonjs/classes/HMSVideoTrackSettings.js.map +1 -1
- package/lib/commonjs/classes/HmsView.js +10 -7
- package/lib/commonjs/classes/HmsView.js.map +1 -1
- package/lib/commonjs/index.js +98 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/classes/HMSAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSAudioTrackSettings.js +3 -0
- package/lib/module/classes/HMSAudioTrackSettings.js.map +1 -1
- package/lib/module/classes/HMSBrowserRecordingState.js +14 -0
- package/lib/module/classes/HMSBrowserRecordingState.js.map +1 -0
- package/lib/module/classes/HMSCameraFacing.js +7 -0
- package/lib/module/classes/HMSCameraFacing.js.map +1 -0
- package/lib/module/classes/HMSConfig.js +3 -7
- package/lib/module/classes/HMSConfig.js.map +1 -1
- package/lib/module/classes/HMSEncoder.js +59 -32
- package/lib/module/classes/HMSEncoder.js.map +1 -1
- package/lib/module/classes/HMSException.js +21 -0
- package/lib/module/classes/HMSException.js.map +1 -0
- package/lib/module/classes/HMSHelper.js +2 -2
- package/lib/module/classes/HMSHelper.js.map +1 -1
- package/lib/module/classes/HMSLocalAudioTrack.js +20 -2
- package/lib/module/classes/HMSLocalAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSLocalPeer.js.map +1 -1
- package/lib/module/classes/HMSLocalVideoTrack.js +10 -2
- package/lib/module/classes/HMSLocalVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSLogger.js.map +1 -1
- package/lib/module/classes/HMSPeer.js +3 -0
- package/lib/module/classes/HMSPeer.js.map +1 -1
- package/lib/module/classes/HMSPeerUpdate.js +1 -0
- package/lib/module/classes/HMSPeerUpdate.js.map +1 -1
- package/lib/module/classes/HMSPermissions.js +7 -7
- package/lib/module/classes/HMSPermissions.js.map +1 -1
- package/lib/module/classes/HMSRTMPConfig.js +17 -0
- package/lib/module/classes/HMSRTMPConfig.js.map +1 -0
- package/lib/module/classes/HMSRemoteAudioTrack.js +2 -0
- package/lib/module/classes/HMSRemoteAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSRemotePeer.js.map +1 -1
- package/lib/module/classes/HMSRemoteVideoTrack.js +2 -0
- package/lib/module/classes/HMSRemoteVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSRoom.js +9 -0
- package/lib/module/classes/HMSRoom.js.map +1 -1
- package/lib/module/classes/HMSRtmpStreamingState.js +14 -0
- package/lib/module/classes/HMSRtmpStreamingState.js.map +1 -0
- package/lib/module/classes/HMSSDK.js +328 -109
- package/lib/module/classes/HMSSDK.js.map +1 -1
- package/lib/module/classes/HMSServerRecordingState.js +14 -0
- package/lib/module/classes/HMSServerRecordingState.js.map +1 -0
- package/lib/module/classes/HMSTrack.js +8 -16
- package/lib/module/classes/HMSTrack.js.map +1 -1
- package/lib/module/classes/HMSTrackType.js +7 -0
- package/lib/module/classes/HMSTrackType.js.map +1 -0
- package/lib/module/classes/HMSVideoResolution.js +14 -0
- package/lib/module/classes/HMSVideoResolution.js.map +1 -0
- package/lib/module/classes/HMSVideoSettings.js.map +1 -1
- package/lib/module/classes/HMSVideoTrack.js +2 -0
- package/lib/module/classes/HMSVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSVideoTrackSettings.js +0 -3
- package/lib/module/classes/HMSVideoTrackSettings.js.map +1 -1
- package/lib/module/classes/HmsView.js +10 -7
- package/lib/module/classes/HmsView.js.map +1 -1
- package/lib/module/index.js +7 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/classes/HMSAudioTrack.d.ts +3 -0
- package/lib/typescript/classes/HMSAudioTrackSettings.d.ts +3 -0
- package/lib/typescript/classes/HMSBrowserRecordingState.d.ts +9 -0
- package/lib/typescript/classes/HMSCameraFacing.d.ts +4 -0
- package/lib/typescript/classes/HMSConfig.d.ts +2 -4
- package/lib/typescript/classes/HMSEncoder.d.ts +14 -12
- package/lib/typescript/classes/HMSException.d.ts +22 -0
- package/lib/typescript/classes/HMSLocalAudioTrack.d.ts +5 -0
- package/lib/typescript/classes/HMSLocalPeer.d.ts +3 -0
- package/lib/typescript/classes/HMSLocalVideoTrack.d.ts +4 -0
- package/lib/typescript/classes/HMSLogger.d.ts +4 -4
- package/lib/typescript/classes/HMSPeer.d.ts +2 -0
- package/lib/typescript/classes/HMSPeerUpdate.d.ts +1 -0
- package/lib/typescript/classes/HMSPermissions.d.ts +6 -6
- package/lib/typescript/classes/HMSRTMPConfig.d.ts +10 -0
- package/lib/typescript/classes/HMSRemoteAudioTrack.d.ts +4 -0
- package/lib/typescript/classes/HMSRemotePeer.d.ts +3 -0
- package/lib/typescript/classes/HMSRemoteVideoTrack.d.ts +4 -0
- package/lib/typescript/classes/HMSRoom.d.ts +9 -0
- package/lib/typescript/classes/HMSRtmpStreamingState.d.ts +9 -0
- package/lib/typescript/classes/HMSSDK.d.ts +36 -6
- package/lib/typescript/classes/HMSServerRecordingState.d.ts +9 -0
- package/lib/typescript/classes/HMSTrack.d.ts +6 -1
- package/lib/typescript/classes/HMSTrackType.d.ts +4 -0
- package/lib/typescript/classes/HMSVideoResolution.d.ts +8 -0
- package/lib/typescript/classes/HMSVideoSettings.d.ts +3 -3
- package/lib/typescript/classes/HMSVideoTrack.d.ts +5 -1
- package/lib/typescript/classes/HMSVideoTrackSettings.d.ts +13 -10
- package/lib/typescript/classes/HmsView.d.ts +2 -1
- package/lib/typescript/index.d.ts +7 -0
- package/package.json +1 -1
- package/src/classes/HMSAudioTrack.ts +3 -0
- package/src/classes/HMSAudioTrackSettings.ts +9 -1
- package/src/classes/HMSBrowserRecordingState.ts +11 -0
- package/src/classes/HMSCameraFacing.ts +4 -0
- package/src/classes/HMSConfig.ts +3 -7
- package/src/classes/HMSEncoder.ts +62 -28
- package/src/classes/HMSException.ts +33 -0
- package/src/classes/HMSHelper.ts +2 -2
- package/src/classes/HMSLocalAudioTrack.ts +19 -2
- package/src/classes/HMSLocalPeer.ts +3 -0
- package/src/classes/HMSLocalVideoTrack.ts +7 -2
- package/src/classes/HMSLogger.ts +5 -5
- package/src/classes/HMSPeer.ts +3 -0
- package/src/classes/HMSPeerUpdate.ts +1 -0
- package/src/classes/HMSPermissions.ts +9 -9
- package/src/classes/HMSRTMPConfig.ts +15 -0
- package/src/classes/HMSRemoteAudioTrack.ts +13 -2
- package/src/classes/HMSRemotePeer.ts +3 -0
- package/src/classes/HMSRemoteVideoTrack.ts +13 -2
- package/src/classes/HMSRoom.ts +12 -0
- package/src/classes/HMSRtmpStreamingState.ts +11 -0
- package/src/classes/{HMSSDK.ts → HMSSDK.tsx} +284 -42
- package/src/classes/HMSServerRecordingState.ts +11 -0
- package/src/classes/HMSTrack.ts +9 -15
- package/src/classes/HMSTrackType.ts +4 -0
- package/src/classes/HMSVideoResolution.ts +9 -0
- package/src/classes/HMSVideoSettings.ts +3 -3
- package/src/classes/HMSVideoTrack.ts +6 -1
- package/src/classes/HMSVideoTrackSettings.ts +13 -10
- package/src/classes/HmsView.tsx +4 -0
- package/src/index.ts +7 -0
- package/ios/Hmssdk.m +0 -8
- package/ios/Hmssdk.swift +0 -8
|
@@ -14,29 +14,33 @@ import { HMSLocalAudioTrack } from './HMSLocalAudioTrack';
|
|
|
14
14
|
import { HMSRole } from './HMSRole';
|
|
15
15
|
import { HMSRoleChangeRequest } from './HMSRoleChangeRequest';
|
|
16
16
|
import { HMSChangeTrackStateRequest } from './HMSChangeTrackStateRequest';
|
|
17
|
+
import { HMSVideoResolution } from './HMSVideoResolution';
|
|
17
18
|
|
|
18
19
|
export class HMSEncoder {
|
|
19
|
-
static encodeHmsRoom(room:
|
|
20
|
+
static encodeHmsRoom(room: HMSRoom, id: string) {
|
|
20
21
|
const encodedObj = {
|
|
21
22
|
id: room?.id,
|
|
22
23
|
metaData: room?.metaData,
|
|
23
24
|
name: room?.name,
|
|
24
|
-
peers: HMSEncoder.encodeHmsPeers(room?.peers),
|
|
25
|
+
peers: HMSEncoder.encodeHmsPeers(room?.peers, id),
|
|
26
|
+
browserRecordingState: room?.browserRecordingState,
|
|
27
|
+
rtmpHMSRtmpStreamingState: room?.rtmpHMSRtmpStreamingState,
|
|
28
|
+
serverRecordingState: room?.serverRecordingState,
|
|
25
29
|
};
|
|
26
30
|
|
|
27
31
|
return new HMSRoom(encodedObj);
|
|
28
32
|
}
|
|
29
33
|
|
|
30
|
-
static encodeHmsPeers(peers: any) {
|
|
34
|
+
static encodeHmsPeers(peers: any, id: string) {
|
|
31
35
|
const encodedPeers: HMSPeer[] = [];
|
|
32
36
|
peers?.map((peer: any) => {
|
|
33
|
-
encodedPeers.push(HMSEncoder.encodeHmsPeer(peer));
|
|
37
|
+
encodedPeers.push(HMSEncoder.encodeHmsPeer(peer, id));
|
|
34
38
|
});
|
|
35
39
|
|
|
36
40
|
return encodedPeers;
|
|
37
41
|
}
|
|
38
42
|
|
|
39
|
-
static encodeHmsPeer(peer: any) {
|
|
43
|
+
static encodeHmsPeer(peer: any, id: string) {
|
|
40
44
|
const encodedObj = {
|
|
41
45
|
peerID: peer?.peerID,
|
|
42
46
|
name: peer?.name,
|
|
@@ -44,71 +48,83 @@ export class HMSEncoder {
|
|
|
44
48
|
role: HMSEncoder.encodeHmsRole(peer?.role),
|
|
45
49
|
customerUserID: peer?.customerUserID,
|
|
46
50
|
customerDescription: peer?.customerDescription,
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
metadata: peer.metadata,
|
|
52
|
+
audioTrack: HMSEncoder.encodeHmsAudioTrack(peer?.audioTrack, id),
|
|
53
|
+
videoTrack: HMSEncoder.encodeHmsVideoTrack(peer?.videoTrack, id),
|
|
49
54
|
auxiliaryTracks: HMSEncoder.encodeHmsAuxiliaryTracks(
|
|
50
|
-
peer?.auxiliaryTracks
|
|
55
|
+
peer?.auxiliaryTracks,
|
|
56
|
+
id
|
|
51
57
|
),
|
|
52
58
|
};
|
|
53
59
|
|
|
54
60
|
return new HMSPeer(encodedObj);
|
|
55
61
|
}
|
|
56
62
|
|
|
57
|
-
static encodeHmsAudioTrack(track: any) {
|
|
63
|
+
static encodeHmsAudioTrack(track: any, id: string) {
|
|
58
64
|
const encodedObj = {
|
|
59
65
|
trackId: track?.trackId,
|
|
60
66
|
source: track?.source,
|
|
61
67
|
trackDescription: track?.trackDescription,
|
|
62
68
|
isMute: track?.isMute,
|
|
69
|
+
id: id,
|
|
70
|
+
type: track?.type,
|
|
63
71
|
};
|
|
64
72
|
|
|
65
73
|
return new HMSAudioTrack(encodedObj);
|
|
66
74
|
}
|
|
67
75
|
|
|
68
|
-
static encodeHmsVideoTrack(track: any) {
|
|
76
|
+
static encodeHmsVideoTrack(track: any, id: string) {
|
|
69
77
|
const encodedObj = {
|
|
78
|
+
id: id,
|
|
70
79
|
trackId: track?.trackId,
|
|
71
80
|
source: track?.source,
|
|
72
81
|
trackDescription: track?.trackDescription,
|
|
73
82
|
isMute: track?.isMute,
|
|
83
|
+
isDegraded: track?.isDegraded,
|
|
84
|
+
type: track?.type,
|
|
74
85
|
};
|
|
75
86
|
|
|
76
87
|
return new HMSVideoTrack(encodedObj);
|
|
77
88
|
}
|
|
78
89
|
|
|
79
|
-
static encodeHmsAuxiliaryTracks(tracks: any) {
|
|
90
|
+
static encodeHmsAuxiliaryTracks(tracks: any, id: string) {
|
|
80
91
|
const auxiliaryTracks: HMSTrack[] = [];
|
|
81
92
|
tracks?.map((track: any) => {
|
|
82
|
-
auxiliaryTracks.push(HMSEncoder.encodeHmsTrack(track));
|
|
93
|
+
auxiliaryTracks.push(HMSEncoder.encodeHmsTrack(track, id));
|
|
83
94
|
});
|
|
84
95
|
return auxiliaryTracks;
|
|
85
96
|
}
|
|
86
97
|
|
|
87
|
-
static encodeHmsTrack(track: any) {
|
|
98
|
+
static encodeHmsTrack(track: any, id: string) {
|
|
88
99
|
const encodedObj = {
|
|
89
100
|
trackId: track?.trackId,
|
|
90
101
|
source: track?.source,
|
|
91
102
|
trackDescription: track?.trackDescription,
|
|
92
103
|
isMute: track?.isMute,
|
|
104
|
+
id: id,
|
|
105
|
+
type: track?.type,
|
|
93
106
|
};
|
|
94
107
|
|
|
95
108
|
return new HMSTrack(encodedObj);
|
|
96
109
|
}
|
|
97
110
|
|
|
98
|
-
static encodeHmsLocalPeer(peer: any) {
|
|
111
|
+
static encodeHmsLocalPeer(peer: any, id: string) {
|
|
99
112
|
const encodedObj = {
|
|
100
113
|
peerID: peer.peerID,
|
|
101
114
|
name: peer.name,
|
|
102
115
|
isLocal: peer.isLocal,
|
|
103
116
|
customerUserID: peer.customerUserID,
|
|
104
117
|
customerDescription: peer.customerDescription,
|
|
118
|
+
metadata: peer.metadata,
|
|
105
119
|
role: HMSEncoder.encodeHmsRole(peer?.role),
|
|
106
|
-
audioTrack: HMSEncoder.encodeHmsAudioTrack(peer.audioTrack),
|
|
107
|
-
videoTrack: HMSEncoder.encodeHmsVideoTrack(peer.videoTrack),
|
|
120
|
+
audioTrack: HMSEncoder.encodeHmsAudioTrack(peer.audioTrack, id),
|
|
121
|
+
videoTrack: HMSEncoder.encodeHmsVideoTrack(peer.videoTrack, id),
|
|
108
122
|
auxiliaryTracks: HMSEncoder.encodeHmsAuxiliaryTracks(
|
|
109
|
-
peer.auxiliaryTracks
|
|
123
|
+
peer.auxiliaryTracks,
|
|
124
|
+
id
|
|
110
125
|
),
|
|
111
126
|
localAudioTrackData: {
|
|
127
|
+
id: id,
|
|
112
128
|
trackId: peer?.localAudioTrackData?.trackId,
|
|
113
129
|
source: peer?.localAudioTrackData?.source,
|
|
114
130
|
trackDescription: peer?.localAudioTrackData?.trackDescription,
|
|
@@ -118,6 +134,7 @@ export class HMSEncoder {
|
|
|
118
134
|
),
|
|
119
135
|
},
|
|
120
136
|
localVideoTrackData: {
|
|
137
|
+
id: id,
|
|
121
138
|
trackId: peer?.localVideoTrackData?.trackId,
|
|
122
139
|
source: peer?.localVideoTrackData?.source,
|
|
123
140
|
trackDescription: peer?.localVideoTrackData?.trackDescription,
|
|
@@ -135,6 +152,7 @@ export class HMSEncoder {
|
|
|
135
152
|
const encodedObj = {
|
|
136
153
|
maxBitrate: settings?.maxBitrate,
|
|
137
154
|
trackDescription: settings?.trackDescription,
|
|
155
|
+
codec: settings?.codec,
|
|
138
156
|
};
|
|
139
157
|
|
|
140
158
|
return new HMSAudioTrackSettings(encodedObj);
|
|
@@ -143,7 +161,7 @@ export class HMSEncoder {
|
|
|
143
161
|
static encodeHmsVideoTrackSettings(settings: any) {
|
|
144
162
|
const encodedObj = {
|
|
145
163
|
codec: settings?.codec,
|
|
146
|
-
resolution: settings?.resolution,
|
|
164
|
+
resolution: HMSEncoder.encodeHmsVideoResolution(settings?.resolution),
|
|
147
165
|
maxBitrate: settings?.maxBitrate,
|
|
148
166
|
maxFrameRate: settings?.maxFrameRate,
|
|
149
167
|
cameraFacing: settings?.cameraFacing,
|
|
@@ -153,11 +171,20 @@ export class HMSEncoder {
|
|
|
153
171
|
return new HMSVideoTrackSettings(encodedObj);
|
|
154
172
|
}
|
|
155
173
|
|
|
156
|
-
static
|
|
174
|
+
static encodeHmsVideoResolution(resolution: any) {
|
|
175
|
+
const encodedObj = {
|
|
176
|
+
height: resolution?.height,
|
|
177
|
+
width: resolution?.width,
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
return new HMSVideoResolution(encodedObj);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
static encodeHmsRemotePeers(peers: any, id: string) {
|
|
157
184
|
const hmsPeers: any[] = [];
|
|
158
185
|
|
|
159
186
|
peers.map((peer: any) => {
|
|
160
|
-
const encodedPeer = HMSEncoder.encodeHmsRemotePeer(peer);
|
|
187
|
+
const encodedPeer = HMSEncoder.encodeHmsRemotePeer(peer, id);
|
|
161
188
|
|
|
162
189
|
hmsPeers.push(encodedPeer);
|
|
163
190
|
});
|
|
@@ -165,20 +192,23 @@ export class HMSEncoder {
|
|
|
165
192
|
return hmsPeers;
|
|
166
193
|
}
|
|
167
194
|
|
|
168
|
-
static encodeHmsRemotePeer(peer: any) {
|
|
195
|
+
static encodeHmsRemotePeer(peer: any, id: string) {
|
|
169
196
|
const encodedObj = {
|
|
170
197
|
peerID: peer.peerID,
|
|
171
198
|
name: peer.name,
|
|
172
199
|
isLocal: peer.isLocal,
|
|
173
200
|
customerUserID: peer.customerUserID,
|
|
174
201
|
customerDescription: peer.customerDescription,
|
|
202
|
+
metadata: peer.metadata,
|
|
175
203
|
role: HMSEncoder.encodeHmsRole(peer?.role),
|
|
176
|
-
audioTrack: HMSEncoder.encodeHmsAudioTrack(peer.audioTrack),
|
|
177
|
-
videoTrack: HMSEncoder.encodeHmsVideoTrack(peer.videoTrack),
|
|
204
|
+
audioTrack: HMSEncoder.encodeHmsAudioTrack(peer.audioTrack, id),
|
|
205
|
+
videoTrack: HMSEncoder.encodeHmsVideoTrack(peer.videoTrack, id),
|
|
178
206
|
auxiliaryTracks: HMSEncoder.encodeHmsAuxiliaryTracks(
|
|
179
|
-
peer.auxiliaryTracks
|
|
207
|
+
peer.auxiliaryTracks,
|
|
208
|
+
id
|
|
180
209
|
),
|
|
181
210
|
remoteAudioTrackData: {
|
|
211
|
+
id: id,
|
|
182
212
|
trackId: peer?.remoteAudioTrackData?.trackId,
|
|
183
213
|
source: peer?.remoteAudioTrackData?.source,
|
|
184
214
|
trackDescription: peer?.remoteAudioTrackData?.trackDescription,
|
|
@@ -186,6 +216,7 @@ export class HMSEncoder {
|
|
|
186
216
|
playbackAllowed: peer?.remoteAudioTrackData?.playbackAllowed,
|
|
187
217
|
},
|
|
188
218
|
remoteVideoTrackData: {
|
|
219
|
+
id: id,
|
|
189
220
|
trackId: peer?.remoteVideoTrackData?.trackId,
|
|
190
221
|
source: peer?.remoteVideoTrackData?.source,
|
|
191
222
|
trackDescription: peer?.remoteVideoTrackData?.trackDescription,
|
|
@@ -227,18 +258,21 @@ export class HMSEncoder {
|
|
|
227
258
|
return hmsRole;
|
|
228
259
|
}
|
|
229
260
|
|
|
230
|
-
static encodeHmsRoleChangeRequest(data: any) {
|
|
261
|
+
static encodeHmsRoleChangeRequest(data: any, id: string) {
|
|
231
262
|
const encodedRoleChangeRequest = {
|
|
232
|
-
requestedBy: HMSEncoder.encodeHmsPeer(data.requestedBy),
|
|
263
|
+
requestedBy: HMSEncoder.encodeHmsPeer(data.requestedBy, id),
|
|
233
264
|
suggestedRole: HMSEncoder.encodeHmsRole(data.suggestedRole),
|
|
234
265
|
};
|
|
235
266
|
|
|
236
267
|
return new HMSRoleChangeRequest(encodedRoleChangeRequest);
|
|
237
268
|
}
|
|
238
269
|
|
|
239
|
-
static encodeHmsChangeTrackStateRequest(
|
|
270
|
+
static encodeHmsChangeTrackStateRequest(
|
|
271
|
+
data: HMSChangeTrackStateRequest,
|
|
272
|
+
id: string
|
|
273
|
+
) {
|
|
240
274
|
const encodedChangeTrackStateRequest = {
|
|
241
|
-
requestedBy: HMSEncoder.encodeHmsPeer(data.requestedBy),
|
|
275
|
+
requestedBy: HMSEncoder.encodeHmsPeer(data.requestedBy, id),
|
|
242
276
|
trackType: data.trackType,
|
|
243
277
|
};
|
|
244
278
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export class HMSException {
|
|
2
|
+
public error: {
|
|
3
|
+
code: number;
|
|
4
|
+
description: string;
|
|
5
|
+
localizedDescription: string;
|
|
6
|
+
message: string;
|
|
7
|
+
name: string;
|
|
8
|
+
action: string;
|
|
9
|
+
};
|
|
10
|
+
public event: string;
|
|
11
|
+
|
|
12
|
+
constructor(params: {
|
|
13
|
+
error: {
|
|
14
|
+
code: number;
|
|
15
|
+
description: string;
|
|
16
|
+
localizedDescription: string;
|
|
17
|
+
message: string;
|
|
18
|
+
name: string;
|
|
19
|
+
action: string;
|
|
20
|
+
};
|
|
21
|
+
event: string;
|
|
22
|
+
}) {
|
|
23
|
+
this.error = {
|
|
24
|
+
code: params.error.code,
|
|
25
|
+
description: params.error.description,
|
|
26
|
+
localizedDescription: params.error.localizedDescription,
|
|
27
|
+
message: params.error.message,
|
|
28
|
+
name: params.error.name,
|
|
29
|
+
action: params.error.action,
|
|
30
|
+
};
|
|
31
|
+
this.event = params.event;
|
|
32
|
+
}
|
|
33
|
+
}
|
package/src/classes/HMSHelper.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { NativeModules } from 'react-native';
|
|
1
|
+
import { NativeModules, Platform } from 'react-native';
|
|
2
2
|
import { HMSAudioTrack } from './HMSAudioTrack';
|
|
3
3
|
import type { HMSAudioTrackSettings } from './HMSAudioTrackSettings';
|
|
4
|
+
import type { HMSTrackType } from './HMSTrackType';
|
|
4
5
|
|
|
5
6
|
const {
|
|
6
7
|
/**
|
|
@@ -11,6 +12,7 @@ const {
|
|
|
11
12
|
|
|
12
13
|
export class HMSLocalAudioTrack extends HMSAudioTrack {
|
|
13
14
|
settings?: HMSAudioTrackSettings;
|
|
15
|
+
id: string;
|
|
14
16
|
|
|
15
17
|
/**
|
|
16
18
|
* Switches Audio of current user on/off depending upon the value of isMute
|
|
@@ -19,17 +21,32 @@ export class HMSLocalAudioTrack extends HMSAudioTrack {
|
|
|
19
21
|
* @memberof HMSLocalAudioTrack
|
|
20
22
|
*/
|
|
21
23
|
setMute(isMute: boolean) {
|
|
22
|
-
HmsManager.setLocalMute(isMute);
|
|
24
|
+
HmsManager.setLocalMute({ isMute, id: this.id });
|
|
23
25
|
}
|
|
24
26
|
|
|
27
|
+
getVolume = async () => {
|
|
28
|
+
if (Platform.OS === 'ios') {
|
|
29
|
+
return 'This API not available for IOS';
|
|
30
|
+
}
|
|
31
|
+
const volume = await HmsManager.getVolume({
|
|
32
|
+
trackId: this.trackId,
|
|
33
|
+
id: this.id,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
return volume;
|
|
37
|
+
};
|
|
38
|
+
|
|
25
39
|
constructor(params: {
|
|
40
|
+
id: string;
|
|
26
41
|
trackId: string;
|
|
27
42
|
source?: number | string;
|
|
28
43
|
trackDescription?: string;
|
|
29
44
|
isMute?: boolean;
|
|
30
45
|
settings?: HMSAudioTrackSettings;
|
|
46
|
+
type?: HMSTrackType;
|
|
31
47
|
}) {
|
|
32
48
|
super(params);
|
|
49
|
+
this.id = params.id;
|
|
33
50
|
this.settings = params.settings;
|
|
34
51
|
}
|
|
35
52
|
}
|
|
@@ -25,11 +25,13 @@ export class HMSLocalPeer extends HMSPeer {
|
|
|
25
25
|
isLocal?: boolean;
|
|
26
26
|
customerUserID?: string;
|
|
27
27
|
customerDescription?: string;
|
|
28
|
+
metadata?: string;
|
|
28
29
|
audioTrack?: HMSAudioTrack;
|
|
29
30
|
videoTrack?: HMSVideoTrack;
|
|
30
31
|
role?: HMSRole;
|
|
31
32
|
auxiliaryTracks?: HMSTrack[];
|
|
32
33
|
localAudioTrackData?: {
|
|
34
|
+
id: string;
|
|
33
35
|
trackId: string;
|
|
34
36
|
source?: number | string;
|
|
35
37
|
trackDescription?: string;
|
|
@@ -37,6 +39,7 @@ export class HMSLocalPeer extends HMSPeer {
|
|
|
37
39
|
settings?: HMSAudioTrackSettings;
|
|
38
40
|
};
|
|
39
41
|
localVideoTrackData?: {
|
|
42
|
+
id: string;
|
|
40
43
|
trackId: string;
|
|
41
44
|
source?: number | string;
|
|
42
45
|
trackDescription?: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { NativeModules } from 'react-native';
|
|
2
2
|
import { HMSVideoTrack } from './HMSVideoTrack';
|
|
3
3
|
import type { HMSVideoTrackSettings } from './HMSVideoTrackSettings';
|
|
4
|
+
import type { HMSTrackType } from './HMSTrackType';
|
|
4
5
|
|
|
5
6
|
const {
|
|
6
7
|
/**
|
|
@@ -13,6 +14,7 @@ export class HMSLocalVideoTrack extends HMSVideoTrack {
|
|
|
13
14
|
settings?: HMSVideoTrackSettings;
|
|
14
15
|
startCapturing?: Function;
|
|
15
16
|
stopCapturing?: Function;
|
|
17
|
+
id: string;
|
|
16
18
|
|
|
17
19
|
/**
|
|
18
20
|
* switches camera between front/back
|
|
@@ -20,7 +22,7 @@ export class HMSLocalVideoTrack extends HMSVideoTrack {
|
|
|
20
22
|
* @memberof HMSSDK
|
|
21
23
|
*/
|
|
22
24
|
switchCamera = () => {
|
|
23
|
-
HmsManager.switchCamera();
|
|
25
|
+
HmsManager.switchCamera({ id: this.id });
|
|
24
26
|
};
|
|
25
27
|
|
|
26
28
|
/**
|
|
@@ -30,17 +32,20 @@ export class HMSLocalVideoTrack extends HMSVideoTrack {
|
|
|
30
32
|
* @memberof HMSLocalVideoTrack
|
|
31
33
|
*/
|
|
32
34
|
setMute(isMute: boolean) {
|
|
33
|
-
HmsManager.setLocalVideoMute(isMute);
|
|
35
|
+
HmsManager.setLocalVideoMute({ isMute, id: this.id });
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
constructor(params: {
|
|
39
|
+
id: string;
|
|
37
40
|
trackId: string;
|
|
38
41
|
source?: number | string;
|
|
39
42
|
trackDescription?: string;
|
|
40
43
|
isMute?: boolean;
|
|
41
44
|
settings?: HMSVideoTrackSettings;
|
|
45
|
+
type?: HMSTrackType;
|
|
42
46
|
}) {
|
|
43
47
|
super(params);
|
|
44
48
|
this.settings = params.settings;
|
|
49
|
+
this.id = params.id;
|
|
45
50
|
}
|
|
46
51
|
}
|
package/src/classes/HMSLogger.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { HMSLogLevel } from './HMSLogLevel';
|
|
2
2
|
|
|
3
3
|
export class HMSLogger {
|
|
4
|
-
private _verbose:
|
|
5
|
-
private _warning:
|
|
6
|
-
private _error:
|
|
4
|
+
private _verbose: boolean = false;
|
|
5
|
+
private _warning: boolean = false;
|
|
6
|
+
private _error: boolean = false;
|
|
7
7
|
|
|
8
|
-
constructor(params?: { verbose:
|
|
8
|
+
constructor(params?: { verbose: boolean; warning: boolean; error: boolean }) {
|
|
9
9
|
if (params) {
|
|
10
10
|
this._verbose = params.verbose;
|
|
11
11
|
this._warning = params.warning;
|
|
@@ -31,7 +31,7 @@ export class HMSLogger {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
updateLogLevel(level: HMSLogLevel, value:
|
|
34
|
+
updateLogLevel(level: HMSLogLevel, value: boolean) {
|
|
35
35
|
switch (level) {
|
|
36
36
|
case HMSLogLevel.VERBOSE: {
|
|
37
37
|
this._verbose = value;
|
package/src/classes/HMSPeer.ts
CHANGED
|
@@ -9,6 +9,7 @@ export class HMSPeer {
|
|
|
9
9
|
isLocal?: boolean;
|
|
10
10
|
customerUserID?: string;
|
|
11
11
|
customerDescription?: string;
|
|
12
|
+
metadata?: string;
|
|
12
13
|
role?: HMSRole;
|
|
13
14
|
|
|
14
15
|
audioTrack?: HMSAudioTrack;
|
|
@@ -22,6 +23,7 @@ export class HMSPeer {
|
|
|
22
23
|
isLocal?: boolean;
|
|
23
24
|
customerUserID?: string;
|
|
24
25
|
customerDescription?: string;
|
|
26
|
+
metadata?: string;
|
|
25
27
|
role?: HMSRole;
|
|
26
28
|
audioTrack?: HMSAudioTrack;
|
|
27
29
|
videoTrack?: HMSVideoTrack;
|
|
@@ -36,5 +38,6 @@ export class HMSPeer {
|
|
|
36
38
|
this.videoTrack = params.videoTrack;
|
|
37
39
|
this.auxiliaryTracks = params.auxiliaryTracks;
|
|
38
40
|
this.role = params.role;
|
|
41
|
+
this.metadata = params.metadata;
|
|
39
42
|
}
|
|
40
43
|
}
|
|
@@ -3,6 +3,7 @@ export enum HMSPeerUpdate {
|
|
|
3
3
|
PEER_LEFT = 'PEER_LEFT',
|
|
4
4
|
AUDIO_TOGGLED = 'AUDIO_TOGGLED',
|
|
5
5
|
VIDEO_TOGGLED = 'VIDEO_TOGGLED',
|
|
6
|
+
METADATA_CHANGED = 'METADATA_CHANGED',
|
|
6
7
|
BECAME_DOMINANT_SPEAKER = 'BECAME_DOMINANT_SPEAKER',
|
|
7
8
|
NO_DOMINANT_SPEAKER = 'NO_DOMINANT_SPEAKER',
|
|
8
9
|
RESIGNED_DOMINANT_SPEAKER = 'RESIGNED_DOMINANT_SPEAKER',
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
export class HMSPermissions {
|
|
2
2
|
endRoom?: boolean;
|
|
3
3
|
removeOthers?: boolean;
|
|
4
|
-
|
|
4
|
+
unmute?: boolean;
|
|
5
5
|
mute?: boolean;
|
|
6
|
-
askToUnmute?: boolean;
|
|
7
|
-
muteSelective?: boolean;
|
|
8
6
|
changeRole?: boolean;
|
|
7
|
+
recording?: boolean;
|
|
8
|
+
rtmp?: boolean;
|
|
9
9
|
|
|
10
10
|
constructor(params?: {
|
|
11
11
|
endRoom?: boolean;
|
|
12
12
|
removeOthers?: boolean;
|
|
13
|
-
|
|
13
|
+
unmute?: boolean;
|
|
14
14
|
mute?: boolean;
|
|
15
|
-
askToUnmute?: boolean;
|
|
16
|
-
muteSelective?: boolean;
|
|
17
15
|
changeRole?: boolean;
|
|
16
|
+
recording?: boolean;
|
|
17
|
+
rtmp?: boolean;
|
|
18
18
|
}) {
|
|
19
19
|
if (params) {
|
|
20
20
|
this.endRoom = params.endRoom;
|
|
21
21
|
this.removeOthers = params.removeOthers;
|
|
22
|
-
this.
|
|
22
|
+
this.unmute = params.unmute;
|
|
23
23
|
this.mute = params.mute;
|
|
24
|
-
this.askToUnmute = params.askToUnmute;
|
|
25
|
-
this.muteSelective = params.muteSelective;
|
|
26
24
|
this.changeRole = params.changeRole;
|
|
25
|
+
this.recording = params.recording;
|
|
26
|
+
this.rtmp = params.rtmp;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export class HMSRTMPConfig {
|
|
2
|
+
meetingURL: string;
|
|
3
|
+
rtmpURLs?: Array<string>;
|
|
4
|
+
record: boolean;
|
|
5
|
+
|
|
6
|
+
constructor(params: {
|
|
7
|
+
meetingURL: string;
|
|
8
|
+
rtmpURLs?: Array<string>;
|
|
9
|
+
record: boolean;
|
|
10
|
+
}) {
|
|
11
|
+
this.meetingURL = params.meetingURL;
|
|
12
|
+
this.rtmpURLs = params.rtmpURLs;
|
|
13
|
+
this.record = params.record;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NativeModules } from 'react-native';
|
|
2
|
+
import type { HMSTrackType } from './HMSTrackType';
|
|
2
3
|
import { HMSAudioTrack } from './HMSAudioTrack';
|
|
3
4
|
|
|
4
5
|
const {
|
|
@@ -16,12 +17,19 @@ export class HMSRemoteAudioTrack extends HMSAudioTrack {
|
|
|
16
17
|
* @memberof HMSRemoteAudioTrack
|
|
17
18
|
*/
|
|
18
19
|
setPlaybackAllowed(playbackAllowed: boolean) {
|
|
19
|
-
HmsManager.setPlaybackAllowed({
|
|
20
|
+
HmsManager.setPlaybackAllowed({
|
|
21
|
+
id: this.id,
|
|
22
|
+
trackId: this.trackId,
|
|
23
|
+
playbackAllowed,
|
|
24
|
+
});
|
|
20
25
|
}
|
|
21
26
|
|
|
22
27
|
isPlaybackAllowed = async () => {
|
|
23
28
|
try {
|
|
24
|
-
const val = await HmsManager.isPlaybackAllowed({
|
|
29
|
+
const val = await HmsManager.isPlaybackAllowed({
|
|
30
|
+
id: this.id,
|
|
31
|
+
trackId: this.trackId,
|
|
32
|
+
});
|
|
25
33
|
return val;
|
|
26
34
|
} catch (e) {
|
|
27
35
|
return true;
|
|
@@ -33,6 +41,9 @@ export class HMSRemoteAudioTrack extends HMSAudioTrack {
|
|
|
33
41
|
source?: number | string;
|
|
34
42
|
isMute?: boolean;
|
|
35
43
|
trackDescription?: string;
|
|
44
|
+
playbackAllowed?: boolean;
|
|
45
|
+
id: string;
|
|
46
|
+
type?: HMSTrackType;
|
|
36
47
|
}) {
|
|
37
48
|
super(params);
|
|
38
49
|
}
|
|
@@ -24,6 +24,7 @@ export class HMSRemotePeer extends HMSPeer {
|
|
|
24
24
|
isLocal?: boolean;
|
|
25
25
|
customerUserID?: string;
|
|
26
26
|
customerDescription?: string;
|
|
27
|
+
metadata?: string;
|
|
27
28
|
audioTrack?: HMSAudioTrack;
|
|
28
29
|
videoTrack?: HMSVideoTrack;
|
|
29
30
|
role?: HMSRole;
|
|
@@ -34,6 +35,7 @@ export class HMSRemotePeer extends HMSPeer {
|
|
|
34
35
|
isMute?: boolean;
|
|
35
36
|
trackDescription?: string;
|
|
36
37
|
playbackAllowed?: boolean;
|
|
38
|
+
id: string;
|
|
37
39
|
};
|
|
38
40
|
remoteVideoTrackData?: {
|
|
39
41
|
trackId: string;
|
|
@@ -42,6 +44,7 @@ export class HMSRemotePeer extends HMSPeer {
|
|
|
42
44
|
isMute?: boolean;
|
|
43
45
|
layer?: any;
|
|
44
46
|
playbackAllowed?: boolean;
|
|
47
|
+
id: string;
|
|
45
48
|
};
|
|
46
49
|
}) {
|
|
47
50
|
super(params);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { NativeModules } from 'react-native';
|
|
2
2
|
import { HMSVideoTrack } from './HMSVideoTrack';
|
|
3
|
+
import type { HMSTrackType } from './HMSTrackType';
|
|
3
4
|
|
|
4
5
|
const {
|
|
5
6
|
/**
|
|
@@ -18,12 +19,19 @@ export class HMSRemoteVideoTrack extends HMSVideoTrack {
|
|
|
18
19
|
* @memberof HMSRemoteVideoTrack
|
|
19
20
|
*/
|
|
20
21
|
setPlaybackAllowed(playbackAllowed: boolean) {
|
|
21
|
-
HmsManager.setPlaybackAllowed({
|
|
22
|
+
HmsManager.setPlaybackAllowed({
|
|
23
|
+
id: this.id,
|
|
24
|
+
trackId: this.trackId,
|
|
25
|
+
playbackAllowed,
|
|
26
|
+
});
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
isPlaybackAllowed = async () => {
|
|
25
30
|
try {
|
|
26
|
-
const val = await HmsManager.isPlaybackAllowed({
|
|
31
|
+
const val = await HmsManager.isPlaybackAllowed({
|
|
32
|
+
id: this.id,
|
|
33
|
+
trackId: this.trackId,
|
|
34
|
+
});
|
|
27
35
|
return val;
|
|
28
36
|
} catch (e) {
|
|
29
37
|
return true;
|
|
@@ -36,6 +44,9 @@ export class HMSRemoteVideoTrack extends HMSVideoTrack {
|
|
|
36
44
|
trackDescription?: string;
|
|
37
45
|
isMute?: boolean;
|
|
38
46
|
layer?: any;
|
|
47
|
+
playbackAllowed?: boolean;
|
|
48
|
+
id: string;
|
|
49
|
+
type?: HMSTrackType;
|
|
39
50
|
}) {
|
|
40
51
|
super(params);
|
|
41
52
|
this.layer = params.layer;
|
package/src/classes/HMSRoom.ts
CHANGED
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
import type { HMSPeer } from './HMSPeer';
|
|
2
|
+
import type { HMSRtmpStreamingState } from './HMSRtmpStreamingState';
|
|
3
|
+
import type { HMSServerRecordingState } from './HMSServerRecordingState';
|
|
4
|
+
import type { HMSBrowserRecordingState } from './HMSBrowserRecordingState';
|
|
2
5
|
|
|
3
6
|
export class HMSRoom {
|
|
4
7
|
id: string;
|
|
5
8
|
name: string;
|
|
6
9
|
metaData?: string;
|
|
7
10
|
peers: HMSPeer[];
|
|
11
|
+
browserRecordingState: HMSBrowserRecordingState;
|
|
12
|
+
rtmpHMSRtmpStreamingState: HMSRtmpStreamingState;
|
|
13
|
+
serverRecordingState: HMSServerRecordingState;
|
|
8
14
|
|
|
9
15
|
constructor(params: {
|
|
10
16
|
id: string;
|
|
11
17
|
name: string;
|
|
12
18
|
metaData?: string;
|
|
13
19
|
peers: HMSPeer[];
|
|
20
|
+
browserRecordingState: HMSBrowserRecordingState;
|
|
21
|
+
rtmpHMSRtmpStreamingState: HMSRtmpStreamingState;
|
|
22
|
+
serverRecordingState: HMSServerRecordingState;
|
|
14
23
|
}) {
|
|
15
24
|
this.id = params.id;
|
|
16
25
|
this.name = params.name;
|
|
17
26
|
this.metaData = params.metaData;
|
|
18
27
|
this.peers = params.peers;
|
|
28
|
+
this.browserRecordingState = params.browserRecordingState;
|
|
29
|
+
this.rtmpHMSRtmpStreamingState = params.rtmpHMSRtmpStreamingState;
|
|
30
|
+
this.serverRecordingState = params.serverRecordingState;
|
|
19
31
|
}
|
|
20
32
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HMSException } from './HMSException';
|
|
2
|
+
|
|
3
|
+
export class HMSRtmpStreamingState {
|
|
4
|
+
running: string;
|
|
5
|
+
error: HMSException;
|
|
6
|
+
|
|
7
|
+
constructor(params: { running: string; error: HMSException }) {
|
|
8
|
+
this.running = params.running;
|
|
9
|
+
this.error = params.error;
|
|
10
|
+
}
|
|
11
|
+
}
|