@100mslive/react-native-hms 1.10.9 → 1.12.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 (193) hide show
  1. package/README.md +12 -12
  2. package/android/.project +28 -0
  3. package/android/bin/.gradle/6.7.1/fileChanges/last-build.bin +0 -0
  4. package/android/bin/.gradle/6.7.1/fileHashes/fileHashes.lock +0 -0
  5. package/android/bin/.gradle/6.7.1/gc.properties +0 -0
  6. package/android/bin/.gradle/8.4/checksums/checksums.lock +0 -0
  7. package/android/bin/.gradle/8.4/checksums/md5-checksums.bin +0 -0
  8. package/android/bin/.gradle/8.4/checksums/sha1-checksums.bin +0 -0
  9. package/android/bin/.gradle/8.4/dependencies-accessors/dependencies-accessors.lock +0 -0
  10. package/android/bin/.gradle/8.4/dependencies-accessors/gc.properties +0 -0
  11. package/android/bin/.gradle/8.4/fileChanges/last-build.bin +0 -0
  12. package/android/bin/.gradle/8.4/fileHashes/fileHashes.lock +0 -0
  13. package/android/bin/.gradle/8.4/gc.properties +0 -0
  14. package/android/bin/.gradle/8.7/checksums/checksums.lock +0 -0
  15. package/android/bin/.gradle/8.7/checksums/md5-checksums.bin +0 -0
  16. package/android/bin/.gradle/8.7/checksums/sha1-checksums.bin +0 -0
  17. package/android/bin/.gradle/8.7/dependencies-accessors/gc.properties +0 -0
  18. package/android/bin/.gradle/8.7/executionHistory/executionHistory.bin +0 -0
  19. package/android/bin/.gradle/8.7/executionHistory/executionHistory.lock +0 -0
  20. package/android/bin/.gradle/8.7/fileChanges/last-build.bin +0 -0
  21. package/android/bin/.gradle/8.7/fileHashes/fileHashes.bin +0 -0
  22. package/android/bin/.gradle/8.7/fileHashes/fileHashes.lock +0 -0
  23. package/android/bin/.gradle/8.7/fileHashes/resourceHashesCache.bin +0 -0
  24. package/android/bin/.gradle/8.7/gc.properties +0 -0
  25. package/android/bin/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  26. package/android/bin/.gradle/buildOutputCleanup/cache.properties +2 -0
  27. package/android/bin/.gradle/checksums/checksums.lock +0 -0
  28. package/android/bin/.gradle/checksums/md5-checksums.bin +0 -0
  29. package/android/bin/.gradle/checksums/sha1-checksums.bin +0 -0
  30. package/android/bin/.gradle/configuration-cache/gc.properties +0 -0
  31. package/android/bin/.gradle/file-system.probe +0 -0
  32. package/android/bin/.gradle/vcs-1/gc.properties +0 -0
  33. package/android/bin/.project +34 -0
  34. package/android/bin/build/generated/source/buildConfig/debug/com/reactnativehmssdk/BuildConfig.class +0 -0
  35. package/android/bin/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +7 -0
  36. package/android/bin/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
  37. package/android/bin/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
  38. package/android/bin/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
  39. package/android/bin/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  40. package/android/bin/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  41. package/android/bin/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +9 -0
  42. package/android/bin/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/drawable_ic_call_end_24.xml.flat +0 -0
  43. package/android/bin/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/drawable_ic_camera_toggle_off.xml.flat +0 -0
  44. package/android/bin/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/drawable_ic_camera_toggle_on.xml.flat +0 -0
  45. package/android/bin/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/drawable_ic_mic_24.xml.flat +0 -0
  46. package/android/bin/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/drawable_ic_mic_off_24.xml.flat +0 -0
  47. package/android/bin/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/layout_hms_view.xml.flat +0 -0
  48. package/android/bin/build/intermediates/compiled_local_resources/debug/compileDebugLibraryResources/out/layout_player_view.xml.flat +0 -0
  49. package/android/bin/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +8 -0
  50. package/android/bin/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  51. package/android/bin/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  52. package/android/bin/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  53. package/android/bin/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
  54. package/android/bin/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/100mslive_react-native-hms_debug.kotlin_module +0 -0
  55. package/android/bin/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +11 -0
  56. package/android/bin/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +7 -0
  57. package/android/bin/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +7 -0
  58. package/android/bin/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
  59. package/android/bin/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
  60. package/android/bin/build/intermediates/packaged_res/debug/packageDebugResources/drawable/ic_call_end_24.xml +10 -0
  61. package/android/bin/build/intermediates/packaged_res/debug/packageDebugResources/drawable/ic_camera_toggle_off.xml +11 -0
  62. package/android/bin/build/intermediates/packaged_res/debug/packageDebugResources/drawable/ic_camera_toggle_on.xml +10 -0
  63. package/android/bin/build/intermediates/packaged_res/debug/packageDebugResources/drawable/ic_mic_24.xml +10 -0
  64. package/android/bin/build/intermediates/packaged_res/debug/packageDebugResources/drawable/ic_mic_off_24.xml +10 -0
  65. package/android/bin/build/intermediates/packaged_res/debug/packageDebugResources/layout/hms_view.xml +19 -0
  66. package/android/bin/build/intermediates/packaged_res/debug/packageDebugResources/layout/player_view.xml +10 -0
  67. package/android/bin/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/100mslive_react-native-hms_debug.kotlin_module +0 -0
  68. package/android/bin/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  69. package/android/bin/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +10 -0
  70. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  71. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  72. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  73. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  74. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  75. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  76. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  77. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  78. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  79. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  80. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  81. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  82. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  83. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  84. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  85. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  86. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  87. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  88. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  89. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  90. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  91. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  92. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  93. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  94. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  95. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  96. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  97. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  98. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  99. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  100. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  101. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  102. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  103. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  104. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  105. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  106. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  107. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  108. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  109. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values +0 -0
  110. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  111. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.s +1 -0
  112. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  113. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  114. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  115. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  116. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  117. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  118. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  119. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  120. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  121. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  122. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  123. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  124. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  125. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  126. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  127. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  128. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  129. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  130. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  131. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  132. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  133. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  134. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  135. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -0
  136. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  137. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  138. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  139. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  140. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  141. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  142. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  143. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  144. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  145. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  146. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  147. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  148. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  149. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  150. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  151. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  152. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  153. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  154. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values +0 -0
  155. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  156. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.s +1 -0
  157. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  158. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  159. package/android/bin/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  160. package/android/bin/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  161. package/android/bin/build/outputs/logs/manifest-merger-debug-report.txt +17 -0
  162. package/android/bin/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  163. package/android/bin/build/tmp/kotlin-classes/debug/META-INF/100mslive_react-native-hms_debug.kotlin_module +0 -0
  164. package/android/bin/local.properties +1 -0
  165. package/android/build.gradle +28 -42
  166. package/android/src/main/java/com/reactnativehmssdk/HMSHelper.kt +1 -1
  167. package/android/src/main/java/com/reactnativehmssdk/HMSManager.kt +8 -1
  168. package/android/src/main/java/com/reactnativehmssdk/HMSView.kt +1 -1
  169. package/ios/HMSRNSDK.swift +32 -7
  170. package/lib/commonjs/classes/HMSNativeEventEmitter.js +1 -3
  171. package/lib/commonjs/classes/HMSNativeEventEmitter.js.map +1 -1
  172. package/lib/commonjs/classes/HMSPeerType.js +1 -1
  173. package/lib/commonjs/classes/HMSPeerType.js.map +1 -1
  174. package/lib/commonjs/classes/HMSSessionStore.js +1 -3
  175. package/lib/commonjs/classes/HMSSessionStore.js.map +1 -1
  176. package/lib/commonjs/classes/HmsView.js +1 -2
  177. package/lib/commonjs/classes/HmsView.js.map +1 -1
  178. package/lib/commonjs/components/HMSHLSPlayer/HMSHLSPlayer.js +1 -2
  179. package/lib/commonjs/components/HMSHLSPlayer/HMSHLSPlayer.js.map +1 -1
  180. package/lib/commonjs/hooks/useHMSPeerUpdates.js +1 -2
  181. package/lib/commonjs/hooks/useHMSPeerUpdates.js.map +1 -1
  182. package/lib/module/classes/HMSNativeEventEmitter.js +1 -3
  183. package/lib/module/classes/HMSNativeEventEmitter.js.map +1 -1
  184. package/lib/module/classes/HMSPeerType.js +1 -1
  185. package/lib/module/classes/HMSPeerType.js.map +1 -1
  186. package/lib/module/classes/HMSSessionStore.js +1 -3
  187. package/lib/module/classes/HMSSessionStore.js.map +1 -1
  188. package/lib/typescript/components/HMSHLSPlayer/RCTHMSHLSPlayer.d.ts +1 -0
  189. package/package.json +8 -5
  190. package/react-native-hms.podspec +12 -2
  191. package/sdk-versions.json +3 -3
  192. package/src/classes/HMSNativeEventEmitter.ts +1 -7
  193. package/src/classes/HMSSessionStore.ts +1 -9
@@ -0,0 +1,17 @@
1
+ -- Merging decision tree log ---
2
+ manifest
3
+ ADDED from /Users/yogesh/Programming/100ms-react-native/packages/react-native-hms/android/src/main/AndroidManifest.xml:1:1-4:12
4
+ INJECTED from /Users/yogesh/Programming/100ms-react-native/packages/react-native-hms/android/src/main/AndroidManifest.xml:1:1-4:12
5
+ package
6
+ ADDED from /Users/yogesh/Programming/100ms-react-native/packages/react-native-hms/android/src/main/AndroidManifest.xml:2:11-42
7
+ INJECTED from /Users/yogesh/Programming/100ms-react-native/packages/react-native-hms/android/src/main/AndroidManifest.xml
8
+ xmlns:android
9
+ ADDED from /Users/yogesh/Programming/100ms-react-native/packages/react-native-hms/android/src/main/AndroidManifest.xml:1:11-69
10
+ uses-sdk
11
+ INJECTED from /Users/yogesh/Programming/100ms-react-native/packages/react-native-hms/android/src/main/AndroidManifest.xml reason: use-sdk injection requested
12
+ INJECTED from /Users/yogesh/Programming/100ms-react-native/packages/react-native-hms/android/src/main/AndroidManifest.xml
13
+ INJECTED from /Users/yogesh/Programming/100ms-react-native/packages/react-native-hms/android/src/main/AndroidManifest.xml
14
+ android:targetSdkVersion
15
+ INJECTED from /Users/yogesh/Programming/100ms-react-native/packages/react-native-hms/android/src/main/AndroidManifest.xml
16
+ android:minSdkVersion
17
+ INJECTED from /Users/yogesh/Programming/100ms-react-native/packages/react-native-hms/android/src/main/AndroidManifest.xml
@@ -0,0 +1 @@
1
+ sdk.dir=/Users/yogesh/Library/Android/sdk
@@ -3,66 +3,52 @@ import groovy.json.JsonSlurper
3
3
  def sdkVersions = new JsonSlurper().parse file("../sdk-versions.json")
4
4
 
5
5
  buildscript {
6
-
7
- ext.safeExtGet = { prop, fallback ->
8
- rootProject.ext.has(prop) ? rootProject.ext.get (prop) : fallback
9
- }
10
-
11
- ext.getKotlinVersion = {
12
- if (ext.has("kotlinVersion")) {
13
- ext.kotlinVersion()
14
- } else {
15
- ext.safeExtGet("kotlinVersion", "1.7.20")
16
- }
17
- }
18
- ext.getKotlinGradlePluginVersion = {
19
- if (ext.has("kotlinGradlePluginVersion")) {
20
- ext.kotlinGradlePluginVersion()
21
- } else {
22
- ext.safeExtGet("kotlinGradlePluginVersion", "1.8.0")
23
- }
24
- }
25
- if (project == rootProject) {
26
- repositories {
27
- google()
28
- mavenCentral()
29
- gradlePluginPortal( )
30
- }
31
-
32
- dependencies {
33
- classpath 'com.android.tools.build:gradle:3.5.3'
34
- }
35
- }
36
6
  repositories {
7
+ google()
37
8
  mavenCentral()
38
9
  }
39
10
  dependencies {
40
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinGradlePluginVersion()}"
11
+ classpath("com.android.tools.build:gradle:8.5.0")
12
+ classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.21")
41
13
  }
42
14
  }
43
15
 
44
16
  apply plugin: 'com.android.library'
45
17
  apply plugin: 'kotlin-android'
46
18
 
19
+ // Define helper functions for Kotlin version management (RN 0.77.3 requires 2.0.21)
20
+ def getKotlinVersion() {
21
+ return rootProject.ext.has("kotlinVersion") ? rootProject.ext.get("kotlinVersion") : "2.0.21"
22
+ }
23
+
24
+ def getKotlinGradlePluginVersion() {
25
+ return rootProject.ext.has("kotlinGradlePluginVersion") ? rootProject.ext.get("kotlinGradlePluginVersion") : "2.0.21"
26
+ }
27
+
47
28
  def safeExtGet(prop, fallback) {
48
29
  rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
49
30
  }
50
31
 
51
32
  android {
52
- compileSdkVersion safeExtGet('Hmssdk_compileSdkVersion', 31)
33
+ namespace 'com.reactnativehmssdk'
34
+ buildToolsVersion = "35.0.0"
35
+ compileSdkVersion safeExtGet('Hmssdk_compileSdkVersion', 35)
53
36
  defaultConfig {
54
- minSdkVersion safeExtGet('Hmssdk_minSdkVersion', 21)
55
- targetSdkVersion safeExtGet('Hmssdk_targetSdkVersion', 31)
37
+ minSdkVersion safeExtGet('Hmssdk_minSdkVersion', 24)
38
+ targetSdkVersion safeExtGet('Hmssdk_targetSdkVersion', 35)
56
39
  versionCode 1
57
40
  versionName "1.0"
58
41
  }
59
42
 
60
- lintOptions {
43
+ lint {
61
44
  disable 'GradleCompatible'
62
45
  }
63
46
  compileOptions {
64
- sourceCompatibility JavaVersion.VERSION_1_8
65
- targetCompatibility JavaVersion.VERSION_1_8
47
+ sourceCompatibility JavaVersion.VERSION_17
48
+ targetCompatibility JavaVersion.VERSION_17
49
+ }
50
+ kotlinOptions {
51
+ jvmTarget = "17"
66
52
  }
67
53
  }
68
54
 
@@ -81,12 +67,12 @@ repositories {
81
67
  dependencies {
82
68
  //noinspection GradleDynamicVersion
83
69
  implementation "com.facebook.react:react-native:+"
84
- implementation "com.google.code.gson:gson:2.9.0"
70
+ implementation "com.google.code.gson:gson:2.11.0"
85
71
  implementation "org.jetbrains.kotlin:kotlin-stdlib:${getKotlinVersion()}"
86
- implementation "androidx.core:core-ktx:1.6.0"
87
- implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0"
88
- implementation "androidx.constraintlayout:constraintlayout:2.1.3"
89
- implementation "androidx.appcompat:appcompat:1.3.1"
72
+ implementation "androidx.core:core-ktx:1.13.1"
73
+ implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1"
74
+ implementation "androidx.constraintlayout:constraintlayout:2.1.4"
75
+ implementation "androidx.appcompat:appcompat:1.7.0"
90
76
 
91
77
  implementation "live.100ms:android-sdk:${sdkVersions["android"]}"
92
78
  implementation "live.100ms:video-view:${sdkVersions["android"]}"
@@ -11,6 +11,7 @@ import android.webkit.URLUtil
11
11
  import androidx.annotation.RequiresApi
12
12
  import com.facebook.react.bridge.*
13
13
  import com.facebook.react.uimanager.events.RCTEventEmitter
14
+ import hms.webrtc.SurfaceViewRenderer
14
15
  import live.hms.video.audio.HMSAudioManager
15
16
  import live.hms.video.error.HMSException
16
17
  import live.hms.video.events.AgentType
@@ -27,7 +28,6 @@ import live.hms.video.sdk.models.role.HMSRole
27
28
  import live.hms.video.services.LogAlarmManager
28
29
  import live.hms.video.utils.HMSLogger
29
30
  import live.hms.video.utils.HmsUtilities
30
- import org.webrtc.SurfaceViewRenderer
31
31
  import java.io.ByteArrayOutputStream
32
32
  import java.util.*
33
33
  import kotlin.collections.ArrayList
@@ -76,7 +76,13 @@ class HMSManager(
76
76
  ) {
77
77
  reactAppContext?.currentActivity?.window?.addFlags(WindowManager.LayoutParams.FLAG_SECURE)
78
78
  emitPipEvent(true)
79
- reactAppContext?.currentActivity?.enterPictureInPictureMode(pipParams)
79
+ val success = reactAppContext?.currentActivity?.enterPictureInPictureMode(pipParams)
80
+ success?.let {
81
+ if (!it) {
82
+ reactAppContext?.currentActivity?.window?.clearFlags(WindowManager.LayoutParams.FLAG_SECURE)
83
+ emitPipEvent(false)
84
+ }
85
+ }
80
86
  }
81
87
  }
82
88
  }
@@ -1093,6 +1099,7 @@ class HMSManager(
1093
1099
  activity.setPictureInPictureParams(pipParams)
1094
1100
  return true
1095
1101
  } catch (e: Exception) {
1102
+ Log.e("HMSManager", "Error setting PictureInPictureParams: ${e.message}")
1096
1103
  return false
1097
1104
  }
1098
1105
  }
@@ -12,11 +12,11 @@ import com.facebook.react.bridge.ReactContext
12
12
  import com.facebook.react.bridge.ReadableArray
13
13
  import com.facebook.react.bridge.WritableMap
14
14
  import com.facebook.react.uimanager.events.RCTEventEmitter
15
+ import hms.webrtc.RendererCommon
15
16
  import live.hms.video.media.tracks.HMSVideoTrack
16
17
  import live.hms.video.utils.HmsUtilities
17
18
  import live.hms.videoview.HMSVideoView
18
19
  import live.hms.videoview.VideoViewStateChangeListener
19
- import org.webrtc.RendererCommon
20
20
 
21
21
  @SuppressLint("ViewConstructor")
22
22
  class HMSView(
@@ -2343,14 +2343,39 @@ class HMSRNSDK: NSObject, HMSUpdateListener, HMSPreviewListener {
2343
2343
  reject?("6004", errorMessage, nil)
2344
2344
  return
2345
2345
  }
2346
- DispatchQueue.main.async {
2347
- guard let image = RCTConvert.uiImage(imageSource) else {
2348
- let errorMessage = "\(#function) Unable to create `UIImage` from given background `source` object!"
2349
- reject?("6004", errorMessage, nil)
2350
- return
2346
+
2347
+ // Check if it's a remote URL
2348
+ if let uriString = imageSource.value(forKey: "uri") as? String,
2349
+ (uriString.hasPrefix("http://") || uriString.hasPrefix("https://")),
2350
+ let url = URL(string: uriString) {
2351
+ // Download remote image
2352
+ URLSession.shared.dataTask(with: url) { data, response, error in
2353
+ DispatchQueue.main.async {
2354
+ if let error = error {
2355
+ let errorMessage = "\(#function) Failed to download image: \(error.localizedDescription)"
2356
+ reject?("6004", errorMessage, nil)
2357
+ return
2358
+ }
2359
+ guard let data = data, let image = UIImage(data: data) else {
2360
+ let errorMessage = "\(#function) Unable to create `UIImage` from downloaded data!"
2361
+ reject?("6004", errorMessage, nil)
2362
+ return
2363
+ }
2364
+ virtualBackgroundPlugin.backgroundImage = image
2365
+ resolve?(true)
2366
+ }
2367
+ }.resume()
2368
+ } else {
2369
+ // Use RCTConvert for local files and bundled resources
2370
+ DispatchQueue.main.async {
2371
+ guard let image = RCTConvert.uiImage(imageSource) else {
2372
+ let errorMessage = "\(#function) Unable to create `UIImage` from given background `source` object!"
2373
+ reject?("6004", errorMessage, nil)
2374
+ return
2375
+ }
2376
+ virtualBackgroundPlugin.backgroundImage = image
2377
+ resolve?(true)
2351
2378
  }
2352
- virtualBackgroundPlugin.backgroundImage = image
2353
- resolve?(true)
2354
2379
  }
2355
2380
  default:
2356
2381
  let errorMessage = "\(#function) Unknown background `type` passed!"
@@ -52,11 +52,9 @@ class HMSNativeEventEmitter {
52
52
  let subscription = this._nativeEventEmitter.addListener(eventType, listener);
53
53
  return {
54
54
  remove: () => {
55
- if (subscription && Object.getOwnPropertyNames(subscription).includes('remove') && typeof subscription.remove === 'function') {
55
+ if (subscription) {
56
56
  subscription.remove();
57
57
  subscription = null;
58
- } else {
59
- this._nativeEventEmitter.removeListener(eventType, listener);
60
58
  }
61
59
 
62
60
  // disable `eventType` on `HMSSDK`, if all listeners has been removed
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_HMSLogger","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","HMSNativeEventEmitter","constructor","nativeModule","_nativeModule","_nativeEventEmitter","NativeEventEmitter","listenerCount","eventType","listeners","count","length","logger","verbose","addListener","id","listener","enableHMSEventType","subscription","remove","getOwnPropertyNames","includes","removeListener","disableHMSEventType","removeAllListeners","enableEvent","disableEvent","exports"],"sources":["HMSNativeEventEmitter.ts"],"sourcesContent":["import { NativeEventEmitter } from 'react-native';\nimport type { EventSubscription } from 'react-native';\nimport { logger } from './HMSLogger';\n\nexport type HMSEventSubscription = {\n remove(): void;\n};\n\nexport class HMSNativeEventEmitter {\n private _nativeEventEmitter: NativeEventEmitter;\n private _nativeModule: any;\n\n constructor(nativeModule: any) {\n this._nativeModule = nativeModule;\n this._nativeEventEmitter = new NativeEventEmitter(nativeModule);\n }\n\n listenerCount(eventType: string): number {\n // For RN version < v0.64, listenerCount method is not available\n // @ts-ignore - typescript is giving error because we are running it with RN types version >= 0.64\n if (typeof this._nativeEventEmitter.listeners === 'function') {\n // @ts-ignore - typescript is giving error because we are running it with RN types version >= 0.64\n const count = this._nativeEventEmitter.listeners(eventType).length;\n\n logger?.verbose('#Function HMSNativeEventEmitter.listenerCount', {\n eventType,\n count,\n });\n return count;\n }\n\n // For RN version >= v0.64\n const count = this._nativeEventEmitter.listenerCount(eventType);\n\n logger?.verbose('#Function HMSNativeEventEmitter.listenerCount', {\n eventType,\n count,\n });\n return count;\n }\n\n addListener(\n id: string,\n eventType: string,\n listener: (...args: any[]) => any\n ): HMSEventSubscription {\n logger?.verbose('#Function HMSNativeEventEmitter.addListener', {\n id,\n eventType,\n listener,\n });\n\n // enable `eventType` on `HMSSDK`, if no listeners were added before\n // if some listeners were added before, then `eventType` on `HMSSDK` should already be enabled\n if (this.listenerCount(eventType) <= 0) {\n this.enableHMSEventType(id, eventType);\n }\n\n let subscription: EventSubscription | null =\n this._nativeEventEmitter.addListener(eventType, listener);\n\n return {\n remove: () => {\n if (\n subscription &&\n Object.getOwnPropertyNames(subscription).includes('remove') &&\n typeof subscription.remove === 'function'\n ) {\n subscription.remove();\n subscription = null;\n } else {\n this._nativeEventEmitter.removeListener(eventType, listener);\n }\n\n // disable `eventType` on `HMSSDK`, if all listeners has been removed\n if (this.listenerCount(eventType) <= 0) {\n this.disableHMSEventType(id, eventType);\n }\n },\n };\n }\n\n removeAllListeners(id: string, eventType: string) {\n logger?.verbose('#Function HMSNativeEventEmitter.removeAllListeners', {\n id,\n eventType,\n });\n\n // disable `eventType` on `HMSSDK`\n this.disableHMSEventType(id, eventType);\n\n return this._nativeEventEmitter.removeAllListeners(eventType);\n }\n\n private enableHMSEventType(id: string, eventType: string) {\n logger?.verbose('#Function HMSNativeEventEmitter.enableHMSEventType', {\n id,\n eventType,\n });\n this._nativeModule.enableEvent({ id, eventType });\n }\n\n private disableHMSEventType(id: string, eventType: string) {\n logger?.verbose('#Function HMSNativeEventEmitter.disableHMSEventType', {\n id,\n eventType,\n });\n this._nativeModule.disableEvent({ id, eventType });\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AAAqC,SAAAE,gBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAD,CAAA,GAAAI,MAAA,CAAAC,cAAA,CAAAL,CAAA,EAAAC,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAT,CAAA,CAAAC,CAAA,IAAAC,CAAA,EAAAF,CAAA;AAAA,SAAAG,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAT,CAAA,EAAAD,CAAA,2BAAAC,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAF,CAAA,GAAAE,CAAA,CAAAU,MAAA,CAAAC,WAAA,kBAAAb,CAAA,QAAAU,CAAA,GAAAV,CAAA,CAAAc,IAA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O,CAAC,qDAAqD,EAAE;MACrEE,EAAE;MACFP;IACF,CAAC,CAAC;IACF,IAAI,CAACJ,aAAa,CAACsB,YAAY,CAAC;MAAEX,EAAE;MAAEP;IAAU,CAAC,CAAC;EACpD;AACF;AAACmB,OAAA,CAAA1B,qBAAA,GAAAA,qBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","_HMSLogger","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","HMSNativeEventEmitter","constructor","nativeModule","_nativeModule","_nativeEventEmitter","NativeEventEmitter","listenerCount","eventType","listeners","count","length","logger","verbose","addListener","id","listener","enableHMSEventType","subscription","remove","disableHMSEventType","removeAllListeners","enableEvent","disableEvent","exports"],"sources":["HMSNativeEventEmitter.ts"],"sourcesContent":["import { NativeEventEmitter } from 'react-native';\nimport type { EventSubscription } from 'react-native';\nimport { logger } from './HMSLogger';\n\nexport type HMSEventSubscription = {\n remove(): void;\n};\n\nexport class HMSNativeEventEmitter {\n private _nativeEventEmitter: NativeEventEmitter;\n private _nativeModule: any;\n\n constructor(nativeModule: any) {\n this._nativeModule = nativeModule;\n this._nativeEventEmitter = new NativeEventEmitter(nativeModule);\n }\n\n listenerCount(eventType: string): number {\n // For RN version < v0.64, listenerCount method is not available\n // @ts-ignore - typescript is giving error because we are running it with RN types version >= 0.64\n if (typeof this._nativeEventEmitter.listeners === 'function') {\n // @ts-ignore - typescript is giving error because we are running it with RN types version >= 0.64\n const count = this._nativeEventEmitter.listeners(eventType).length;\n\n logger?.verbose('#Function HMSNativeEventEmitter.listenerCount', {\n eventType,\n count,\n });\n return count;\n }\n\n // For RN version >= v0.64\n const count = this._nativeEventEmitter.listenerCount(eventType);\n\n logger?.verbose('#Function HMSNativeEventEmitter.listenerCount', {\n eventType,\n count,\n });\n return count;\n }\n\n addListener(\n id: string,\n eventType: string,\n listener: (...args: any[]) => any\n ): HMSEventSubscription {\n logger?.verbose('#Function HMSNativeEventEmitter.addListener', {\n id,\n eventType,\n listener,\n });\n\n // enable `eventType` on `HMSSDK`, if no listeners were added before\n // if some listeners were added before, then `eventType` on `HMSSDK` should already be enabled\n if (this.listenerCount(eventType) <= 0) {\n this.enableHMSEventType(id, eventType);\n }\n\n let subscription: EventSubscription | null =\n this._nativeEventEmitter.addListener(eventType, listener);\n\n return {\n remove: () => {\n if (subscription) {\n subscription.remove();\n subscription = null;\n }\n\n // disable `eventType` on `HMSSDK`, if all listeners has been removed\n if (this.listenerCount(eventType) <= 0) {\n this.disableHMSEventType(id, eventType);\n }\n },\n };\n }\n\n removeAllListeners(id: string, eventType: string) {\n logger?.verbose('#Function HMSNativeEventEmitter.removeAllListeners', {\n id,\n eventType,\n });\n\n // disable `eventType` on `HMSSDK`\n this.disableHMSEventType(id, eventType);\n\n return this._nativeEventEmitter.removeAllListeners(eventType);\n }\n\n private enableHMSEventType(id: string, eventType: string) {\n logger?.verbose('#Function HMSNativeEventEmitter.enableHMSEventType', {\n id,\n eventType,\n });\n this._nativeModule.enableEvent({ id, eventType });\n }\n\n private disableHMSEventType(id: string, eventType: string) {\n logger?.verbose('#Function HMSNativeEventEmitter.disableHMSEventType', {\n id,\n eventType,\n });\n this._nativeModule.disableEvent({ id, eventType });\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AAAqC,SAAAE,gBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAD,CAAA,GAAAI,MAAA,CAAAC,cAAA,CAAAL,CAAA,EAAAC,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAT,CAAA,CAAAC,CAAA,IAAAC,CAAA,EAAAF,CAAA;AAAA,SAAAG,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,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BAAM,CAAEC,OAAO,CAAC,qDAAqD,EAAE;MACrEE,EAAE;MACFP;IACF,CAAC,CAAC;IACF,IAAI,CAACJ,aAAa,CAACmB,YAAY,CAAC;MAAER,EAAE;MAAEP;IAAU,CAAC,CAAC;EACpD;AACF;AAACgB,OAAA,CAAAvB,qBAAA,GAAAA,qBAAA","ignoreList":[]}
@@ -19,6 +19,6 @@ let HMSPeerType = exports.HMSPeerType = /*#__PURE__*/function (HMSPeerType) {
19
19
  HMSPeerType["SIP"] = "SIP";
20
20
  HMSPeerType["REGULAR"] = "REGULAR";
21
21
  return HMSPeerType;
22
- }({}); // Represents a regular peer, such as a standard user in a video call.
22
+ }({});
23
23
  const HMSPeerTypeOrdinals = exports.HMSPeerTypeOrdinals = new Map([['0', HMSPeerType.SIP], ['1', HMSPeerType.REGULAR]]);
24
24
  //# sourceMappingURL=HMSPeerType.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["HMSPeerType","exports","HMSPeerTypeOrdinals","Map","SIP","REGULAR"],"sources":["HMSPeerType.ts"],"sourcesContent":["/**\n * Enum for HMSPeerType.\n *\n * Defines the types of peers within the HMS (100ms) system. This enumeration is used to distinguish between different\n * kinds of peers, such as SIP (Session Initiation Protocol) peers and regular peers. Each peer type has specific\n * characteristics and roles within the video conferencing or communication context.\n *\n * @enum {string}\n *\n * @see https://www.100ms.live/docs/server-side/v2/how-to-guides/Session%20Initiation%20Protocol%20(SIP)/SIP-Interconnect\n */\nexport enum HMSPeerType {\n SIP = 'SIP', // Represents a SIP peer, typically used for integrating with traditional telephony systems.\n REGULAR = 'REGULAR', // Represents a regular peer, such as a standard user in a video call.\n}\n\nexport const HMSPeerTypeOrdinals = new Map([\n ['0', HMSPeerType.SIP],\n ['1', HMSPeerType.REGULAR],\n]);\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,IAWYA,WAAW,GAAAC,OAAA,CAAAD,WAAA,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA,OAEA;AAGhB,MAAME,mBAAmB,GAAAD,OAAA,CAAAC,mBAAA,GAAG,IAAIC,GAAG,CAAC,CACzC,CAAC,GAAG,EAAEH,WAAW,CAACI,GAAG,CAAC,EACtB,CAAC,GAAG,EAAEJ,WAAW,CAACK,OAAO,CAAC,CAC3B,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["HMSPeerType","exports","HMSPeerTypeOrdinals","Map","SIP","REGULAR"],"sources":["HMSPeerType.ts"],"sourcesContent":["/**\n * Enum for HMSPeerType.\n *\n * Defines the types of peers within the HMS (100ms) system. This enumeration is used to distinguish between different\n * kinds of peers, such as SIP (Session Initiation Protocol) peers and regular peers. Each peer type has specific\n * characteristics and roles within the video conferencing or communication context.\n *\n * @enum {string}\n *\n * @see https://www.100ms.live/docs/server-side/v2/how-to-guides/Session%20Initiation%20Protocol%20(SIP)/SIP-Interconnect\n */\nexport enum HMSPeerType {\n SIP = 'SIP', // Represents a SIP peer, typically used for integrating with traditional telephony systems.\n REGULAR = 'REGULAR', // Represents a regular peer, such as a standard user in a video call.\n}\n\nexport const HMSPeerTypeOrdinals = new Map([\n ['0', HMSPeerType.SIP],\n ['1', HMSPeerType.REGULAR],\n]);\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,IAWYA,WAAW,GAAAC,OAAA,CAAAD,WAAA,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAKhB,MAAME,mBAAmB,GAAAD,OAAA,CAAAC,mBAAA,GAAG,IAAIC,GAAG,CAAC,CACzC,CAAC,GAAG,EAAEH,WAAW,CAACI,GAAG,CAAC,EACtB,CAAC,GAAG,EAAEJ,WAAW,CAACK,OAAO,CAAC,CAC3B,CAAC","ignoreList":[]}
@@ -146,10 +146,8 @@ class HMSSessionStore {
146
146
  this._addedKeyChangeListenerCount -= 1;
147
147
  if (this._addedKeyChangeListenerCount <= 0) {
148
148
  this._addedKeyChangeListenerCount = 0;
149
- if (this._deviceEventEmitterSubscription && typeof this._deviceEventEmitterSubscription.remove === 'function') {
149
+ if (this._deviceEventEmitterSubscription) {
150
150
  this._deviceEventEmitterSubscription.remove();
151
- } else {
152
- _reactNative.DeviceEventEmitter.removeListener(_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_SESSION_STORE_CHANGED, this._deviceEventEmitterListener);
153
151
  }
154
152
  this._deviceEventEmitterSubscription = undefined;
155
153
  this._eventEmitter = undefined;
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_HMSManagerModule","_interopRequireDefault","_HMSConstants","_HMSLogger","_HMSUpdateListenerActions","_utils","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","HMSSessionStore","constructor","set","key","data","HMSManager","setSessionMetadataForKey","id","HMSConstants","DEFAULT_SDK_ID","get","getSessionMetadataForKey","addKeyChangeListener","forKeys","callback","_deviceEventEmitterSubscription","DeviceEventEmitter","addListener","HMSUpdateListenerActions","ON_SESSION_STORE_CHANGED","_deviceEventEmitterListener","bind","_eventEmitter","EventEmitter","uniqueId","join","Date","now","toString","eventEmitter","subscriptions","map","cleanupHandler","_cleanup","keys","catch","err","_addedKeyChangeListenerCount","remove","subscriptionsToRemove","length","context","forEach","subscription","removeKeyChangeListener","error","logger","getLogger","verbose","removeListener","undefined","_getLogger","_this$_eventEmitter","emit","exports"],"sources":["HMSSessionStore.ts"],"sourcesContent":["import { DeviceEventEmitter } from 'react-native';\nimport type { EmitterSubscription as RNEmitterSubscription } from 'react-native';\n\nimport HMSManager from '../modules/HMSManagerModule';\n\nimport { HMSConstants } from './HMSConstants';\nimport { getLogger } from './HMSLogger';\nimport { HMSUpdateListenerActions } from './HMSUpdateListenerActions';\nimport { EventEmitter } from '../utils';\nimport type { EmitterSubscription } from '../utils';\n\nexport type JsonPrimitive = string | number | boolean | null;\nexport type JsonMap = {\n [key: string]: JsonPrimitive | JsonMap | JsonArray;\n};\nexport type JsonArray = Array<JsonPrimitive | JsonMap | JsonArray>;\nexport type JsonValue = JsonPrimitive | JsonMap | JsonArray;\n\n/**\n * Session store is a shared realtime key-value store that is accessible by all Peers in a Room.\n * It can be utilized to implement features such as pinned text, spotlight (which brings a particular\n * peer to the center stage for everyone in the room) and more, enhancing interactive experiences.\n *\n * To get an instance of `HMSSessionStore` class, You can add an event listener for `ON_SESSION_STORE_AVAILABLE`\n * event on the `HMSSDK` instance\n *\n * For example:\n * ```\n * hmsInstance.addEventListener(HMSUpdateListenerActions.ON_SESSION_STORE_AVAILABLE, <your callback function>);\n * ```\n *\n * Checkout Session Store docs fore more details ${@link https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/room/session-store}\n */\nexport class HMSSessionStore {\n private _deviceEventEmitterSubscription?: RNEmitterSubscription;\n private _eventEmitter?: EventEmitter;\n private _addedKeyChangeListenerCount = 0;\n\n /**\n * This method sets a value for a specific key on session store.\n * Once a value is assigned, it will be available for other peers in the room\n * who are listening for changes in value for that specific key.\n *\n * @param {JsonValue} value - The value to set, which can be any JSON-compatible type.\n * @param {string} key - The key under which to store the value.\n * @returns {Promise} A promise that resolves when the operation is complete.\n */\n async set(value: JsonValue, key: string) {\n const data: { success: true } = await HMSManager.setSessionMetadataForKey({\n id: HMSConstants.DEFAULT_SDK_ID,\n key,\n value,\n });\n return data;\n }\n\n /**\n * Retrieves the value for a given key from the session store. This method does not subscribe\n * to changes; it only returns the current value at the time of the call.\n *\n * To listen to value change updates use `addKeyChangeListener` method instead.\n *\n * @param {string} key - The key whose value is to be retrieved.\n * @returns {Promise} A promise that resolves with the value of the key.\n */\n async get(key: string) {\n const data: JsonValue = await HMSManager.getSessionMetadataForKey({\n id: HMSConstants.DEFAULT_SDK_ID,\n key,\n });\n return data;\n }\n\n /**\n * Registers a callback to listen for changes to specified keys in the session store.\n * The callback is called with the initial value and again whenever any value changes.\n *\n * @param {string[]} forKeys - An array of keys to listen for changes on.\n * @param {Function} callback - The function to call when a value changes.\n * @returns {Object} An object with a `remove` method to unregister the listener.\n */\n addKeyChangeListener<T extends string[]>(\n forKeys: T,\n callback: (\n error: string | null,\n data: { key: T[number]; value: JsonValue } | null\n ) => void\n ) {\n // Add Native Device Event Emitter if it is not already added\n if (!this._deviceEventEmitterSubscription) {\n this._deviceEventEmitterSubscription = DeviceEventEmitter.addListener(\n HMSUpdateListenerActions.ON_SESSION_STORE_CHANGED,\n this._deviceEventEmitterListener.bind(this)\n );\n }\n\n // Create JS side EventEmitter\n if (!this._eventEmitter) {\n this._eventEmitter = new EventEmitter();\n }\n\n // Unique Identifier for adding native event listener\n const uniqueId = forKeys.join('') + '_' + Date.now().toString();\n\n const eventEmitter = this._eventEmitter;\n\n // Add listeners on eventEmitter for each key\n const subscriptions = forKeys.map((key) =>\n eventEmitter.addListener(key, callback, { uniqueId })\n );\n\n //\n let cleanupHandler: (() => void) | null = () => {\n this._cleanup(subscriptions);\n };\n\n // Adding 'KeyChangeListener' on native side\n HMSManager.addKeyChangeListener({\n id: HMSConstants.DEFAULT_SDK_ID,\n keys: forKeys,\n uniqueId,\n })\n // Adding 'KeyChangeListener' fails on native side\n .catch((err: any) => {\n if (typeof cleanupHandler === 'function') {\n callback(err, null);\n cleanupHandler();\n cleanupHandler = null;\n }\n });\n\n this._addedKeyChangeListenerCount += 1;\n\n return {\n remove: () => {\n if (typeof cleanupHandler === 'function') {\n cleanupHandler();\n cleanupHandler = null;\n }\n },\n };\n }\n\n private _cleanup(subscriptionsToRemove: EmitterSubscription[]) {\n // Extracting `uniqueId` from first subscription (all subscriptions have same uniqueId)\n // this `uniqueId` will be used to remove 'KeyChangeListener' from native side\n const uniqueId =\n subscriptionsToRemove.length > 0\n ? (subscriptionsToRemove[0]!.context as { uniqueId: string }).uniqueId\n : null;\n\n // Removing required subscriptions from 'eventEmitter'\n subscriptionsToRemove.forEach((subscription) => subscription.remove());\n\n // Removing 'KeyChangeListener' from native side\n HMSManager.removeKeyChangeListener({\n id: HMSConstants.DEFAULT_SDK_ID,\n uniqueId,\n }).catch((error: any) => {\n const logger = getLogger();\n logger?.verbose(\n \"Error while removing key change listener, Listener didn't get registerred at first place or was already removed\",\n error\n );\n });\n\n this._addedKeyChangeListenerCount -= 1;\n\n if (this._addedKeyChangeListenerCount <= 0) {\n this._addedKeyChangeListenerCount = 0;\n if (\n this._deviceEventEmitterSubscription &&\n typeof this._deviceEventEmitterSubscription.remove === 'function'\n ) {\n this._deviceEventEmitterSubscription.remove();\n } else {\n DeviceEventEmitter.removeListener(\n HMSUpdateListenerActions.ON_SESSION_STORE_CHANGED,\n this._deviceEventEmitterListener\n );\n }\n\n this._deviceEventEmitterSubscription = undefined;\n\n this._eventEmitter = undefined;\n }\n }\n\n private _deviceEventEmitterListener(data: {\n id: string;\n key: string;\n value: JsonValue;\n }) {\n // if id is different from default sdk_id, return early\n if (data.id !== HMSConstants.DEFAULT_SDK_ID) {\n return;\n }\n\n // emit event for the key\n getLogger()?.verbose('#Listener ON_SESSION_STORE_CHANGED event: ', data);\n\n this._eventEmitter?.emit(data.key, null, data);\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAGA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,yBAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAAwC,SAAAE,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EAAAI,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAJ,CAAA,GAAAO,MAAA,CAAAC,cAAA,C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A,CAAChB,IAInC,EAAE;IAAA,IAAA+C,UAAA,EAAAC,mBAAA;IACD;IACA,IAAIhD,IAAI,CAACG,EAAE,KAAKC,0BAAY,CAACC,cAAc,EAAE;MAC3C;IACF;;IAEA;IACA,CAAA0C,UAAA,OAAAJ,oBAAS,EAAC,CAAC,cAAAI,UAAA,eAAXA,UAAA,CAAaH,OAAO,CAAC,4CAA4C,EAAE5C,IAAI,CAAC;IAExE,CAAAgD,mBAAA,OAAI,CAAC9B,aAAa,cAAA8B,mBAAA,eAAlBA,mBAAA,CAAoBC,IAAI,CAACjD,IAAI,CAACD,GAAG,EAAE,IAAI,EAAEC,IAAI,CAAC;EAChD;AACF;AAACkD,OAAA,CAAAtD,eAAA,GAAAA,eAAA","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","_HMSManagerModule","_interopRequireDefault","_HMSConstants","_HMSLogger","_HMSUpdateListenerActions","_utils","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","HMSSessionStore","constructor","set","key","data","HMSManager","setSessionMetadataForKey","id","HMSConstants","DEFAULT_SDK_ID","get","getSessionMetadataForKey","addKeyChangeListener","forKeys","callback","_deviceEventEmitterSubscription","DeviceEventEmitter","addListener","HMSUpdateListenerActions","ON_SESSION_STORE_CHANGED","_deviceEventEmitterListener","bind","_eventEmitter","EventEmitter","uniqueId","join","Date","now","toString","eventEmitter","subscriptions","map","cleanupHandler","_cleanup","keys","catch","err","_addedKeyChangeListenerCount","remove","subscriptionsToRemove","length","context","forEach","subscription","removeKeyChangeListener","error","logger","getLogger","verbose","undefined","_getLogger","_this$_eventEmitter","emit","exports"],"sources":["HMSSessionStore.ts"],"sourcesContent":["import { DeviceEventEmitter } from 'react-native';\nimport type { EmitterSubscription as RNEmitterSubscription } from 'react-native';\n\nimport HMSManager from '../modules/HMSManagerModule';\n\nimport { HMSConstants } from './HMSConstants';\nimport { getLogger } from './HMSLogger';\nimport { HMSUpdateListenerActions } from './HMSUpdateListenerActions';\nimport { EventEmitter } from '../utils';\nimport type { EmitterSubscription } from '../utils';\n\nexport type JsonPrimitive = string | number | boolean | null;\nexport type JsonMap = {\n [key: string]: JsonPrimitive | JsonMap | JsonArray;\n};\nexport type JsonArray = Array<JsonPrimitive | JsonMap | JsonArray>;\nexport type JsonValue = JsonPrimitive | JsonMap | JsonArray;\n\n/**\n * Session store is a shared realtime key-value store that is accessible by all Peers in a Room.\n * It can be utilized to implement features such as pinned text, spotlight (which brings a particular\n * peer to the center stage for everyone in the room) and more, enhancing interactive experiences.\n *\n * To get an instance of `HMSSessionStore` class, You can add an event listener for `ON_SESSION_STORE_AVAILABLE`\n * event on the `HMSSDK` instance\n *\n * For example:\n * ```\n * hmsInstance.addEventListener(HMSUpdateListenerActions.ON_SESSION_STORE_AVAILABLE, <your callback function>);\n * ```\n *\n * Checkout Session Store docs fore more details ${@link https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/room/session-store}\n */\nexport class HMSSessionStore {\n private _deviceEventEmitterSubscription?: RNEmitterSubscription;\n private _eventEmitter?: EventEmitter;\n private _addedKeyChangeListenerCount = 0;\n\n /**\n * This method sets a value for a specific key on session store.\n * Once a value is assigned, it will be available for other peers in the room\n * who are listening for changes in value for that specific key.\n *\n * @param {JsonValue} value - The value to set, which can be any JSON-compatible type.\n * @param {string} key - The key under which to store the value.\n * @returns {Promise} A promise that resolves when the operation is complete.\n */\n async set(value: JsonValue, key: string) {\n const data: { success: true } = await HMSManager.setSessionMetadataForKey({\n id: HMSConstants.DEFAULT_SDK_ID,\n key,\n value,\n });\n return data;\n }\n\n /**\n * Retrieves the value for a given key from the session store. This method does not subscribe\n * to changes; it only returns the current value at the time of the call.\n *\n * To listen to value change updates use `addKeyChangeListener` method instead.\n *\n * @param {string} key - The key whose value is to be retrieved.\n * @returns {Promise} A promise that resolves with the value of the key.\n */\n async get(key: string) {\n const data: JsonValue = await HMSManager.getSessionMetadataForKey({\n id: HMSConstants.DEFAULT_SDK_ID,\n key,\n });\n return data;\n }\n\n /**\n * Registers a callback to listen for changes to specified keys in the session store.\n * The callback is called with the initial value and again whenever any value changes.\n *\n * @param {string[]} forKeys - An array of keys to listen for changes on.\n * @param {Function} callback - The function to call when a value changes.\n * @returns {Object} An object with a `remove` method to unregister the listener.\n */\n addKeyChangeListener<T extends string[]>(\n forKeys: T,\n callback: (\n error: string | null,\n data: { key: T[number]; value: JsonValue } | null\n ) => void\n ) {\n // Add Native Device Event Emitter if it is not already added\n if (!this._deviceEventEmitterSubscription) {\n this._deviceEventEmitterSubscription = DeviceEventEmitter.addListener(\n HMSUpdateListenerActions.ON_SESSION_STORE_CHANGED,\n this._deviceEventEmitterListener.bind(this)\n );\n }\n\n // Create JS side EventEmitter\n if (!this._eventEmitter) {\n this._eventEmitter = new EventEmitter();\n }\n\n // Unique Identifier for adding native event listener\n const uniqueId = forKeys.join('') + '_' + Date.now().toString();\n\n const eventEmitter = this._eventEmitter;\n\n // Add listeners on eventEmitter for each key\n const subscriptions = forKeys.map((key) =>\n eventEmitter.addListener(key, callback, { uniqueId })\n );\n\n //\n let cleanupHandler: (() => void) | null = () => {\n this._cleanup(subscriptions);\n };\n\n // Adding 'KeyChangeListener' on native side\n HMSManager.addKeyChangeListener({\n id: HMSConstants.DEFAULT_SDK_ID,\n keys: forKeys,\n uniqueId,\n })\n // Adding 'KeyChangeListener' fails on native side\n .catch((err: any) => {\n if (typeof cleanupHandler === 'function') {\n callback(err, null);\n cleanupHandler();\n cleanupHandler = null;\n }\n });\n\n this._addedKeyChangeListenerCount += 1;\n\n return {\n remove: () => {\n if (typeof cleanupHandler === 'function') {\n cleanupHandler();\n cleanupHandler = null;\n }\n },\n };\n }\n\n private _cleanup(subscriptionsToRemove: EmitterSubscription[]) {\n // Extracting `uniqueId` from first subscription (all subscriptions have same uniqueId)\n // this `uniqueId` will be used to remove 'KeyChangeListener' from native side\n const uniqueId =\n subscriptionsToRemove.length > 0\n ? (subscriptionsToRemove[0]!.context as { uniqueId: string }).uniqueId\n : null;\n\n // Removing required subscriptions from 'eventEmitter'\n subscriptionsToRemove.forEach((subscription) => subscription.remove());\n\n // Removing 'KeyChangeListener' from native side\n HMSManager.removeKeyChangeListener({\n id: HMSConstants.DEFAULT_SDK_ID,\n uniqueId,\n }).catch((error: any) => {\n const logger = getLogger();\n logger?.verbose(\n \"Error while removing key change listener, Listener didn't get registerred at first place or was already removed\",\n error\n );\n });\n\n this._addedKeyChangeListenerCount -= 1;\n\n if (this._addedKeyChangeListenerCount <= 0) {\n this._addedKeyChangeListenerCount = 0;\n if (this._deviceEventEmitterSubscription) {\n this._deviceEventEmitterSubscription.remove();\n }\n\n this._deviceEventEmitterSubscription = undefined;\n\n this._eventEmitter = undefined;\n }\n }\n\n private _deviceEventEmitterListener(data: {\n id: string;\n key: string;\n value: JsonValue;\n }) {\n // if id is different from default sdk_id, return early\n if (data.id !== HMSConstants.DEFAULT_SDK_ID) {\n return;\n }\n\n // emit event for the key\n getLogger()?.verbose('#Listener ON_SESSION_STORE_CHANGED event: ', data);\n\n this._eventEmitter?.emit(data.key, null, data);\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAGA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,yBAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAAwC,SAAAE,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EAAAI,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAJ,CAAA,GAAAO,MAAA,CAAAC,cAAA,CAAAR,CAAA,EAAAI,CAAA,IAAAK,KAAA,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,eAAXA,UAAA,CAAaF,OAAO,CAAC,4CAA4C,EAAE5C,IAAI,CAAC;IAExE,CAAA+C,mBAAA,OAAI,CAAC7B,aAAa,cAAA6B,mBAAA,eAAlBA,mBAAA,CAAoBC,IAAI,CAAChD,IAAI,CAACD,GAAG,EAAE,IAAI,EAAEC,IAAI,CAAC;EAChD;AACF;AAACiD,OAAA,CAAArD,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -9,8 +9,7 @@ var _reactNative = require("react-native");
9
9
  var _HMSConstants = require("./HMSConstants");
10
10
  var _HMSVideoViewMode = require("./HMSVideoViewMode");
11
11
  var _hmsviews = require("../hooks/hmsviews");
12
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
13
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
12
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
14
13
  /**
15
14
  * Interface defining the properties for the `HmsView` component.
16
15
  *
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_HMSConstants","_HMSVideoViewMode","_hmsviews","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","HmsView","requireNativeComponent","_nextRequestId","_requestMap","Map","HmsViewComponent","exports","React","forwardRef","props","ref","trackId","style","styles","hmsView","id","HMSConstants","DEFAULT_SDK_ID","mirror","setZOrderMediaOverlay","autoSimulcast","scaleType","HMSVideoViewMode","ASPECT_FILL","hmsViewRef","useRef","applyStyles_ANDROID","setApplyStyles_ANDROID","useState","data","onChange","nativeEvent","event","setHmsViewsResolutionsState","_onDataReturned","requestId","result","error","promise","resolve","reject","delete","capture","viewManagerConfig","UIManager","getViewManagerConfig","requestMap","Promise","dispatchViewManagerCommand","findNodeHandle","current","Commands","useImperativeHandle","createElement","Platform","OS","onDataReturned","StyleSheet","create","flex"],"sources":["HmsView.tsx"],"sourcesContent":["import React, { useState, useImperativeHandle, useRef } from 'react';\nimport {\n findNodeHandle,\n requireNativeComponent,\n StyleSheet,\n UIManager,\n Platform,\n} from 'react-native';\nimport type { NativeSyntheticEvent, ViewStyle } from 'react-native';\nimport { HMSConstants } from './HMSConstants';\nimport { HMSVideoViewMode } from './HMSVideoViewMode';\nimport { setHmsViewsResolutionsState } from '../hooks/hmsviews';\n\n/**\n * Interface defining the properties for the `HmsView` component.\n *\n * This interface specifies the structure of the props that the `HmsView` component expects. It includes\n * properties for configuring the video track display, such as the track ID, mirroring options,\n * and scale type. It also includes properties for handling events and customizing the component's style.\n *\n * @interface HmsViewProps\n * @property {Object} data - An object containing the track ID, instance ID, mirroring option, and scale type for the video or audio track.\n * @property {string} data.trackId - The unique identifier for the track to be displayed.\n * @property {string} data.id - The identifier for the `HmsViewComponent` instance.\n * @property {boolean} data.mirror - Indicates whether the video should be mirrored. This is commonly used for local video tracks.\n * @property {HMSVideoViewMode} data.scaleType - Determines how the video fits within the bounds of the view (e.g., aspect fill, aspect fit).\n * @property {boolean} autoSimulcast - Enables automatic simulcast layer switching based on network conditions, if supported.\n * @property {boolean} setZOrderMediaOverlay - When true, the video view will be rendered above the regular view hierarchy.\n * @property {ViewStyle} style - Custom styles to apply to the view.\n * @property {Function} onChange - A callback function that is invoked when the `HmsView` component emits a change event.\n * @property {Function} onDataReturned - A callback function that is invoked when the `HmsView` component returns data in response to a capture frame event.\n *\n * @see {https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/render-video/overview}\n */\ninterface HmsViewProps {\n data: {\n trackId: string;\n id: string;\n mirror: boolean;\n scaleType: HMSVideoViewMode;\n };\n autoSimulcast: boolean;\n setZOrderMediaOverlay: boolean;\n scaleType: HMSVideoViewMode;\n style: ViewStyle;\n onChange: Function;\n onDataReturned: Function;\n}\n\n// Imports the `HmsView` component from the native side using the `requireNativeComponent` function.\n// This component is used to render video tracks in the application.\nconst HmsView = requireNativeComponent<HmsViewProps>('HMSView');\nlet _nextRequestId = 1;\nlet _requestMap = new Map();\n\n/**\n * Defines the properties for the `HmsViewComponent`.\n *\n * This interface outlines the props that can be passed to the `HmsViewComponent` to configure its behavior and appearance.\n *\n * @interface HmsComponentProps\n * @property {string} trackId - The unique identifier for the track to be displayed.\n * @property {ViewStyle} [style] - Optional. Custom styles to apply to the view.\n * @property {boolean} [mirror] - Optional. If true, the video will be mirrored. This is commonly used for local video tracks.\n * @property {boolean} [autoSimulcast] - Optional. Enables automatic simulcast layer switching based on network conditions, if supported.\n * @property {HMSVideoViewMode} [scaleType] - Optional. Determines how the video fits within the bounds of the view (e.g., aspect fill, aspect fit).\n * @property {boolean} [setZOrderMediaOverlay] - Optional. When true, the video view will be rendered above the regular view hierarchy.\n * @property {string} id - The identifier for the `HmsViewComponent` instance.\n *\n * @see {https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/render-video/overview}\n */\nexport interface HmsComponentProps {\n trackId: string;\n style?: ViewStyle;\n mirror?: boolean;\n autoSimulcast?: boolean;\n scaleType?: HMSVideoViewMode;\n setZOrderMediaOverlay?: boolean;\n id: string;\n}\n\nexport const HmsViewComponent = React.forwardRef<any, HmsComponentProps>(\n (props, ref) => {\n const {\n trackId,\n style = styles.hmsView,\n id = HMSConstants.DEFAULT_SDK_ID,\n mirror = false,\n setZOrderMediaOverlay = false,\n autoSimulcast = true,\n scaleType = HMSVideoViewMode.ASPECT_FILL,\n } = props;\n\n const hmsViewRef: any = useRef();\n const [applyStyles_ANDROID, setApplyStyles_ANDROID] = useState(false);\n const data = {\n trackId,\n id,\n mirror,\n scaleType,\n };\n\n /**\n * This method is passed to `onChange` prop of `HmsView` Native Component.\n * It is invoked when `HmsView` emits 'topChange' event.\n */\n const onChange = ({\n nativeEvent,\n }: NativeSyntheticEvent<{\n data: { height: number; width: number };\n event: 'ON_RESOLUTION_CHANGE_EVENT';\n }>) => {\n const { event, data } = nativeEvent;\n\n setApplyStyles_ANDROID(true);\n\n if (event === 'ON_RESOLUTION_CHANGE_EVENT') {\n setHmsViewsResolutionsState(trackId, data);\n }\n };\n\n /**\n * This method is passed to `onDataReturned` prop of `HmsView` Native Component.\n * It is invoked when `HmsView` emits 'captureFrame' event.\n */\n const _onDataReturned = (event: {\n nativeEvent: { requestId: any; result: any; error: any };\n }) => {\n // We grab the relevant data out of our event.\n let { requestId, result, error } = event.nativeEvent;\n // Then we get the promise we saved earlier for the given request ID.\n let promise = _requestMap.get(requestId);\n if (result) {\n // If it was successful, we resolve the promise.\n promise.resolve(result);\n } else {\n // Otherwise, we reject it.\n promise.reject(error);\n }\n // Finally, we clean up our request map.\n _requestMap.delete(requestId);\n };\n\n const capture = async () => {\n const viewManagerConfig = UIManager.getViewManagerConfig('HMSView');\n\n let requestId = _nextRequestId++;\n let requestMap = _requestMap;\n\n // We create a promise here that will be resolved once `_onRequestDone` is\n // called.\n let promise = new Promise(function (resolve, reject) {\n requestMap.set(requestId, { resolve, reject });\n });\n\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(hmsViewRef.current),\n viewManagerConfig.Commands.capture,\n [requestId]\n );\n return promise;\n };\n\n useImperativeHandle(ref, () => {\n return {\n capture,\n };\n });\n\n return (\n <HmsView\n ref={hmsViewRef}\n onChange={onChange}\n data={data}\n style={\n Platform.OS === 'android' ? (applyStyles_ANDROID ? style : {}) : style\n }\n autoSimulcast={autoSimulcast}\n scaleType={scaleType}\n setZOrderMediaOverlay={setZOrderMediaOverlay}\n onDataReturned={_onDataReturned}\n />\n );\n }\n);\n\nconst styles = StyleSheet.create({\n hmsView: {\n flex: 1,\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AAAgE,SAAAK,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CA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AAC,2BAAc,EAACzB,UAAU,CAAC0B,OAAO,CAAC,EAClCP,iBAAiB,CAACQ,QAAQ,CAACT,OAAO,EAClC,CAACP,SAAS,CACZ,CAAC;IACD,OAAOG,OAAO;EAChB,CAAC;EAED,IAAAc,0BAAmB,EAAC1C,GAAG,EAAE,MAAM;IAC7B,OAAO;MACLgC;IACF,CAAC;EACH,CAAC,CAAC;EAEF,oBACErE,MAAA,CAAAa,OAAA,CAAAmE,aAAA,CAACrD,OAAO;IACNU,GAAG,EAAEc,UAAW;IAChBM,QAAQ,EAAEA,QAAS;IACnBD,IAAI,EAAEA,IAAK;IACXjB,KAAK,EACH0C,qBAAQ,CAACC,EAAE,KAAK,SAAS,GAAI7B,mBAAmB,GAAGd,KAAK,GAAG,CAAC,CAAC,GAAIA,KAClE;IACDQ,aAAa,EAAEA,aAAc;IAC7BC,SAAS,EAAEA,SAAU;IACrBF,qBAAqB,EAAEA,qBAAsB;IAC7CqC,cAAc,EAAEtB;EAAgB,CACjC,CAAC;AAEN,CACF,CAAC;AAED,MAAMrB,MAAM,GAAG4C,uBAAU,CAACC,MAAM,CAAC;EAC/B5C,OAAO,EAAE;IACP6C,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_HMSConstants","_HMSVideoViewMode","_hmsviews","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","HmsView","requireNativeComponent","_nextRequestId","_requestMap","Map","HmsViewComponent","exports","React","forwardRef","props","ref","trackId","style","styles","hmsView","id","HMSConstants","DEFAULT_SDK_ID","mirror","setZOrderMediaOverlay","autoSimulcast","scaleType","HMSVideoViewMode","ASPECT_FILL","hmsViewRef","useRef","applyStyles_ANDROID","setApplyStyles_ANDROID","useState","data","onChange","nativeEvent","event","setHmsViewsResolutionsState","_onDataReturned","requestId","result","error","promise","resolve","reject","delete","capture","viewManagerConfig","UIManager","getViewManagerConfig","requestMap","Promise","dispatchViewManagerCommand","findNodeHandle","current","Commands","useImperativeHandle","createElement","Platform","OS","onDataReturned","StyleSheet","create","flex"],"sources":["HmsView.tsx"],"sourcesContent":["import React, { useState, useImperativeHandle, useRef } from 'react';\nimport {\n findNodeHandle,\n requireNativeComponent,\n StyleSheet,\n UIManager,\n Platform,\n} from 'react-native';\nimport type { NativeSyntheticEvent, ViewStyle } from 'react-native';\nimport { HMSConstants } from './HMSConstants';\nimport { HMSVideoViewMode } from './HMSVideoViewMode';\nimport { setHmsViewsResolutionsState } from '../hooks/hmsviews';\n\n/**\n * Interface defining the properties for the `HmsView` component.\n *\n * This interface specifies the structure of the props that the `HmsView` component expects. It includes\n * properties for configuring the video track display, such as the track ID, mirroring options,\n * and scale type. It also includes properties for handling events and customizing the component's style.\n *\n * @interface HmsViewProps\n * @property {Object} data - An object containing the track ID, instance ID, mirroring option, and scale type for the video or audio track.\n * @property {string} data.trackId - The unique identifier for the track to be displayed.\n * @property {string} data.id - The identifier for the `HmsViewComponent` instance.\n * @property {boolean} data.mirror - Indicates whether the video should be mirrored. This is commonly used for local video tracks.\n * @property {HMSVideoViewMode} data.scaleType - Determines how the video fits within the bounds of the view (e.g., aspect fill, aspect fit).\n * @property {boolean} autoSimulcast - Enables automatic simulcast layer switching based on network conditions, if supported.\n * @property {boolean} setZOrderMediaOverlay - When true, the video view will be rendered above the regular view hierarchy.\n * @property {ViewStyle} style - Custom styles to apply to the view.\n * @property {Function} onChange - A callback function that is invoked when the `HmsView` component emits a change event.\n * @property {Function} onDataReturned - A callback function that is invoked when the `HmsView` component returns data in response to a capture frame event.\n *\n * @see {https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/render-video/overview}\n */\ninterface HmsViewProps {\n data: {\n trackId: string;\n id: string;\n mirror: boolean;\n scaleType: HMSVideoViewMode;\n };\n autoSimulcast: boolean;\n setZOrderMediaOverlay: boolean;\n scaleType: HMSVideoViewMode;\n style: ViewStyle;\n onChange: Function;\n onDataReturned: Function;\n}\n\n// Imports the `HmsView` component from the native side using the `requireNativeComponent` function.\n// This component is used to render video tracks in the application.\nconst HmsView = requireNativeComponent<HmsViewProps>('HMSView');\nlet _nextRequestId = 1;\nlet _requestMap = new Map();\n\n/**\n * Defines the properties for the `HmsViewComponent`.\n *\n * This interface outlines the props that can be passed to the `HmsViewComponent` to configure its behavior and appearance.\n *\n * @interface HmsComponentProps\n * @property {string} trackId - The unique identifier for the track to be displayed.\n * @property {ViewStyle} [style] - Optional. Custom styles to apply to the view.\n * @property {boolean} [mirror] - Optional. If true, the video will be mirrored. This is commonly used for local video tracks.\n * @property {boolean} [autoSimulcast] - Optional. Enables automatic simulcast layer switching based on network conditions, if supported.\n * @property {HMSVideoViewMode} [scaleType] - Optional. Determines how the video fits within the bounds of the view (e.g., aspect fill, aspect fit).\n * @property {boolean} [setZOrderMediaOverlay] - Optional. When true, the video view will be rendered above the regular view hierarchy.\n * @property {string} id - The identifier for the `HmsViewComponent` instance.\n *\n * @see {https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/render-video/overview}\n */\nexport interface HmsComponentProps {\n trackId: string;\n style?: ViewStyle;\n mirror?: boolean;\n autoSimulcast?: boolean;\n scaleType?: HMSVideoViewMode;\n setZOrderMediaOverlay?: boolean;\n id: string;\n}\n\nexport const HmsViewComponent = React.forwardRef<any, HmsComponentProps>(\n (props, ref) => {\n const {\n trackId,\n style = styles.hmsView,\n id = HMSConstants.DEFAULT_SDK_ID,\n mirror = false,\n setZOrderMediaOverlay = false,\n autoSimulcast = true,\n scaleType = HMSVideoViewMode.ASPECT_FILL,\n } = props;\n\n const hmsViewRef: any = useRef();\n const [applyStyles_ANDROID, setApplyStyles_ANDROID] = useState(false);\n const data = {\n trackId,\n id,\n mirror,\n scaleType,\n };\n\n /**\n * This method is passed to `onChange` prop of `HmsView` Native Component.\n * It is invoked when `HmsView` emits 'topChange' event.\n */\n const onChange = ({\n nativeEvent,\n }: NativeSyntheticEvent<{\n data: { height: number; width: number };\n event: 'ON_RESOLUTION_CHANGE_EVENT';\n }>) => {\n const { event, data } = nativeEvent;\n\n setApplyStyles_ANDROID(true);\n\n if (event === 'ON_RESOLUTION_CHANGE_EVENT') {\n setHmsViewsResolutionsState(trackId, data);\n }\n };\n\n /**\n * This method is passed to `onDataReturned` prop of `HmsView` Native Component.\n * It is invoked when `HmsView` emits 'captureFrame' event.\n */\n const _onDataReturned = (event: {\n nativeEvent: { requestId: any; result: any; error: any };\n }) => {\n // We grab the relevant data out of our event.\n let { requestId, result, error } = event.nativeEvent;\n // Then we get the promise we saved earlier for the given request ID.\n let promise = _requestMap.get(requestId);\n if (result) {\n // If it was successful, we resolve the promise.\n promise.resolve(result);\n } else {\n // Otherwise, we reject it.\n promise.reject(error);\n }\n // Finally, we clean up our request map.\n _requestMap.delete(requestId);\n };\n\n const capture = async () => {\n const viewManagerConfig = UIManager.getViewManagerConfig('HMSView');\n\n let requestId = _nextRequestId++;\n let requestMap = _requestMap;\n\n // We create a promise here that will be resolved once `_onRequestDone` is\n // called.\n let promise = new Promise(function (resolve, reject) {\n requestMap.set(requestId, { resolve, reject });\n });\n\n UIManager.dispatchViewManagerCommand(\n findNodeHandle(hmsViewRef.current),\n viewManagerConfig.Commands.capture,\n [requestId]\n );\n return promise;\n };\n\n useImperativeHandle(ref, () => {\n return {\n capture,\n };\n });\n\n return (\n <HmsView\n ref={hmsViewRef}\n onChange={onChange}\n data={data}\n style={\n Platform.OS === 'android' ? (applyStyles_ANDROID ? style : {}) : style\n }\n autoSimulcast={autoSimulcast}\n scaleType={scaleType}\n setZOrderMediaOverlay={setZOrderMediaOverlay}\n onDataReturned={_onDataReturned}\n />\n );\n }\n);\n\nconst styles = StyleSheet.create({\n hmsView: {\n flex: 1,\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,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AC;AAEN,CACF,CAAC;AAED,MAAMrB,MAAM,GAAG4C,uBAAU,CAACC,MAAM,CAAC;EAC/B5C,OAAO,EAAE;IACP6C,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
@@ -12,8 +12,7 @@ var _types = require("../../types");
12
12
  var _HMSEncoder = require("../../classes/HMSEncoder");
13
13
  var _hmsStore = require("../../stores/hms-store");
14
14
  var _hlsPlayerStatsStore = require("../../stores/hls-player-stats-store");
15
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
16
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
17
16
  const _HMSHLSPlayer = ({
18
17
  url = '',
19
18
  style,