@100mslive/react-native-hms 0.8.1 → 0.9.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 (141) hide show
  1. package/README.md +6 -6
  2. package/android/.gradle/6.9/executionHistory/executionHistory.lock +0 -0
  3. package/android/.gradle/6.9/fileHashes/fileHashes.lock +0 -0
  4. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  5. package/android/.gradle/buildOutputCleanup/cache.properties +1 -1
  6. package/android/.gradle/checksums/checksums.lock +0 -0
  7. package/android/.gradle/checksums/md5-checksums.bin +0 -0
  8. package/android/.gradle/checksums/sha1-checksums.bin +0 -0
  9. package/android/build.gradle +3 -2
  10. package/android/src/main/java/com/reactnativehmssdk/HmsDecoder.kt +226 -256
  11. package/android/src/main/java/com/reactnativehmssdk/HmsHelper.kt +82 -31
  12. package/android/src/main/java/com/reactnativehmssdk/HmsModule.kt +99 -22
  13. package/android/src/main/java/com/reactnativehmssdk/HmsSDK.kt +368 -221
  14. package/android/src/main/java/com/reactnativehmssdk/HmsScreenshareActivity.kt +66 -0
  15. package/android/src/main/java/com/reactnativehmssdk/HmsView.kt +43 -24
  16. package/android/src/main/java/com/reactnativehmssdk/HmssdkPackage.kt +1 -2
  17. package/android/src/main/java/com/reactnativehmssdk/HmssdkViewManager.kt +14 -11
  18. package/android/src/main/res/layout/hms_view.xml +19 -0
  19. package/ios/HmsDecoder.swift +91 -22
  20. package/ios/HmsHelper.swift +34 -3
  21. package/ios/HmsManager.m +11 -9
  22. package/ios/HmsManager.swift +32 -18
  23. package/ios/HmsSDK.swift +193 -43
  24. package/ios/HmsView.swift +22 -54
  25. package/lib/commonjs/classes/HMSChangeTrackStateRequest.js +3 -0
  26. package/lib/commonjs/classes/HMSChangeTrackStateRequest.js.map +1 -1
  27. package/lib/commonjs/classes/HMSEncoder.js +10 -6
  28. package/lib/commonjs/classes/HMSEncoder.js.map +1 -1
  29. package/lib/commonjs/classes/HMSHLSConfig.js +20 -0
  30. package/lib/commonjs/classes/HMSHLSConfig.js.map +1 -0
  31. package/lib/commonjs/classes/HMSHLSMeetingURLVariant.js +23 -0
  32. package/lib/commonjs/classes/HMSHLSMeetingURLVariant.js.map +1 -0
  33. package/lib/commonjs/classes/HMSHLSStreamingState.js +23 -0
  34. package/lib/commonjs/classes/HMSHLSStreamingState.js.map +1 -0
  35. package/lib/commonjs/classes/HMSHLSVariant.js +29 -0
  36. package/lib/commonjs/classes/HMSHLSVariant.js.map +1 -0
  37. package/lib/commonjs/classes/HMSLocalAudioTrack.js +20 -0
  38. package/lib/commonjs/classes/HMSLocalAudioTrack.js.map +1 -1
  39. package/lib/commonjs/classes/HMSLocalPeer.js.map +1 -1
  40. package/lib/commonjs/classes/HMSLocalVideoTrack.js +18 -0
  41. package/lib/commonjs/classes/HMSLocalVideoTrack.js.map +1 -1
  42. package/lib/commonjs/classes/HMSLogger.js +55 -1
  43. package/lib/commonjs/classes/HMSLogger.js.map +1 -1
  44. package/lib/commonjs/classes/HMSRemoteAudioTrack.js +19 -0
  45. package/lib/commonjs/classes/HMSRemoteAudioTrack.js.map +1 -1
  46. package/lib/commonjs/classes/HMSRemoteVideoTrack.js +19 -0
  47. package/lib/commonjs/classes/HMSRemoteVideoTrack.js.map +1 -1
  48. package/lib/commonjs/classes/HMSRoom.js +3 -0
  49. package/lib/commonjs/classes/HMSRoom.js.map +1 -1
  50. package/lib/commonjs/classes/HMSRoomUpdate.js +6 -0
  51. package/lib/commonjs/classes/HMSRoomUpdate.js.map +1 -1
  52. package/lib/commonjs/classes/HMSSDK.js +297 -145
  53. package/lib/commonjs/classes/HMSSDK.js.map +1 -1
  54. package/lib/commonjs/classes/HMSTrackSettings.js +3 -0
  55. package/lib/commonjs/classes/HMSTrackSettings.js.map +1 -1
  56. package/lib/commonjs/classes/HMSVideoCodec.js +4 -4
  57. package/lib/commonjs/classes/HMSVideoCodec.js.map +1 -1
  58. package/lib/commonjs/classes/HmsView.js +26 -4
  59. package/lib/commonjs/classes/HmsView.js.map +1 -1
  60. package/lib/commonjs/index.js +70 -0
  61. package/lib/commonjs/index.js.map +1 -1
  62. package/lib/module/classes/HMSChangeTrackStateRequest.js +3 -0
  63. package/lib/module/classes/HMSChangeTrackStateRequest.js.map +1 -1
  64. package/lib/module/classes/HMSEncoder.js +10 -6
  65. package/lib/module/classes/HMSEncoder.js.map +1 -1
  66. package/lib/module/classes/HMSHLSConfig.js +11 -0
  67. package/lib/module/classes/HMSHLSConfig.js.map +1 -0
  68. package/lib/module/classes/HMSHLSMeetingURLVariant.js +14 -0
  69. package/lib/module/classes/HMSHLSMeetingURLVariant.js.map +1 -0
  70. package/lib/module/classes/HMSHLSStreamingState.js +14 -0
  71. package/lib/module/classes/HMSHLSStreamingState.js.map +1 -0
  72. package/lib/module/classes/HMSHLSVariant.js +20 -0
  73. package/lib/module/classes/HMSHLSVariant.js.map +1 -0
  74. package/lib/module/classes/HMSLocalAudioTrack.js +17 -0
  75. package/lib/module/classes/HMSLocalAudioTrack.js.map +1 -1
  76. package/lib/module/classes/HMSLocalPeer.js.map +1 -1
  77. package/lib/module/classes/HMSLocalVideoTrack.js +15 -0
  78. package/lib/module/classes/HMSLocalVideoTrack.js.map +1 -1
  79. package/lib/module/classes/HMSLogger.js +55 -1
  80. package/lib/module/classes/HMSLogger.js.map +1 -1
  81. package/lib/module/classes/HMSRemoteAudioTrack.js +16 -0
  82. package/lib/module/classes/HMSRemoteAudioTrack.js.map +1 -1
  83. package/lib/module/classes/HMSRemoteVideoTrack.js +16 -0
  84. package/lib/module/classes/HMSRemoteVideoTrack.js.map +1 -1
  85. package/lib/module/classes/HMSRoom.js +3 -0
  86. package/lib/module/classes/HMSRoom.js.map +1 -1
  87. package/lib/module/classes/HMSRoomUpdate.js +6 -0
  88. package/lib/module/classes/HMSRoomUpdate.js.map +1 -1
  89. package/lib/module/classes/HMSSDK.js +295 -146
  90. package/lib/module/classes/HMSSDK.js.map +1 -1
  91. package/lib/module/classes/HMSTrackSettings.js +3 -0
  92. package/lib/module/classes/HMSTrackSettings.js.map +1 -1
  93. package/lib/module/classes/HMSVideoCodec.js +4 -4
  94. package/lib/module/classes/HMSVideoCodec.js.map +1 -1
  95. package/lib/module/classes/HmsView.js +23 -4
  96. package/lib/module/classes/HmsView.js.map +1 -1
  97. package/lib/module/index.js +5 -0
  98. package/lib/module/index.js.map +1 -1
  99. package/lib/typescript/classes/HMSChangeTrackStateRequest.d.ts +2 -0
  100. package/lib/typescript/classes/HMSHLSConfig.d.ts +7 -0
  101. package/lib/typescript/classes/HMSHLSMeetingURLVariant.d.ts +8 -0
  102. package/lib/typescript/classes/HMSHLSStreamingState.d.ts +9 -0
  103. package/lib/typescript/classes/HMSHLSVariant.d.ts +12 -0
  104. package/lib/typescript/classes/HMSLocalPeer.d.ts +3 -0
  105. package/lib/typescript/classes/HMSLogger.d.ts +9 -0
  106. package/lib/typescript/classes/HMSRoom.d.ts +3 -0
  107. package/lib/typescript/classes/HMSRoomUpdate.d.ts +7 -1
  108. package/lib/typescript/classes/HMSSDK.d.ts +22 -13
  109. package/lib/typescript/classes/HMSTrackSettings.d.ts +2 -0
  110. package/lib/typescript/classes/HMSVideoCodec.d.ts +4 -4
  111. package/lib/typescript/index.d.ts +5 -0
  112. package/package.json +1 -1
  113. package/react-native-hms.podspec +1 -1
  114. package/src/classes/HMSChangeTrackStateRequest.ts +7 -1
  115. package/src/classes/HMSEncoder.ts +5 -1
  116. package/src/classes/HMSHLSConfig.ts +9 -0
  117. package/src/classes/HMSHLSMeetingURLVariant.ts +9 -0
  118. package/src/classes/HMSHLSStreamingState.ts +11 -0
  119. package/src/classes/HMSHLSVariant.ts +18 -0
  120. package/src/classes/HMSLocalAudioTrack.ts +16 -0
  121. package/src/classes/HMSLocalPeer.ts +3 -0
  122. package/src/classes/HMSLocalVideoTrack.ts +15 -0
  123. package/src/classes/HMSLogger.ts +28 -1
  124. package/src/classes/HMSRemoteAudioTrack.ts +16 -0
  125. package/src/classes/HMSRemoteVideoTrack.ts +16 -0
  126. package/src/classes/HMSRoom.ts +4 -0
  127. package/src/classes/HMSRoomUpdate.ts +6 -0
  128. package/src/classes/HMSSDK.tsx +221 -84
  129. package/src/classes/HMSTrackSettings.ts +3 -0
  130. package/src/classes/HMSVideoCodec.ts +4 -4
  131. package/src/classes/HmsView.tsx +32 -4
  132. package/src/index.ts +5 -0
  133. package/android/.gradle/6.9/executionHistory/executionHistory.bin +0 -0
  134. package/android/.gradle/6.9/fileHashes/fileHashes.bin +0 -0
  135. package/android/.gradle/6.9/fileHashes/resourceHashesCache.bin +0 -0
  136. package/android/.gradle/6.9/javaCompile/classAnalysis.bin +0 -0
  137. package/android/.gradle/6.9/javaCompile/jarAnalysis.bin +0 -0
  138. package/android/.gradle/6.9/javaCompile/javaCompile.lock +0 -0
  139. package/android/.gradle/6.9/javaCompile/taskHistory.bin +0 -0
  140. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  141. package/android/.project +0 -34
@@ -46,5 +46,10 @@ export * from './classes/HMSRtmpStreamingState';
46
46
  export * from './classes/HMSServerRecordingState';
47
47
  export * from './classes/HMSBrowserRecordingState';
48
48
  export * from './classes/HMSRTMPConfig';
49
+ export * from './classes/HMSHLSConfig';
50
+ export * from './classes/HMSHLSMeetingURLVariant';
51
+ export * from './classes/HMSHLSVariant';
52
+ export * from './classes/HMSHLSStreamingState';
53
+ export * from './classes/HMSVideoResolution';
49
54
  import { HMSSDK as HmsManager } from './classes/HMSSDK';
50
55
  export default HmsManager;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@100mslive/react-native-hms",
3
- "version": "0.8.1",
3
+ "version": "0.9.0",
4
4
  "description": "The React Native package for 100ms SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -16,5 +16,5 @@ Pod::Spec.new do |s|
16
16
  s.source_files = "ios/**/*.{h,m,mm,swift}"
17
17
 
18
18
  s.dependency "React-Core"
19
- s.dependency "HMSSDK"
19
+ s.dependency "HMSSDK", "0.2.6"
20
20
  end
@@ -3,9 +3,15 @@ import type { HMSPeer } from './HMSPeer';
3
3
  export class HMSChangeTrackStateRequest {
4
4
  requestedBy: HMSPeer;
5
5
  trackType: string;
6
+ mute: boolean;
6
7
 
7
- constructor(params: { requestedBy: HMSPeer; trackType: string }) {
8
+ constructor(params: {
9
+ requestedBy: HMSPeer;
10
+ trackType: string;
11
+ mute: boolean;
12
+ }) {
8
13
  this.requestedBy = params.requestedBy;
9
14
  this.trackType = params.trackType;
15
+ this.mute = params.mute;
10
16
  }
11
17
  }
@@ -26,6 +26,7 @@ export class HMSEncoder {
26
26
  browserRecordingState: room?.browserRecordingState,
27
27
  rtmpHMSRtmpStreamingState: room?.rtmpHMSRtmpStreamingState,
28
28
  serverRecordingState: room?.serverRecordingState,
29
+ hlsStreamingState: room?.hlsStreamingState,
29
30
  };
30
31
 
31
32
  return new HMSRoom(encodedObj);
@@ -48,7 +49,7 @@ export class HMSEncoder {
48
49
  role: HMSEncoder.encodeHmsRole(peer?.role),
49
50
  customerUserID: peer?.customerUserID,
50
51
  customerDescription: peer?.customerDescription,
51
- metadata: peer.metadata,
52
+ metadata: peer?.metadata,
52
53
  audioTrack: HMSEncoder.encodeHmsAudioTrack(peer?.audioTrack, id),
53
54
  videoTrack: HMSEncoder.encodeHmsVideoTrack(peer?.videoTrack, id),
54
55
  auxiliaryTracks: HMSEncoder.encodeHmsAuxiliaryTracks(
@@ -132,6 +133,7 @@ export class HMSEncoder {
132
133
  settings: HMSEncoder.encodeHmsAudioTrackSettings(
133
134
  peer?.localAudioTrackData?.settings
134
135
  ),
136
+ type: peer?.localAudioTrackData?.type,
135
137
  },
136
138
  localVideoTrackData: {
137
139
  id: id,
@@ -142,6 +144,7 @@ export class HMSEncoder {
142
144
  settings: HMSEncoder.encodeHmsVideoTrackSettings(
143
145
  peer?.localVideoTrackData?.settings
144
146
  ),
147
+ type: peer?.localVideoTrackData?.type,
145
148
  },
146
149
  };
147
150
 
@@ -274,6 +277,7 @@ export class HMSEncoder {
274
277
  const encodedChangeTrackStateRequest = {
275
278
  requestedBy: HMSEncoder.encodeHmsPeer(data.requestedBy, id),
276
279
  trackType: data.trackType,
280
+ mute: data.mute,
277
281
  };
278
282
 
279
283
  return new HMSChangeTrackStateRequest(encodedChangeTrackStateRequest);
@@ -0,0 +1,9 @@
1
+ import type { HMSHLSMeetingURLVariant } from './HMSHLSMeetingURLVariant';
2
+
3
+ export class HMSHLSConfig {
4
+ meetingURLVariants?: Array<HMSHLSMeetingURLVariant>;
5
+
6
+ constructor(params: { meetingURLVariants?: Array<HMSHLSMeetingURLVariant> }) {
7
+ this.meetingURLVariants = params.meetingURLVariants;
8
+ }
9
+ }
@@ -0,0 +1,9 @@
1
+ export class HMSHLSMeetingURLVariant {
2
+ meetingUrl: string;
3
+ metadata: string;
4
+
5
+ constructor(params: { meetingUrl: string; metadata: string }) {
6
+ this.meetingUrl = params.meetingUrl;
7
+ this.metadata = params.metadata;
8
+ }
9
+ }
@@ -0,0 +1,11 @@
1
+ import type { HMSHLSVariant } from './HMSHLSVariant';
2
+
3
+ export class HMSHLSStreamingState {
4
+ running: boolean;
5
+ variants: Array<HMSHLSVariant>;
6
+
7
+ constructor(params: { running: boolean; variants: Array<HMSHLSVariant> }) {
8
+ this.running = params.running;
9
+ this.variants = params.variants;
10
+ }
11
+ }
@@ -0,0 +1,18 @@
1
+ export class HMSHLSVariant {
2
+ hlsStreamUrl: string;
3
+ meetingUrl: string;
4
+ metadata: string;
5
+ startedAt: number;
6
+
7
+ constructor(params: {
8
+ hlsStreamUrl: string;
9
+ meetingUrl: string;
10
+ metadata: string;
11
+ startedAt: number;
12
+ }) {
13
+ this.hlsStreamUrl = params.hlsStreamUrl;
14
+ this.meetingUrl = params.meetingUrl;
15
+ this.metadata = params.metadata;
16
+ this.startedAt = params.startedAt;
17
+ }
18
+ }
@@ -1,5 +1,6 @@
1
1
  import { NativeModules, Platform } from 'react-native';
2
2
  import { HMSAudioTrack } from './HMSAudioTrack';
3
+ import { HMSSDK } from './HMSSDK';
3
4
  import type { HMSAudioTrackSettings } from './HMSAudioTrackSettings';
4
5
  import type { HMSTrackType } from './HMSTrackType';
5
6
 
@@ -21,10 +22,25 @@ export class HMSLocalAudioTrack extends HMSAudioTrack {
21
22
  * @memberof HMSLocalAudioTrack
22
23
  */
23
24
  setMute(isMute: boolean) {
25
+ const logger = HMSSDK.getLogger();
26
+ logger?.verbose('#Function setMute', {
27
+ trackId: this.trackId,
28
+ id: this.id,
29
+ source: this.source,
30
+ type: this.type,
31
+ isMute,
32
+ });
24
33
  HmsManager.setLocalMute({ isMute, id: this.id });
25
34
  }
26
35
 
27
36
  getVolume = async () => {
37
+ const logger = HMSSDK.getLogger();
38
+ logger?.verbose('#Function getVolume', {
39
+ trackId: this.trackId,
40
+ id: this.id,
41
+ source: this.source,
42
+ type: this.type,
43
+ });
28
44
  if (Platform.OS === 'ios') {
29
45
  return 'This API not available for IOS';
30
46
  }
@@ -7,6 +7,7 @@ import type { HMSAudioTrackSettings } from './HMSAudioTrackSettings';
7
7
  import { HMSLocalAudioTrack } from './HMSLocalAudioTrack';
8
8
  import { HMSLocalVideoTrack } from './HMSLocalVideoTrack';
9
9
  import type { HMSRole } from './HMSRole';
10
+ import type { HMSTrackType } from './HMSTrackType';
10
11
 
11
12
  export class HMSLocalPeer extends HMSPeer {
12
13
  private localAudio?: HMSLocalAudioTrack;
@@ -37,6 +38,7 @@ export class HMSLocalPeer extends HMSPeer {
37
38
  trackDescription?: string;
38
39
  isMute?: boolean;
39
40
  settings?: HMSAudioTrackSettings;
41
+ type: HMSTrackType;
40
42
  };
41
43
  localVideoTrackData?: {
42
44
  id: string;
@@ -45,6 +47,7 @@ export class HMSLocalPeer extends HMSPeer {
45
47
  trackDescription?: string;
46
48
  isMute?: boolean;
47
49
  settings?: HMSVideoTrackSettings;
50
+ type: HMSTrackType;
48
51
  };
49
52
  }) {
50
53
  super(params);
@@ -1,5 +1,6 @@
1
1
  import { NativeModules } from 'react-native';
2
2
  import { HMSVideoTrack } from './HMSVideoTrack';
3
+ import { HMSSDK } from './HMSSDK';
3
4
  import type { HMSVideoTrackSettings } from './HMSVideoTrackSettings';
4
5
  import type { HMSTrackType } from './HMSTrackType';
5
6
 
@@ -22,6 +23,13 @@ export class HMSLocalVideoTrack extends HMSVideoTrack {
22
23
  * @memberof HMSSDK
23
24
  */
24
25
  switchCamera = () => {
26
+ const logger = HMSSDK.getLogger();
27
+ logger?.verbose('#Function switchCamera', {
28
+ trackId: this.trackId,
29
+ source: this.source,
30
+ type: this.type,
31
+ id: this.id,
32
+ });
25
33
  HmsManager.switchCamera({ id: this.id });
26
34
  };
27
35
 
@@ -32,6 +40,13 @@ export class HMSLocalVideoTrack extends HMSVideoTrack {
32
40
  * @memberof HMSLocalVideoTrack
33
41
  */
34
42
  setMute(isMute: boolean) {
43
+ const logger = HMSSDK.getLogger();
44
+ logger?.verbose('#Function setMute', {
45
+ trackId: this.trackId,
46
+ source: this.source,
47
+ type: this.type,
48
+ id: this.id,
49
+ });
35
50
  HmsManager.setLocalVideoMute({ isMute, id: this.id });
36
51
  }
37
52
 
@@ -4,6 +4,13 @@ export class HMSLogger {
4
4
  private _verbose: boolean = false;
5
5
  private _warning: boolean = false;
6
6
  private _error: boolean = false;
7
+ private logs: {
8
+ type: 'verbose' | 'warn' | 'error';
9
+ message: string;
10
+ data: any;
11
+ id: string;
12
+ }[] = [];
13
+ private onLog?: Function;
7
14
 
8
15
  constructor(params?: { verbose: boolean; warning: boolean; error: boolean }) {
9
16
  if (params) {
@@ -14,21 +21,41 @@ export class HMSLogger {
14
21
  }
15
22
 
16
23
  verbose(message: string, data: any) {
17
- if (this._verbose === true) {
24
+ if (this._verbose) {
18
25
  console.log(message, data);
26
+ if (this.onLog) {
27
+ this?.onLog({ message, data });
28
+ }
19
29
  }
30
+ this.logs.push({ type: 'verbose', message, data, id: data?.id });
20
31
  }
21
32
 
22
33
  warn(message: string, data: any) {
23
34
  if (this._warning) {
24
35
  console.warn(message, data);
36
+ if (this.onLog) {
37
+ this?.onLog({ message, data });
38
+ }
25
39
  }
40
+ this.logs.push({ type: 'warn', message, data, id: data?.id });
26
41
  }
27
42
 
28
43
  error(message: string, data: any) {
29
44
  if (this._error) {
30
45
  console.error(message, data);
46
+ if (this.onLog) {
47
+ this?.onLog({ message, data });
48
+ }
31
49
  }
50
+ this.logs.push({ type: 'error', message, data, id: data?.id });
51
+ }
52
+
53
+ getLogs() {
54
+ return this.logs;
55
+ }
56
+
57
+ setLogListener(callback: Function) {
58
+ this.onLog = callback;
32
59
  }
33
60
 
34
61
  updateLogLevel(level: HMSLogLevel, value: boolean) {
@@ -1,4 +1,5 @@
1
1
  import { NativeModules } from 'react-native';
2
+ import { HMSSDK } from './HMSSDK';
2
3
  import type { HMSTrackType } from './HMSTrackType';
3
4
  import { HMSAudioTrack } from './HMSAudioTrack';
4
5
 
@@ -17,6 +18,14 @@ export class HMSRemoteAudioTrack extends HMSAudioTrack {
17
18
  * @memberof HMSRemoteAudioTrack
18
19
  */
19
20
  setPlaybackAllowed(playbackAllowed: boolean) {
21
+ const logger = HMSSDK.getLogger();
22
+ logger?.verbose('#Function setPlaybackAllowed', {
23
+ trackId: this.trackId,
24
+ id: this.id,
25
+ source: this.source,
26
+ type: this.type,
27
+ playbackAllowed,
28
+ });
20
29
  HmsManager.setPlaybackAllowed({
21
30
  id: this.id,
22
31
  trackId: this.trackId,
@@ -26,6 +35,13 @@ export class HMSRemoteAudioTrack extends HMSAudioTrack {
26
35
 
27
36
  isPlaybackAllowed = async () => {
28
37
  try {
38
+ const logger = HMSSDK.getLogger();
39
+ logger?.verbose('#Function isPlaybackAllowed', {
40
+ trackId: this.trackId,
41
+ id: this.id,
42
+ source: this.source,
43
+ type: this.type,
44
+ });
29
45
  const val = await HmsManager.isPlaybackAllowed({
30
46
  id: this.id,
31
47
  trackId: this.trackId,
@@ -1,4 +1,5 @@
1
1
  import { NativeModules } from 'react-native';
2
+ import { HMSSDK } from './HMSSDK';
2
3
  import { HMSVideoTrack } from './HMSVideoTrack';
3
4
  import type { HMSTrackType } from './HMSTrackType';
4
5
 
@@ -19,6 +20,14 @@ export class HMSRemoteVideoTrack extends HMSVideoTrack {
19
20
  * @memberof HMSRemoteVideoTrack
20
21
  */
21
22
  setPlaybackAllowed(playbackAllowed: boolean) {
23
+ const logger = HMSSDK.getLogger();
24
+ logger?.verbose('#Function setPlaybackAllowed', {
25
+ trackId: this.trackId,
26
+ id: this.id,
27
+ source: this.source,
28
+ type: this.type,
29
+ playbackAllowed,
30
+ });
22
31
  HmsManager.setPlaybackAllowed({
23
32
  id: this.id,
24
33
  trackId: this.trackId,
@@ -28,6 +37,13 @@ export class HMSRemoteVideoTrack extends HMSVideoTrack {
28
37
 
29
38
  isPlaybackAllowed = async () => {
30
39
  try {
40
+ const logger = HMSSDK.getLogger();
41
+ logger?.verbose('#Function isPlaybackAllowed', {
42
+ trackId: this.trackId,
43
+ id: this.id,
44
+ source: this.source,
45
+ type: this.type,
46
+ });
31
47
  const val = await HmsManager.isPlaybackAllowed({
32
48
  id: this.id,
33
49
  trackId: this.trackId,
@@ -2,6 +2,7 @@ import type { HMSPeer } from './HMSPeer';
2
2
  import type { HMSRtmpStreamingState } from './HMSRtmpStreamingState';
3
3
  import type { HMSServerRecordingState } from './HMSServerRecordingState';
4
4
  import type { HMSBrowserRecordingState } from './HMSBrowserRecordingState';
5
+ import type { HMSHLSStreamingState } from './HMSHLSStreamingState';
5
6
 
6
7
  export class HMSRoom {
7
8
  id: string;
@@ -11,6 +12,7 @@ export class HMSRoom {
11
12
  browserRecordingState: HMSBrowserRecordingState;
12
13
  rtmpHMSRtmpStreamingState: HMSRtmpStreamingState;
13
14
  serverRecordingState: HMSServerRecordingState;
15
+ hlsStreamingState: HMSHLSStreamingState;
14
16
 
15
17
  constructor(params: {
16
18
  id: string;
@@ -20,6 +22,7 @@ export class HMSRoom {
20
22
  browserRecordingState: HMSBrowserRecordingState;
21
23
  rtmpHMSRtmpStreamingState: HMSRtmpStreamingState;
22
24
  serverRecordingState: HMSServerRecordingState;
25
+ hlsStreamingState: HMSHLSStreamingState;
23
26
  }) {
24
27
  this.id = params.id;
25
28
  this.name = params.name;
@@ -28,5 +31,6 @@ export class HMSRoom {
28
31
  this.browserRecordingState = params.browserRecordingState;
29
32
  this.rtmpHMSRtmpStreamingState = params.rtmpHMSRtmpStreamingState;
30
33
  this.serverRecordingState = params.serverRecordingState;
34
+ this.hlsStreamingState = params.hlsStreamingState;
31
35
  }
32
36
  }
@@ -1,4 +1,10 @@
1
1
  export enum HMSRoomUpdate {
2
2
  ROOM_MUTED = 'ROOM_MUTED',
3
3
  ROOM_UNMUTED = 'ROOM_UNMUTED',
4
+ ROOM_TYPE_CHANGED = 'ROOM_TYPE_CHANGED',
5
+ META_DATA_CHANGED = 'META_DATA_CHANGED',
6
+ SERVER_RECORDING_STATE_UPDATED = 'SERVER_RECORDING_STATE_UPDATED',
7
+ RTMP_STREAMING_STATE_UPDATED = 'RTMP_STREAMING_STATE_UPDATED',
8
+ BROWSER_RECORDING_STATE_UPDATED = 'BROWSER_RECORDING_STATE_UPDATED',
9
+ HLS_STREAMING_STATE_UPDATED = 'HLS_STREAMING_STATE_UPDATED',
4
10
  }