@100mslive/react-native-hms 1.6.2 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -39
- package/android/.gradle/6.7.1/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/6.7.1/fileChanges/last-build.bin +0 -0
- package/android/.gradle/6.7.1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/6.9/executionHistory/executionHistory.bin +0 -0
- package/android/.gradle/6.9/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/6.9/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/6.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/android/build.gradle +24 -9
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/android/gradlew +103 -104
- package/android/gradlew.bat +3 -18
- package/android/src/main/java/com/reactnativehmssdk/HMSDecoder.kt +40 -17
- package/android/src/main/java/com/reactnativehmssdk/HMSHLSPlayer.kt +248 -0
- package/android/src/main/java/com/reactnativehmssdk/HMSHLSPlayerManager.kt +101 -0
- package/android/src/main/java/com/reactnativehmssdk/HMSHelper.kt +12 -6
- package/android/src/main/java/com/reactnativehmssdk/HMSManager.kt +7 -14
- package/android/src/main/java/com/reactnativehmssdk/HMSRNSDK.kt +118 -113
- package/android/src/main/java/com/reactnativehmssdk/HmssdkPackage.kt +1 -1
- package/android/src/main/res/layout/player_view.xml +9 -0
- package/ios/HMSDecoder.swift +8 -7
- package/ios/HMSHLSPlayerManager.m +22 -0
- package/ios/HMSHLSPlayerManager.swift +368 -0
- package/ios/HMSHelper.swift +6 -2
- package/ios/HMSManager.m +5 -2
- package/ios/HMSManager.swift +30 -16
- package/ios/HMSRNSDK.swift +84 -105
- package/lib/commonjs/classes/HMSAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSBrowserRecordingState.js +2 -0
- package/lib/commonjs/classes/HMSBrowserRecordingState.js.map +1 -1
- package/lib/commonjs/classes/HMSCameraControl.js +3 -5
- package/lib/commonjs/classes/HMSCameraControl.js.map +1 -1
- package/lib/commonjs/classes/HMSEncoder.js +44 -38
- package/lib/commonjs/classes/HMSEncoder.js.map +1 -1
- package/lib/commonjs/classes/HMSEventEmitter.js +10 -0
- package/lib/commonjs/classes/HMSEventEmitter.js.map +1 -0
- package/lib/commonjs/classes/HMSLocalAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalPeer.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSManagerModule.js +18 -0
- package/lib/commonjs/classes/HMSManagerModule.js.map +1 -0
- package/lib/commonjs/classes/HMSNativeEventEmitter.js.map +1 -1
- package/lib/commonjs/classes/HMSNativeEventListener.js +13 -0
- package/lib/commonjs/classes/HMSNativeEventListener.js.map +1 -0
- package/lib/commonjs/classes/HMSPeer.js +55 -20
- package/lib/commonjs/classes/HMSPeer.js.map +1 -1
- package/lib/commonjs/classes/HMSPeerUpdate.js +1 -1
- package/lib/commonjs/classes/HMSPeerUpdate.js.map +1 -1
- package/lib/commonjs/classes/HMSPeersCache.js +33 -43
- package/lib/commonjs/classes/HMSPeersCache.js.map +1 -1
- package/lib/commonjs/classes/HMSRTMPConfig.js.map +1 -1
- package/lib/commonjs/classes/HMSRemoteAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSRemotePeer.js.map +1 -1
- package/lib/commonjs/classes/HMSRemoteVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSRoom.js.map +1 -1
- package/lib/commonjs/classes/HMSRoomCache.js +10 -5
- package/lib/commonjs/classes/HMSRoomCache.js.map +1 -1
- package/lib/commonjs/classes/HMSSDK.js +108 -113
- package/lib/commonjs/classes/HMSSDK.js.map +1 -1
- package/lib/commonjs/classes/HMSSessionStore.js +6 -7
- package/lib/commonjs/classes/HMSSessionStore.js.map +1 -1
- package/lib/commonjs/classes/HMSTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HmsView.js +4 -1
- package/lib/commonjs/classes/HmsView.js.map +1 -1
- package/lib/commonjs/components/HMSHLSPlayer/HMSHLSPlayer.js +147 -0
- package/lib/commonjs/components/HMSHLSPlayer/HMSHLSPlayer.js.map +1 -0
- package/lib/commonjs/components/HMSHLSPlayer/RCTHMSHLSPlayer.js +12 -0
- package/lib/commonjs/components/HMSHLSPlayer/RCTHMSHLSPlayer.js.map +1 -0
- package/lib/commonjs/components/HMSHLSPlayer/hooks.js +71 -0
- package/lib/commonjs/components/HMSHLSPlayer/hooks.js.map +1 -0
- package/lib/commonjs/components/HMSHLSPlayer/index.js +63 -0
- package/lib/commonjs/components/HMSHLSPlayer/index.js.map +1 -0
- package/lib/commonjs/hooks/useHMSPeerUpdates.js +77 -0
- package/lib/commonjs/hooks/useHMSPeerUpdates.js.map +1 -0
- package/lib/commonjs/index.js +63 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/stores/hls-player-playback-slice.js +23 -0
- package/lib/commonjs/stores/hls-player-playback-slice.js.map +1 -0
- package/lib/commonjs/stores/hls-player-stats-store.js +36 -0
- package/lib/commonjs/stores/hls-player-stats-store.js.map +1 -0
- package/lib/commonjs/stores/hms-store.js +16 -0
- package/lib/commonjs/stores/hms-store.js.map +1 -0
- package/lib/commonjs/stores/types.js +6 -0
- package/lib/commonjs/stores/types.js.map +1 -0
- package/lib/commonjs/types.js +36 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/module/classes/HMSAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSBrowserRecordingState.js +2 -0
- package/lib/module/classes/HMSBrowserRecordingState.js.map +1 -1
- package/lib/module/classes/HMSCameraControl.js +1 -4
- package/lib/module/classes/HMSCameraControl.js.map +1 -1
- package/lib/module/classes/HMSEncoder.js +42 -37
- package/lib/module/classes/HMSEncoder.js.map +1 -1
- package/lib/module/classes/HMSEventEmitter.js +3 -0
- package/lib/module/classes/HMSEventEmitter.js.map +1 -0
- package/lib/module/classes/HMSLocalAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSLocalPeer.js.map +1 -1
- package/lib/module/classes/HMSLocalVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSManagerModule.js +11 -0
- package/lib/module/classes/HMSManagerModule.js.map +1 -0
- package/lib/module/classes/HMSNativeEventEmitter.js.map +1 -1
- package/lib/module/classes/HMSNativeEventListener.js +5 -0
- package/lib/module/classes/HMSNativeEventListener.js.map +1 -0
- package/lib/module/classes/HMSPeer.js +55 -20
- package/lib/module/classes/HMSPeer.js.map +1 -1
- package/lib/module/classes/HMSPeerUpdate.js +1 -1
- package/lib/module/classes/HMSPeerUpdate.js.map +1 -1
- package/lib/module/classes/HMSPeersCache.js +31 -42
- package/lib/module/classes/HMSPeersCache.js.map +1 -1
- package/lib/module/classes/HMSRTMPConfig.js.map +1 -1
- package/lib/module/classes/HMSRemoteAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSRemotePeer.js.map +1 -1
- package/lib/module/classes/HMSRemoteVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSRoom.js.map +1 -1
- package/lib/module/classes/HMSRoomCache.js +8 -4
- package/lib/module/classes/HMSRoomCache.js.map +1 -1
- package/lib/module/classes/HMSSDK.js +57 -62
- package/lib/module/classes/HMSSDK.js.map +1 -1
- package/lib/module/classes/HMSSessionStore.js +2 -4
- package/lib/module/classes/HMSSessionStore.js.map +1 -1
- package/lib/module/classes/HMSTrack.js.map +1 -1
- package/lib/module/classes/HMSVideoTrack.js.map +1 -1
- package/lib/module/classes/HmsView.js +4 -1
- package/lib/module/classes/HmsView.js.map +1 -1
- package/lib/module/components/HMSHLSPlayer/HMSHLSPlayer.js +138 -0
- package/lib/module/components/HMSHLSPlayer/HMSHLSPlayer.js.map +1 -0
- package/lib/module/components/HMSHLSPlayer/RCTHMSHLSPlayer.js +4 -0
- package/lib/module/components/HMSHLSPlayer/RCTHMSHLSPlayer.js.map +1 -0
- package/lib/module/components/HMSHLSPlayer/hooks.js +56 -0
- package/lib/module/components/HMSHLSPlayer/hooks.js.map +1 -0
- package/lib/module/components/HMSHLSPlayer/index.js +3 -0
- package/lib/module/components/HMSHLSPlayer/index.js.map +1 -0
- package/lib/module/hooks/useHMSPeerUpdates.js +67 -0
- package/lib/module/hooks/useHMSPeerUpdates.js.map +1 -0
- package/lib/module/index.js +13 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/stores/hls-player-playback-slice.js +16 -0
- package/lib/module/stores/hls-player-playback-slice.js.map +1 -0
- package/lib/module/stores/hls-player-stats-store.js +29 -0
- package/lib/module/stores/hls-player-stats-store.js.map +1 -0
- package/lib/module/stores/hms-store.js +9 -0
- package/lib/module/stores/hms-store.js.map +1 -0
- package/lib/module/stores/types.js +2 -0
- package/lib/module/stores/types.js.map +1 -0
- package/lib/module/types.js +32 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/classes/HMSAudioTrack.d.ts +2 -1
- package/lib/typescript/classes/HMSBrowserRecordingState.d.ts +2 -0
- package/lib/typescript/classes/HMSEncoder.d.ts +1 -0
- package/lib/typescript/classes/HMSEventEmitter.d.ts +2 -0
- package/lib/typescript/classes/HMSLocalAudioTrack.d.ts +2 -1
- package/lib/typescript/classes/HMSLocalPeer.d.ts +3 -3
- package/lib/typescript/classes/HMSLocalVideoTrack.d.ts +2 -1
- package/lib/typescript/classes/HMSManagerModule.d.ts +3 -0
- package/lib/typescript/classes/HMSNativeEventListener.d.ts +4 -0
- package/lib/typescript/classes/HMSPeer.d.ts +10 -5
- package/lib/typescript/classes/HMSPeersCache.d.ts +17 -2
- package/lib/typescript/classes/HMSRTMPConfig.d.ts +2 -2
- package/lib/typescript/classes/HMSRemoteAudioTrack.d.ts +2 -1
- package/lib/typescript/classes/HMSRemotePeer.d.ts +3 -3
- package/lib/typescript/classes/HMSRemoteVideoTrack.d.ts +2 -1
- package/lib/typescript/classes/HMSRoom.d.ts +1 -1
- package/lib/typescript/classes/HMSSDK.d.ts +5 -15
- package/lib/typescript/classes/HMSTrack.d.ts +3 -2
- package/lib/typescript/classes/HMSVideoTrack.d.ts +2 -1
- package/lib/typescript/classes/HmsView.d.ts +1 -1
- package/lib/typescript/components/HMSHLSPlayer/HMSHLSPlayer.d.ts +21 -0
- package/lib/typescript/components/HMSHLSPlayer/RCTHMSHLSPlayer.d.ts +19 -0
- package/lib/typescript/components/HMSHLSPlayer/hooks.d.ts +17 -0
- package/lib/typescript/components/HMSHLSPlayer/index.d.ts +2 -0
- package/lib/typescript/hooks/useHMSPeerUpdates.d.ts +7 -0
- package/lib/typescript/index.d.ts +5 -0
- package/lib/typescript/stores/hls-player-playback-slice.d.ts +5 -0
- package/lib/typescript/stores/hls-player-stats-store.d.ts +9 -0
- package/lib/typescript/stores/hms-store.d.ts +9 -0
- package/lib/typescript/stores/types.d.ts +25 -0
- package/lib/typescript/types.d.ts +63 -0
- package/package.json +4 -1
- package/react-native-hms.podspec +1 -0
- package/sdk-versions.json +3 -2
- package/src/classes/HMSAudioTrack.ts +2 -1
- package/src/classes/HMSBrowserRecordingState.ts +3 -0
- package/src/classes/HMSCameraControl.ts +1 -2
- package/src/classes/HMSEncoder.ts +18 -8
- package/src/classes/HMSEventEmitter.ts +3 -0
- package/src/classes/HMSLocalAudioTrack.ts +2 -1
- package/src/classes/HMSLocalPeer.ts +3 -3
- package/src/classes/HMSLocalVideoTrack.ts +2 -1
- package/src/classes/HMSManagerModule.ts +18 -0
- package/src/classes/HMSNativeEventEmitter.ts +2 -1
- package/src/classes/HMSNativeEventListener.ts +8 -0
- package/src/classes/HMSPeer.ts +96 -48
- package/src/classes/HMSPeerUpdate.ts +4 -4
- package/src/classes/HMSPeersCache.ts +55 -43
- package/src/classes/HMSRTMPConfig.ts +2 -2
- package/src/classes/HMSRemoteAudioTrack.ts +2 -1
- package/src/classes/HMSRemotePeer.ts +3 -3
- package/src/classes/HMSRemoteVideoTrack.ts +2 -1
- package/src/classes/HMSRoom.ts +1 -1
- package/src/classes/HMSRoomCache.ts +11 -3
- package/src/classes/HMSSDK.tsx +74 -73
- package/src/classes/HMSSessionStore.ts +6 -8
- package/src/classes/HMSTrack.ts +3 -2
- package/src/classes/HMSVideoTrack.ts +2 -1
- package/src/classes/HmsView.tsx +8 -2
- package/src/components/HMSHLSPlayer/HMSHLSPlayer.tsx +261 -0
- package/src/components/HMSHLSPlayer/RCTHMSHLSPlayer.ts +37 -0
- package/src/components/HMSHLSPlayer/hooks.ts +101 -0
- package/src/components/HMSHLSPlayer/index.ts +9 -0
- package/src/hooks/useHMSPeerUpdates.ts +85 -0
- package/src/index.ts +14 -0
- package/src/stores/hls-player-playback-slice.ts +25 -0
- package/src/stores/hls-player-stats-store.ts +37 -0
- package/src/stores/hms-store.ts +11 -0
- package/src/stores/types.ts +49 -0
- package/src/types.ts +119 -0
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.idea/compiler.xml +0 -6
- package/android/.idea/gradle.xml +0 -18
- package/android/.idea/jarRepositories.xml +0 -50
- package/android/.idea/libraries/Gradle__androidx_activity_activity_1_2_4_aar.xml +0 -16
- package/android/.idea/libraries/Gradle__androidx_annotation_annotation_1_3_0.xml +0 -11
- package/android/.idea/libraries/Gradle__androidx_annotation_annotation_experimental_1_1_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_4_1_aar.xml +0 -16
- package/android/.idea/libraries/Gradle__androidx_appcompat_appcompat_resources_1_4_1_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_arch_core_core_common_2_1_0.xml +0 -11
- package/android/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_1_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_autofill_autofill_1_1_0_aar.xml +0 -16
- package/android/.idea/libraries/Gradle__androidx_collection_collection_1_1_0.xml +0 -11
- package/android/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_2_1_3_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_core_core_1_7_0_aar.xml +0 -16
- package/android/.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_customview_customview_1_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml +0 -16
- package/android/.idea/libraries/Gradle__androidx_fragment_fragment_1_3_6_aar.xml +0 -16
- package/android/.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_4_0.xml +0 -11
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_3_1_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_4_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_3_1_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_savedstate_2_3_1_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_savedstate_savedstate_1_1_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml +0 -16
- package/android/.idea/libraries/Gradle__androidx_tracing_tracing_1_1_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_1_1_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml +0 -13
- package/android/.idea/libraries/Gradle__com_facebook_fbjni_fbjni_0_3_0_aar.xml +0 -14
- package/android/.idea/libraries/Gradle__com_facebook_fresco_drawee_2_5_0_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_facebook_fresco_fbcore_2_5_0_aar.xml +0 -18
- package/android/.idea/libraries/Gradle__com_facebook_fresco_fresco_2_5_0_aar.xml +0 -18
- package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_2_5_0_aar.xml +0 -18
- package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_base_2_5_0_aar.xml +0 -18
- package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_native_2_5_0_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_facebook_fresco_imagepipeline_okhttp3_2_5_0_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_facebook_fresco_memory_type_ashmem_2_5_0_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_facebook_fresco_memory_type_java_2_5_0_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_facebook_fresco_memory_type_native_2_5_0_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_facebook_fresco_nativeimagefilters_2_5_0_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_facebook_fresco_nativeimagetranscoder_2_5_0_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_facebook_fresco_ui_common_2_5_0_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_facebook_infer_annotation_infer_annotation_0_18_0.xml +0 -13
- package/android/.idea/libraries/Gradle__com_facebook_react_react_native_0_71_0_rc_0_debug_aar.xml +0 -14
- package/android/.idea/libraries/Gradle__com_facebook_soloader_annotation_0_10_4.xml +0 -13
- package/android/.idea/libraries/Gradle__com_facebook_soloader_nativeloader_0_10_4.xml +0 -13
- package/android/.idea/libraries/Gradle__com_facebook_soloader_soloader_0_10_4_aar.xml +0 -14
- package/android/.idea/libraries/Gradle__com_facebook_yoga_proguard_annotations_1_19_0.xml +0 -13
- package/android/.idea/libraries/Gradle__com_github_100mslive_android_sdk_lib_2_5_1_aar.xml +0 -10
- package/android/.idea/libraries/Gradle__com_github_100mslive_webrtc_m104_hms_1_3_aar.xml +0 -10
- package/android/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_3_0_2.xml +0 -13
- package/android/.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_4_9_2.xml +0 -13
- package/android/.idea/libraries/Gradle__com_squareup_okhttp3_okhttp_urlconnection_4_9_2.xml +0 -13
- package/android/.idea/libraries/Gradle__com_squareup_okio_okio_2_9_0.xml +0 -13
- package/android/.idea/libraries/Gradle__javax_inject_javax_inject_1.xml +0 -13
- package/android/.idea/libraries/Gradle__org_jetbrains_annotations_13_0.xml +0 -13
- package/android/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_annotations_jvm_1_3_72.xml +0 -13
- package/android/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_6_10.xml +0 -13
- package/android/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_common_1_6_10.xml +0 -13
- package/android/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jdk7_1_6_10.xml +0 -13
- package/android/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jdk8_1_6_10.xml +0 -13
- package/android/.idea/libraries/Gradle__org_jetbrains_kotlinx_kotlinx_coroutines_android_1_6_0.xml +0 -13
- package/android/.idea/libraries/Gradle__org_jetbrains_kotlinx_kotlinx_coroutines_core_jvm_1_6_0.xml +0 -13
- package/android/.idea/misc.xml +0 -9
- package/android/.idea/modules/android.androidTest.iml +0 -203
- package/android/.idea/modules/android.iml +0 -40
- package/android/.idea/modules/android.main.iml +0 -199
- package/android/.idea/modules/android.unitTest.iml +0 -197
- package/android/.idea/modules.xml +0 -11
- package/android/.idea/sonarlint/issuestore/3/c/3c46088b6add3088181589d8ed726652742b6221 +0 -5
- package/android/.idea/sonarlint/issuestore/index.pb +0 -7
- package/android/.idea/vcs.xml +0 -6
- package/android/local.properties +0 -8
- package/ios/Hmssdk.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/ios/Hmssdk.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/Hmssdk.xcodeproj/project.xcworkspace/xcuserdata/yogesh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/Hmssdk.xcodeproj/xcuserdata/yogesh.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
- /package/android/{.idea/sonarlint/issuestore/a/8/a8c9f5ddd88723818e51ae3cf8693d02355a8691 → .gradle/6.7.1/gc.properties} +0 -0
- /package/android/{.idea/sonarlint/issuestore/f/0/f07866736216be0ee2aba49e392191aeae700a35 → .gradle/configuration-cache/gc.properties} +0 -0
|
@@ -12,9 +12,10 @@ var _HMSLogger = require("./HMSLogger");
|
|
|
12
12
|
var _HMSTrackType = require("./HMSTrackType");
|
|
13
13
|
var _HMSUpdateListenerActions = require("./HMSUpdateListenerActions");
|
|
14
14
|
var _HmsView = require("./HmsView");
|
|
15
|
+
var _HMSManagerModule = _interopRequireDefault(require("./HMSManagerModule"));
|
|
15
16
|
var _HMSMessageType = require("./HMSMessageType");
|
|
16
17
|
var _HMSPIPListenerActions = require("./HMSPIPListenerActions");
|
|
17
|
-
var
|
|
18
|
+
var _HMSNativeEventListener = _interopRequireDefault(require("./HMSNativeEventListener"));
|
|
18
19
|
var _HMSPeersCache = require("./HMSPeersCache");
|
|
19
20
|
var _HMSRoomCache = require("./HMSRoomCache");
|
|
20
21
|
var _HMSPeerUpdate = require("./HMSPeerUpdate");
|
|
@@ -25,14 +26,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
|
|
|
25
26
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
26
27
|
// TODO: Rename to HMSPIPConfig & to be moved to a separate file
|
|
27
28
|
|
|
28
|
-
const {
|
|
29
|
-
/**
|
|
30
|
-
* @ignore
|
|
31
|
-
*/
|
|
32
|
-
HMSManager
|
|
33
|
-
} = _reactNative.NativeModules;
|
|
34
29
|
const ReactNativeVersion = require('react-native/Libraries/Core/ReactNativeVersion');
|
|
35
|
-
const HmsEventEmitter = new _HMSNativeEventEmitter.HMSNativeEventEmitter(HMSManager);
|
|
36
30
|
let HmsSdk;
|
|
37
31
|
class HMSSDK {
|
|
38
32
|
constructor(id) {
|
|
@@ -74,7 +68,7 @@ class HMSSDK {
|
|
|
74
68
|
(0, _HMSPeersCache.clearHmsPeersCache)();
|
|
75
69
|
(0, _HMSRoomCache.clearHmsRoomCache)();
|
|
76
70
|
this.removeAllListeners();
|
|
77
|
-
return await
|
|
71
|
+
return await _HMSManagerModule.default.destroy({
|
|
78
72
|
id: this.id
|
|
79
73
|
});
|
|
80
74
|
});
|
|
@@ -92,7 +86,7 @@ class HMSSDK {
|
|
|
92
86
|
userId,
|
|
93
87
|
endpoint
|
|
94
88
|
});
|
|
95
|
-
return
|
|
89
|
+
return _HMSManagerModule.default.getAuthTokenByRoomCode({
|
|
96
90
|
id: this.id,
|
|
97
91
|
roomCode,
|
|
98
92
|
userId,
|
|
@@ -116,7 +110,7 @@ class HMSSDK {
|
|
|
116
110
|
this.addAppStateListener();
|
|
117
111
|
(0, _HMSPeersCache.setHmsPeersCache)(new _HMSPeersCache.HMSPeersCache(this.id));
|
|
118
112
|
(0, _HMSRoomCache.setHmsRoomCache)(new _HMSRoomCache.HMSRoomCache(this.id));
|
|
119
|
-
await
|
|
113
|
+
await _HMSManagerModule.default.join({
|
|
120
114
|
...config,
|
|
121
115
|
id: this.id
|
|
122
116
|
});
|
|
@@ -135,7 +129,7 @@ class HMSSDK {
|
|
|
135
129
|
config,
|
|
136
130
|
id: this.id
|
|
137
131
|
});
|
|
138
|
-
|
|
132
|
+
_HMSManagerModule.default.preview({
|
|
139
133
|
...config,
|
|
140
134
|
id: this.id
|
|
141
135
|
});
|
|
@@ -157,7 +151,7 @@ class HMSSDK {
|
|
|
157
151
|
id: this.id
|
|
158
152
|
});
|
|
159
153
|
if (_reactNative.Platform.OS === 'ios') {
|
|
160
|
-
return await
|
|
154
|
+
return await _HMSManagerModule.default.previewForRole({
|
|
161
155
|
role: role === null || role === void 0 ? void 0 : role.name,
|
|
162
156
|
id: this.id
|
|
163
157
|
});
|
|
@@ -201,7 +195,7 @@ class HMSSDK {
|
|
|
201
195
|
_defineProperty(this, "roomLeaveCleanup", () => {
|
|
202
196
|
var _this$appStateSubscri;
|
|
203
197
|
this.muteStatus = undefined;
|
|
204
|
-
this === null || this === void 0
|
|
198
|
+
this === null || this === void 0 || (_this$appStateSubscri = this.appStateSubscription) === null || _this$appStateSubscri === void 0 ? void 0 : _this$appStateSubscri.remove();
|
|
205
199
|
(0, _HMSPeersCache.clearHmsPeersCache)();
|
|
206
200
|
(0, _HMSRoomCache.clearHmsRoomCache)();
|
|
207
201
|
_HMSEncoder.HMSEncoder.clearData(); // Clearing cached data in encoder
|
|
@@ -220,7 +214,7 @@ class HMSSDK {
|
|
|
220
214
|
const data = {
|
|
221
215
|
id: this.id
|
|
222
216
|
};
|
|
223
|
-
const op = await
|
|
217
|
+
const op = await _HMSManagerModule.default.leave(data);
|
|
224
218
|
this.roomLeaveCleanup();
|
|
225
219
|
return op;
|
|
226
220
|
});
|
|
@@ -239,7 +233,7 @@ class HMSSDK {
|
|
|
239
233
|
type: type || null,
|
|
240
234
|
id: _this.id
|
|
241
235
|
});
|
|
242
|
-
const data = await
|
|
236
|
+
const data = await _HMSManagerModule.default.sendBroadcastMessage({
|
|
243
237
|
message,
|
|
244
238
|
type: type || null,
|
|
245
239
|
id: _this.id
|
|
@@ -262,7 +256,7 @@ class HMSSDK {
|
|
|
262
256
|
id: _this.id,
|
|
263
257
|
type: type || null
|
|
264
258
|
});
|
|
265
|
-
const data = await
|
|
259
|
+
const data = await _HMSManagerModule.default.sendGroupMessage({
|
|
266
260
|
message,
|
|
267
261
|
roles: _HMSHelper.HMSHelper.getRoleNames(roles),
|
|
268
262
|
id: _this.id,
|
|
@@ -286,7 +280,7 @@ class HMSSDK {
|
|
|
286
280
|
id: _this.id,
|
|
287
281
|
type: type || null
|
|
288
282
|
});
|
|
289
|
-
const data = await
|
|
283
|
+
const data = await _HMSManagerModule.default.sendDirectMessage({
|
|
290
284
|
message,
|
|
291
285
|
peerId: peer.peerID,
|
|
292
286
|
id: _this.id,
|
|
@@ -311,7 +305,7 @@ class HMSSDK {
|
|
|
311
305
|
metadata,
|
|
312
306
|
id: this.id
|
|
313
307
|
});
|
|
314
|
-
return await
|
|
308
|
+
return await _HMSManagerModule.default.changeMetadata({
|
|
315
309
|
metadata,
|
|
316
310
|
id: this.id
|
|
317
311
|
});
|
|
@@ -330,7 +324,7 @@ class HMSSDK {
|
|
|
330
324
|
...data,
|
|
331
325
|
id: this.id
|
|
332
326
|
});
|
|
333
|
-
const op = await
|
|
327
|
+
const op = await _HMSManagerModule.default.startRTMPOrRecording({
|
|
334
328
|
...data,
|
|
335
329
|
id: this.id
|
|
336
330
|
});
|
|
@@ -346,7 +340,7 @@ class HMSSDK {
|
|
|
346
340
|
*/
|
|
347
341
|
_defineProperty(this, "stopRtmpAndRecording", async () => {
|
|
348
342
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function stopRtmpAndRecording', {});
|
|
349
|
-
const op = await
|
|
343
|
+
const op = await _HMSManagerModule.default.stopRtmpAndRecording({
|
|
350
344
|
id: this.id
|
|
351
345
|
});
|
|
352
346
|
return op;
|
|
@@ -365,7 +359,7 @@ class HMSSDK {
|
|
|
365
359
|
...data,
|
|
366
360
|
id: this.id
|
|
367
361
|
});
|
|
368
|
-
return await
|
|
362
|
+
return await _HMSManagerModule.default.startHLSStreaming({
|
|
369
363
|
...data,
|
|
370
364
|
id: this.id
|
|
371
365
|
});
|
|
@@ -380,7 +374,7 @@ class HMSSDK {
|
|
|
380
374
|
*/
|
|
381
375
|
_defineProperty(this, "stopHLSStreaming", async () => {
|
|
382
376
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function stopHLSStreaming', {});
|
|
383
|
-
return await
|
|
377
|
+
return await _HMSManagerModule.default.stopHLSStreaming({
|
|
384
378
|
id: this.id
|
|
385
379
|
});
|
|
386
380
|
});
|
|
@@ -409,7 +403,7 @@ class HMSSDK {
|
|
|
409
403
|
id: _this.id
|
|
410
404
|
};
|
|
411
405
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function changeRole', data);
|
|
412
|
-
return await
|
|
406
|
+
return await _HMSManagerModule.default.changeRole(data);
|
|
413
407
|
});
|
|
414
408
|
/**
|
|
415
409
|
* - This function can be used in a situation when we want to change role hence manipulate their
|
|
@@ -434,7 +428,7 @@ class HMSSDK {
|
|
|
434
428
|
id: _this.id
|
|
435
429
|
};
|
|
436
430
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function changeRoleOfPeer', data);
|
|
437
|
-
return
|
|
431
|
+
return _HMSManagerModule.default.changeRoleOfPeer(data);
|
|
438
432
|
});
|
|
439
433
|
/**
|
|
440
434
|
* - This function can be used in a situation when we want to change role of multiple peers by specifying their roles.
|
|
@@ -456,7 +450,7 @@ class HMSSDK {
|
|
|
456
450
|
id: this.id
|
|
457
451
|
};
|
|
458
452
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function changeRoleOfPeersWithRoles', data);
|
|
459
|
-
return
|
|
453
|
+
return _HMSManagerModule.default.changeRoleOfPeersWithRoles(data);
|
|
460
454
|
});
|
|
461
455
|
/**
|
|
462
456
|
* - This function can be used to manipulate mute status of any track.
|
|
@@ -478,7 +472,7 @@ class HMSSDK {
|
|
|
478
472
|
mute,
|
|
479
473
|
id: this.id
|
|
480
474
|
};
|
|
481
|
-
return await
|
|
475
|
+
return await _HMSManagerModule.default.changeTrackState(data);
|
|
482
476
|
});
|
|
483
477
|
/**
|
|
484
478
|
* - changeTrackStateForRoles is an enhancement on the functionality of {@link changeTrackState}.
|
|
@@ -507,7 +501,7 @@ class HMSSDK {
|
|
|
507
501
|
roles: roleNames,
|
|
508
502
|
id: this.id
|
|
509
503
|
};
|
|
510
|
-
return await
|
|
504
|
+
return await _HMSManagerModule.default.changeTrackStateForRoles(data);
|
|
511
505
|
});
|
|
512
506
|
/**
|
|
513
507
|
* - removePeer can forcefully disconnect a Peer from the room.
|
|
@@ -528,7 +522,7 @@ class HMSSDK {
|
|
|
528
522
|
reason,
|
|
529
523
|
id: this.id
|
|
530
524
|
};
|
|
531
|
-
return await
|
|
525
|
+
return await _HMSManagerModule.default.removePeer(data);
|
|
532
526
|
});
|
|
533
527
|
/**
|
|
534
528
|
* - endRoom can be used in a situation where we want to disconnect all the peers from current room
|
|
@@ -551,7 +545,7 @@ class HMSSDK {
|
|
|
551
545
|
reason,
|
|
552
546
|
id: _this.id
|
|
553
547
|
};
|
|
554
|
-
return await
|
|
548
|
+
return await _HMSManagerModule.default.endRoom(data);
|
|
555
549
|
});
|
|
556
550
|
/**
|
|
557
551
|
* - This function can be used to change name of localPeer.
|
|
@@ -569,7 +563,7 @@ class HMSSDK {
|
|
|
569
563
|
name,
|
|
570
564
|
id: this.id
|
|
571
565
|
};
|
|
572
|
-
return await
|
|
566
|
+
return await _HMSManagerModule.default.changeName(data);
|
|
573
567
|
});
|
|
574
568
|
/**
|
|
575
569
|
* - Calling this function will accept the most recent roleChange request made by anyone in the room
|
|
@@ -582,7 +576,7 @@ class HMSSDK {
|
|
|
582
576
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function acceptRoleChange', {
|
|
583
577
|
id: this.id
|
|
584
578
|
});
|
|
585
|
-
return await
|
|
579
|
+
return await _HMSManagerModule.default.acceptRoleChange({
|
|
586
580
|
id: this.id
|
|
587
581
|
});
|
|
588
582
|
});
|
|
@@ -600,7 +594,7 @@ class HMSSDK {
|
|
|
600
594
|
id: this.id
|
|
601
595
|
});
|
|
602
596
|
this.muteStatus = mute;
|
|
603
|
-
|
|
597
|
+
_HMSManagerModule.default.setPlaybackForAllAudio({
|
|
604
598
|
mute,
|
|
605
599
|
id: this.id
|
|
606
600
|
});
|
|
@@ -614,7 +608,7 @@ class HMSSDK {
|
|
|
614
608
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function remoteMuteAllAudio', {
|
|
615
609
|
id: this.id
|
|
616
610
|
});
|
|
617
|
-
return await
|
|
611
|
+
return await _HMSManagerModule.default.remoteMuteAllAudio({
|
|
618
612
|
id: this.id
|
|
619
613
|
});
|
|
620
614
|
});
|
|
@@ -632,7 +626,7 @@ class HMSSDK {
|
|
|
632
626
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function getRoom', {
|
|
633
627
|
id: this.id
|
|
634
628
|
});
|
|
635
|
-
const hmsRoom = await
|
|
629
|
+
const hmsRoom = await _HMSManagerModule.default.getRoom({
|
|
636
630
|
id: this.id
|
|
637
631
|
});
|
|
638
632
|
(_getHmsRoomCache = (0, _HMSRoomCache.getHmsRoomCache)()) === null || _getHmsRoomCache === void 0 ? void 0 : _getHmsRoomCache.updateRoomCache(hmsRoom);
|
|
@@ -650,7 +644,7 @@ class HMSSDK {
|
|
|
650
644
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function getLocalPeer', {
|
|
651
645
|
id: this.id
|
|
652
646
|
});
|
|
653
|
-
const localPeer = await
|
|
647
|
+
const localPeer = await _HMSManagerModule.default.getLocalPeer({
|
|
654
648
|
id: this.id
|
|
655
649
|
});
|
|
656
650
|
const encodedLocalPeer = _HMSEncoder.HMSEncoder.encodeHmsLocalPeer(localPeer, this.id);
|
|
@@ -667,7 +661,7 @@ class HMSSDK {
|
|
|
667
661
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function getRemotePeers', {
|
|
668
662
|
id: this.id
|
|
669
663
|
});
|
|
670
|
-
const remotePeers = await
|
|
664
|
+
const remotePeers = await _HMSManagerModule.default.getRemotePeers({
|
|
671
665
|
id: this.id
|
|
672
666
|
});
|
|
673
667
|
const encodedRemotePeers = _HMSEncoder.HMSEncoder.encodeHmsRemotePeers(remotePeers, this.id);
|
|
@@ -684,7 +678,7 @@ class HMSSDK {
|
|
|
684
678
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function getRoles', {
|
|
685
679
|
id: this.id
|
|
686
680
|
});
|
|
687
|
-
const roles = await
|
|
681
|
+
const roles = await _HMSManagerModule.default.getRoles({
|
|
688
682
|
id: this.id
|
|
689
683
|
});
|
|
690
684
|
const encodedRoles = _HMSEncoder.HMSEncoder.encodeHmsRoles(roles);
|
|
@@ -703,7 +697,7 @@ class HMSSDK {
|
|
|
703
697
|
volume,
|
|
704
698
|
id: this.id
|
|
705
699
|
});
|
|
706
|
-
|
|
700
|
+
_HMSManagerModule.default.setVolume({
|
|
707
701
|
id: this.id,
|
|
708
702
|
trackId: track.trackId,
|
|
709
703
|
volume
|
|
@@ -713,7 +707,7 @@ class HMSSDK {
|
|
|
713
707
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function resetVolume', {
|
|
714
708
|
id: this.id
|
|
715
709
|
});
|
|
716
|
-
if (_reactNative.Platform.OS === 'android')
|
|
710
|
+
if (_reactNative.Platform.OS === 'android') _HMSManagerModule.default.resetVolume({
|
|
717
711
|
id: this.id
|
|
718
712
|
});
|
|
719
713
|
});
|
|
@@ -745,7 +739,7 @@ class HMSSDK {
|
|
|
745
739
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function startScreenshare', {
|
|
746
740
|
id: this.id
|
|
747
741
|
});
|
|
748
|
-
return await
|
|
742
|
+
return await _HMSManagerModule.default.startScreenshare({
|
|
749
743
|
id: this.id
|
|
750
744
|
});
|
|
751
745
|
});
|
|
@@ -760,7 +754,7 @@ class HMSSDK {
|
|
|
760
754
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function isScreenShared', {
|
|
761
755
|
id: this.id
|
|
762
756
|
});
|
|
763
|
-
return await
|
|
757
|
+
return await _HMSManagerModule.default.isScreenShared({
|
|
764
758
|
id: this.id
|
|
765
759
|
});
|
|
766
760
|
});
|
|
@@ -775,7 +769,7 @@ class HMSSDK {
|
|
|
775
769
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function stopScreenshare', {
|
|
776
770
|
id: this.id
|
|
777
771
|
});
|
|
778
|
-
return await
|
|
772
|
+
return await _HMSManagerModule.default.stopScreenshare({
|
|
779
773
|
id: this.id
|
|
780
774
|
});
|
|
781
775
|
});
|
|
@@ -783,7 +777,7 @@ class HMSSDK {
|
|
|
783
777
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function enableNetworkQualityUpdates', {
|
|
784
778
|
id: this.id
|
|
785
779
|
});
|
|
786
|
-
|
|
780
|
+
_HMSManagerModule.default.enableNetworkQualityUpdates({
|
|
787
781
|
id: this.id
|
|
788
782
|
});
|
|
789
783
|
});
|
|
@@ -791,7 +785,7 @@ class HMSSDK {
|
|
|
791
785
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function disableNetworkQualityUpdates', {
|
|
792
786
|
id: this.id
|
|
793
787
|
});
|
|
794
|
-
|
|
788
|
+
_HMSManagerModule.default.disableNetworkQualityUpdates({
|
|
795
789
|
id: this.id
|
|
796
790
|
});
|
|
797
791
|
});
|
|
@@ -809,7 +803,7 @@ class HMSSDK {
|
|
|
809
803
|
audioMixingMode
|
|
810
804
|
});
|
|
811
805
|
if (_reactNative.Platform.OS === 'android') {
|
|
812
|
-
return await
|
|
806
|
+
return await _HMSManagerModule.default.startAudioshare({
|
|
813
807
|
id: this.id,
|
|
814
808
|
audioMixingMode
|
|
815
809
|
});
|
|
@@ -830,7 +824,7 @@ class HMSSDK {
|
|
|
830
824
|
id: this.id
|
|
831
825
|
});
|
|
832
826
|
if (_reactNative.Platform.OS === 'android') {
|
|
833
|
-
return await
|
|
827
|
+
return await _HMSManagerModule.default.isAudioShared({
|
|
834
828
|
id: this.id
|
|
835
829
|
});
|
|
836
830
|
} else {
|
|
@@ -850,7 +844,7 @@ class HMSSDK {
|
|
|
850
844
|
id: this.id
|
|
851
845
|
});
|
|
852
846
|
if (_reactNative.Platform.OS === 'android') {
|
|
853
|
-
return await
|
|
847
|
+
return await _HMSManagerModule.default.stopAudioshare({
|
|
854
848
|
id: this.id
|
|
855
849
|
});
|
|
856
850
|
} else {
|
|
@@ -869,7 +863,7 @@ class HMSSDK {
|
|
|
869
863
|
id: this.id
|
|
870
864
|
});
|
|
871
865
|
if (_reactNative.Platform.OS === 'android') {
|
|
872
|
-
return await
|
|
866
|
+
return await _HMSManagerModule.default.getAudioMixingMode({
|
|
873
867
|
id: this.id
|
|
874
868
|
});
|
|
875
869
|
} else {
|
|
@@ -891,7 +885,7 @@ class HMSSDK {
|
|
|
891
885
|
audioMixingMode
|
|
892
886
|
});
|
|
893
887
|
if (_reactNative.Platform.OS === 'android') {
|
|
894
|
-
return await
|
|
888
|
+
return await _HMSManagerModule.default.setAudioMixingMode({
|
|
895
889
|
id: this.id,
|
|
896
890
|
audioMixingMode
|
|
897
891
|
});
|
|
@@ -914,7 +908,7 @@ class HMSSDK {
|
|
|
914
908
|
id: this.id
|
|
915
909
|
});
|
|
916
910
|
if (_reactNative.Platform.OS === 'android') {
|
|
917
|
-
return await
|
|
911
|
+
return await _HMSManagerModule.default.getAudioDevicesList({
|
|
918
912
|
id: this.id
|
|
919
913
|
});
|
|
920
914
|
} else {
|
|
@@ -936,7 +930,7 @@ class HMSSDK {
|
|
|
936
930
|
id: this.id
|
|
937
931
|
});
|
|
938
932
|
if (_reactNative.Platform.OS === 'android') {
|
|
939
|
-
return await
|
|
933
|
+
return await _HMSManagerModule.default.getAudioOutputRouteType({
|
|
940
934
|
id: this.id
|
|
941
935
|
});
|
|
942
936
|
} else {
|
|
@@ -945,6 +939,7 @@ class HMSSDK {
|
|
|
945
939
|
}
|
|
946
940
|
});
|
|
947
941
|
/**
|
|
942
|
+
* Android Only
|
|
948
943
|
* - This wrapper function used to switch output to device other than the default, currently available only for android.
|
|
949
944
|
*
|
|
950
945
|
* checkout {@link https://www.100ms.live/docs/react-native/v2/features/audio-output-routing#switch-audio-focus-to-another-device} for more info
|
|
@@ -958,7 +953,7 @@ class HMSSDK {
|
|
|
958
953
|
audioDevice
|
|
959
954
|
});
|
|
960
955
|
if (_reactNative.Platform.OS === 'android') {
|
|
961
|
-
return
|
|
956
|
+
return _HMSManagerModule.default.switchAudioOutput({
|
|
962
957
|
id: this.id,
|
|
963
958
|
audioDevice
|
|
964
959
|
});
|
|
@@ -967,6 +962,17 @@ class HMSSDK {
|
|
|
967
962
|
return 'API currently not available for iOS';
|
|
968
963
|
}
|
|
969
964
|
});
|
|
965
|
+
_defineProperty(this, "switchAudioOutputUsingIOSUI", () => {
|
|
966
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function switchAudioOutputUsingIOSUI', {
|
|
967
|
+
id: this.id
|
|
968
|
+
});
|
|
969
|
+
if (_reactNative.Platform.OS !== 'ios') {
|
|
970
|
+
throw new Error('#Function `switchAudioOutputUsingIOSUI` is only available on iOS, use `switchAudioOutput` method instead!');
|
|
971
|
+
}
|
|
972
|
+
return _HMSManagerModule.default.switchAudioOutputUsingIOSUI({
|
|
973
|
+
id: this.id
|
|
974
|
+
});
|
|
975
|
+
});
|
|
970
976
|
/**
|
|
971
977
|
* - This wrapper function used to change Audio Mode manually, currently available only for android.
|
|
972
978
|
*
|
|
@@ -981,7 +987,7 @@ class HMSSDK {
|
|
|
981
987
|
audioMode
|
|
982
988
|
});
|
|
983
989
|
if (_reactNative.Platform.OS === 'android') {
|
|
984
|
-
return
|
|
990
|
+
return _HMSManagerModule.default.setAudioMode({
|
|
985
991
|
id: this.id,
|
|
986
992
|
audioMode
|
|
987
993
|
});
|
|
@@ -1004,7 +1010,7 @@ class HMSSDK {
|
|
|
1004
1010
|
});
|
|
1005
1011
|
if (_reactNative.Platform.OS === 'android') {
|
|
1006
1012
|
this.addEventListener(_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_AUDIO_DEVICE_CHANGED, callback);
|
|
1007
|
-
return
|
|
1013
|
+
return _HMSManagerModule.default.setAudioDeviceChangeListener({
|
|
1008
1014
|
id: this.id
|
|
1009
1015
|
});
|
|
1010
1016
|
} else {
|
|
@@ -1012,42 +1018,12 @@ class HMSSDK {
|
|
|
1012
1018
|
return 'API currently not available for iOS';
|
|
1013
1019
|
}
|
|
1014
1020
|
});
|
|
1015
|
-
/**
|
|
1016
|
-
* @deprecated Older SessionMetaData APIs has been deprecated in favour of newer Session Store APIs.
|
|
1017
|
-
* You can subscribe to `ON_SESSION_STORE_AVAILABLE` event to get notified when the `HMSSessionStore`
|
|
1018
|
-
* is available and use `set` method on `HMSSessionStore` instance
|
|
1019
|
-
* checkout {@link https://www.100ms.live/docs/react-native/v2/how-to-guides/}
|
|
1020
|
-
*/
|
|
1021
|
-
_defineProperty(this, "setSessionMetaData", async sessionMetaData => {
|
|
1022
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function setSessionMetaData', {
|
|
1023
|
-
id: this.id,
|
|
1024
|
-
sessionMetaData
|
|
1025
|
-
});
|
|
1026
|
-
return await HMSManager.setSessionMetaData({
|
|
1027
|
-
id: this.id,
|
|
1028
|
-
sessionMetaData
|
|
1029
|
-
});
|
|
1030
|
-
});
|
|
1031
|
-
/**
|
|
1032
|
-
* @deprecated Older SessionMetaData APIs has been deprecated in favour of newer Session Store APIs.
|
|
1033
|
-
* You can subscribe to `ON_SESSION_STORE_AVAILABLE` event to get notified when the `HMSSessionStore`
|
|
1034
|
-
* is available and use `get` or `addKeyChangeListener` method on `HMSSessionStore` instance
|
|
1035
|
-
* checkout {@link https://www.100ms.live/docs/react-native/v2/how-to-guides/}
|
|
1036
|
-
*/
|
|
1037
|
-
_defineProperty(this, "getSessionMetaData", async () => {
|
|
1038
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function getSessionMetaData', {
|
|
1039
|
-
id: this.id
|
|
1040
|
-
});
|
|
1041
|
-
return await HMSManager.getSessionMetaData({
|
|
1042
|
-
id: this.id
|
|
1043
|
-
});
|
|
1044
|
-
});
|
|
1045
1021
|
_defineProperty(this, "getRemoteVideoTrackFromTrackId", async trackId => {
|
|
1046
1022
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function getRemoteVideoTrackFromTrackId', {
|
|
1047
1023
|
id: this.id,
|
|
1048
1024
|
trackId
|
|
1049
1025
|
});
|
|
1050
|
-
const remoteVideoTrackData = await
|
|
1026
|
+
const remoteVideoTrackData = await _HMSManagerModule.default.getRemoteVideoTrackFromTrackId({
|
|
1051
1027
|
id: this.id,
|
|
1052
1028
|
trackId
|
|
1053
1029
|
});
|
|
@@ -1058,12 +1034,30 @@ class HMSSDK {
|
|
|
1058
1034
|
id: this.id,
|
|
1059
1035
|
trackId
|
|
1060
1036
|
});
|
|
1061
|
-
const remoteAudioTrackData = await
|
|
1037
|
+
const remoteAudioTrackData = await _HMSManagerModule.default.getRemoteAudioTrackFromTrackId({
|
|
1062
1038
|
id: this.id,
|
|
1063
1039
|
trackId
|
|
1064
1040
|
});
|
|
1065
1041
|
return _HMSEncoder.HMSEncoder.encodeHmsRemoteAudioTrack(remoteAudioTrackData, this.id);
|
|
1066
1042
|
});
|
|
1043
|
+
_defineProperty(this, "getPeerFromPeerId", peerId => {
|
|
1044
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function getPeerFromPeerId', {
|
|
1045
|
+
id: this.id,
|
|
1046
|
+
peerId
|
|
1047
|
+
});
|
|
1048
|
+
// Getting Peer Cache
|
|
1049
|
+
const peersCache = (0, _HMSPeersCache.getHmsPeersCache)();
|
|
1050
|
+
|
|
1051
|
+
// If Peer Cache doesn't exist, return `undefined` as we don't have Peer
|
|
1052
|
+
if (!peersCache) return;
|
|
1053
|
+
const peerRole = peersCache.getProperty(peerId, 'role');
|
|
1054
|
+
|
|
1055
|
+
// If Peer doesn't have valid Role, return `undefined` as we don't have Peer
|
|
1056
|
+
if (!peerRole) return;
|
|
1057
|
+
return _HMSEncoder.HMSEncoder.encodeHmsPeer({
|
|
1058
|
+
peerID: peerId
|
|
1059
|
+
});
|
|
1060
|
+
});
|
|
1067
1061
|
/**
|
|
1068
1062
|
* - This is a prototype event listener that takes action and listens for updates related to that particular action
|
|
1069
1063
|
*
|
|
@@ -1082,7 +1076,7 @@ class HMSSDK {
|
|
|
1082
1076
|
// Checking if we already have ON_PREVIEW subscription
|
|
1083
1077
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PREVIEW]) {
|
|
1084
1078
|
// Adding ON_PREVIEW native listener
|
|
1085
|
-
const previewSubscription =
|
|
1079
|
+
const previewSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PREVIEW, this.onPreviewListener);
|
|
1086
1080
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PREVIEW] = previewSubscription;
|
|
1087
1081
|
}
|
|
1088
1082
|
// Adding App Delegate listener
|
|
@@ -1094,7 +1088,7 @@ class HMSSDK {
|
|
|
1094
1088
|
// Checking if we already have ON_JOIN subscription
|
|
1095
1089
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_JOIN]) {
|
|
1096
1090
|
// Adding ON_JOIN native listener
|
|
1097
|
-
const joinSubscription =
|
|
1091
|
+
const joinSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_JOIN, this.onJoinListener);
|
|
1098
1092
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_JOIN] = joinSubscription;
|
|
1099
1093
|
}
|
|
1100
1094
|
// Adding App Delegate listener
|
|
@@ -1106,7 +1100,7 @@ class HMSSDK {
|
|
|
1106
1100
|
// Checking if we already have ON_ROOM_UPDATE subscription
|
|
1107
1101
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ROOM_UPDATE]) {
|
|
1108
1102
|
// Adding ON_ROOM_UPDATE native listener
|
|
1109
|
-
const roomSubscription =
|
|
1103
|
+
const roomSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ROOM_UPDATE, this.onRoomListener);
|
|
1110
1104
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ROOM_UPDATE] = roomSubscription;
|
|
1111
1105
|
}
|
|
1112
1106
|
// Adding App Delegate listener
|
|
@@ -1118,7 +1112,7 @@ class HMSSDK {
|
|
|
1118
1112
|
// Checking if we already have ON_PEER_UPDATE subscription
|
|
1119
1113
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PEER_UPDATE]) {
|
|
1120
1114
|
// Adding ON_PEER_UPDATE native listener
|
|
1121
|
-
const peerSubscription =
|
|
1115
|
+
const peerSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PEER_UPDATE, this.onPeerListener);
|
|
1122
1116
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PEER_UPDATE] = peerSubscription;
|
|
1123
1117
|
}
|
|
1124
1118
|
// Adding App Delegate listener
|
|
@@ -1130,7 +1124,7 @@ class HMSSDK {
|
|
|
1130
1124
|
// Checking if we already have ON_TRACK_UPDATE subscription
|
|
1131
1125
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_TRACK_UPDATE]) {
|
|
1132
1126
|
// Adding ON_TRACK_UPDATE native listener
|
|
1133
|
-
const trackSubscription =
|
|
1127
|
+
const trackSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_TRACK_UPDATE, this.onTrackListener);
|
|
1134
1128
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_TRACK_UPDATE] = trackSubscription;
|
|
1135
1129
|
}
|
|
1136
1130
|
// Adding App Delegate listener
|
|
@@ -1142,7 +1136,7 @@ class HMSSDK {
|
|
|
1142
1136
|
// Checking if we already have ON_ERROR subscription
|
|
1143
1137
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ERROR]) {
|
|
1144
1138
|
// Adding ON_ERROR native listener
|
|
1145
|
-
const errorSubscription =
|
|
1139
|
+
const errorSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ERROR, this.onErrorListener);
|
|
1146
1140
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ERROR] = errorSubscription;
|
|
1147
1141
|
}
|
|
1148
1142
|
// Adding App Delegate listener
|
|
@@ -1154,7 +1148,7 @@ class HMSSDK {
|
|
|
1154
1148
|
// Checking if we already have ON_MESSAGE subscription
|
|
1155
1149
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_MESSAGE]) {
|
|
1156
1150
|
// Adding ON_MESSAGE native listener
|
|
1157
|
-
const messageSubscription =
|
|
1151
|
+
const messageSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_MESSAGE, this.onMessageListener);
|
|
1158
1152
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_MESSAGE] = messageSubscription;
|
|
1159
1153
|
}
|
|
1160
1154
|
// Adding App Delegate listener
|
|
@@ -1166,7 +1160,7 @@ class HMSSDK {
|
|
|
1166
1160
|
// Checking if we already have ON_SPEAKER subscription
|
|
1167
1161
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_SPEAKER]) {
|
|
1168
1162
|
// Adding ON_SPEAKER native listener
|
|
1169
|
-
const speakerSubscription =
|
|
1163
|
+
const speakerSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_SPEAKER, this.onSpeakerListener);
|
|
1170
1164
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_SPEAKER] = speakerSubscription;
|
|
1171
1165
|
}
|
|
1172
1166
|
// Adding App Delegate listener
|
|
@@ -1178,7 +1172,7 @@ class HMSSDK {
|
|
|
1178
1172
|
// Checking if we already have RECONNECTING subscription
|
|
1179
1173
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.RECONNECTING]) {
|
|
1180
1174
|
// Adding RECONNECTING native listener
|
|
1181
|
-
const reconnectingSubscription =
|
|
1175
|
+
const reconnectingSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.RECONNECTING, this.reconnectingListener);
|
|
1182
1176
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.RECONNECTING] = reconnectingSubscription;
|
|
1183
1177
|
}
|
|
1184
1178
|
// Adding App Delegate listener
|
|
@@ -1190,7 +1184,7 @@ class HMSSDK {
|
|
|
1190
1184
|
// Checking if we already have RECONNECTED subscription
|
|
1191
1185
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.RECONNECTED]) {
|
|
1192
1186
|
// Adding RECONNECTED native listener
|
|
1193
|
-
const reconnectedSubscription =
|
|
1187
|
+
const reconnectedSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.RECONNECTED, this.reconnectedListener);
|
|
1194
1188
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.RECONNECTED] = reconnectedSubscription;
|
|
1195
1189
|
}
|
|
1196
1190
|
// Adding App Delegate listener
|
|
@@ -1202,7 +1196,7 @@ class HMSSDK {
|
|
|
1202
1196
|
// Checking if we already have ON_ROLE_CHANGE_REQUEST subscription
|
|
1203
1197
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ROLE_CHANGE_REQUEST]) {
|
|
1204
1198
|
// Adding ON_ROLE_CHANGE_REQUEST native listener
|
|
1205
|
-
const roleChangeReqSubscription =
|
|
1199
|
+
const roleChangeReqSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ROLE_CHANGE_REQUEST, this.onRoleChangeRequestListener);
|
|
1206
1200
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ROLE_CHANGE_REQUEST] = roleChangeReqSubscription;
|
|
1207
1201
|
}
|
|
1208
1202
|
// Adding App Delegate listener
|
|
@@ -1214,7 +1208,7 @@ class HMSSDK {
|
|
|
1214
1208
|
// Checking if we already have ON_CHANGE_TRACK_STATE_REQUEST subscription
|
|
1215
1209
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_CHANGE_TRACK_STATE_REQUEST]) {
|
|
1216
1210
|
// Adding ON_CHANGE_TRACK_STATE_REQUEST native listener
|
|
1217
|
-
const changeTrackReqSubscription =
|
|
1211
|
+
const changeTrackReqSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_CHANGE_TRACK_STATE_REQUEST, this.onChangeTrackStateRequestListener);
|
|
1218
1212
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_CHANGE_TRACK_STATE_REQUEST] = changeTrackReqSubscription;
|
|
1219
1213
|
}
|
|
1220
1214
|
// Adding App Delegate listener
|
|
@@ -1226,7 +1220,7 @@ class HMSSDK {
|
|
|
1226
1220
|
// Checking if we already have ON_REMOVED_FROM_ROOM subscription
|
|
1227
1221
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOVED_FROM_ROOM]) {
|
|
1228
1222
|
// Adding ON_REMOVED_FROM_ROOM native listener
|
|
1229
|
-
const removedFromRoomSubscription =
|
|
1223
|
+
const removedFromRoomSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOVED_FROM_ROOM, this.onRemovedFromRoomListener);
|
|
1230
1224
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOVED_FROM_ROOM] = removedFromRoomSubscription;
|
|
1231
1225
|
}
|
|
1232
1226
|
// Adding App Delegate listener
|
|
@@ -1238,7 +1232,7 @@ class HMSSDK {
|
|
|
1238
1232
|
// Checking if we already have ON_RTC_STATS subscription
|
|
1239
1233
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_RTC_STATS]) {
|
|
1240
1234
|
// Adding ON_RTC_STATS native listener
|
|
1241
|
-
const rtcStatsSubscription =
|
|
1235
|
+
const rtcStatsSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_RTC_STATS, this.RTCStatsListener);
|
|
1242
1236
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_RTC_STATS] = rtcStatsSubscription;
|
|
1243
1237
|
}
|
|
1244
1238
|
// Adding App Delegate listener
|
|
@@ -1250,7 +1244,7 @@ class HMSSDK {
|
|
|
1250
1244
|
// Checking if we already have ON_LOCAL_AUDIO_STATS subscription
|
|
1251
1245
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_LOCAL_AUDIO_STATS]) {
|
|
1252
1246
|
// Adding ON_LOCAL_AUDIO_STATS native listener
|
|
1253
|
-
const lclAudioStatsSubscription =
|
|
1247
|
+
const lclAudioStatsSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_LOCAL_AUDIO_STATS, this.onLocalAudioStatsListener);
|
|
1254
1248
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_LOCAL_AUDIO_STATS] = lclAudioStatsSubscription;
|
|
1255
1249
|
}
|
|
1256
1250
|
// Adding App Delegate listener
|
|
@@ -1262,7 +1256,7 @@ class HMSSDK {
|
|
|
1262
1256
|
// Checking if we already have ON_LOCAL_VIDEO_STATS subscription
|
|
1263
1257
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_LOCAL_VIDEO_STATS]) {
|
|
1264
1258
|
// Adding ON_LOCAL_VIDEO_STATS native listener
|
|
1265
|
-
const lclVideoStatsSubscription =
|
|
1259
|
+
const lclVideoStatsSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_LOCAL_VIDEO_STATS, this.onLocalVideoStatsListener);
|
|
1266
1260
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_LOCAL_VIDEO_STATS] = lclVideoStatsSubscription;
|
|
1267
1261
|
}
|
|
1268
1262
|
// Adding App Delegate listener
|
|
@@ -1274,7 +1268,7 @@ class HMSSDK {
|
|
|
1274
1268
|
// Checking if we already have ON_REMOTE_AUDIO_STATS subscription
|
|
1275
1269
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOTE_AUDIO_STATS]) {
|
|
1276
1270
|
// Adding ON_REMOTE_AUDIO_STATS native listener
|
|
1277
|
-
const rmAudioStatsSubscription =
|
|
1271
|
+
const rmAudioStatsSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOTE_AUDIO_STATS, this.onRemoteAudioStatsListener);
|
|
1278
1272
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOTE_AUDIO_STATS] = rmAudioStatsSubscription;
|
|
1279
1273
|
}
|
|
1280
1274
|
// Adding App Delegate listener
|
|
@@ -1286,7 +1280,7 @@ class HMSSDK {
|
|
|
1286
1280
|
// Checking if we already have ON_REMOTE_VIDEO_STATS subscription
|
|
1287
1281
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOTE_VIDEO_STATS]) {
|
|
1288
1282
|
// Adding ON_REMOTE_VIDEO_STATS native listener
|
|
1289
|
-
const rmVideoStatsSubscription =
|
|
1283
|
+
const rmVideoStatsSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOTE_VIDEO_STATS, this.onRemoteVideoStatsListener);
|
|
1290
1284
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOTE_VIDEO_STATS] = rmVideoStatsSubscription;
|
|
1291
1285
|
}
|
|
1292
1286
|
// Adding App Delegate listener
|
|
@@ -1298,7 +1292,7 @@ class HMSSDK {
|
|
|
1298
1292
|
// Checking if we already have ON_AUDIO_DEVICE_CHANGED subscription
|
|
1299
1293
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_AUDIO_DEVICE_CHANGED]) {
|
|
1300
1294
|
// Adding ON_AUDIO_DEVICE_CHANGED native listener
|
|
1301
|
-
const audDeviceChgSubscription =
|
|
1295
|
+
const audDeviceChgSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_AUDIO_DEVICE_CHANGED, this.onAudioDeviceChangedListener);
|
|
1302
1296
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_AUDIO_DEVICE_CHANGED] = audDeviceChgSubscription;
|
|
1303
1297
|
}
|
|
1304
1298
|
// Adding App Delegate listener
|
|
@@ -1310,7 +1304,7 @@ class HMSSDK {
|
|
|
1310
1304
|
// Checking if we already have ON_SESSION_STORE_AVAILABLE subscription
|
|
1311
1305
|
if (!this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_SESSION_STORE_AVAILABLE]) {
|
|
1312
1306
|
// Adding ON_SESSION_STORE_AVAILABLE native listener
|
|
1313
|
-
const sessionStoreAvailableSubscription =
|
|
1307
|
+
const sessionStoreAvailableSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_SESSION_STORE_AVAILABLE, this.onSessionStoreAvailableListener);
|
|
1314
1308
|
this.emitterSubscriptions[_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_SESSION_STORE_AVAILABLE] = sessionStoreAvailableSubscription;
|
|
1315
1309
|
}
|
|
1316
1310
|
// Adding Session Store Available App Delegate listener
|
|
@@ -1323,7 +1317,7 @@ class HMSSDK {
|
|
|
1323
1317
|
// Checking if we already have ON_PIP_ROOM_LEAVE subscription
|
|
1324
1318
|
if (!this.emitterSubscriptions[_HMSPIPListenerActions.HMSPIPListenerActions.ON_PIP_ROOM_LEAVE]) {
|
|
1325
1319
|
// Adding ON_PIP_ROOM_LEAVE native listener
|
|
1326
|
-
const pipRoomLeaveSubscription =
|
|
1320
|
+
const pipRoomLeaveSubscription = _HMSNativeEventListener.default.addListener(this.id, _HMSPIPListenerActions.HMSPIPListenerActions.ON_PIP_ROOM_LEAVE, this.onPIPRoomLeaveListener);
|
|
1327
1321
|
this.emitterSubscriptions[_HMSPIPListenerActions.HMSPIPListenerActions.ON_PIP_ROOM_LEAVE] = pipRoomLeaveSubscription;
|
|
1328
1322
|
}
|
|
1329
1323
|
// Adding App Delegate listener
|
|
@@ -2020,7 +2014,7 @@ class HMSSDK {
|
|
|
2020
2014
|
minor,
|
|
2021
2015
|
patch
|
|
2022
2016
|
} = ReactNativeVersion.version;
|
|
2023
|
-
let id = await
|
|
2017
|
+
let id = await _HMSManagerModule.default.build({
|
|
2024
2018
|
trackSettings: params === null || params === void 0 ? void 0 : params.trackSettings,
|
|
2025
2019
|
appGroup: params === null || params === void 0 ? void 0 : params.appGroup,
|
|
2026
2020
|
// required for iOS Screenshare, not required for Android
|
|
@@ -2028,7 +2022,8 @@ class HMSSDK {
|
|
|
2028
2022
|
// required for iOS Screenshare, not required for Android
|
|
2029
2023
|
frameworkInfo: {
|
|
2030
2024
|
version: major + '.' + minor + '.' + patch,
|
|
2031
|
-
sdkVersion: version
|
|
2025
|
+
sdkVersion: version,
|
|
2026
|
+
isPrebuilt: (params === null || params === void 0 ? void 0 : params.isPrebuilt) || false
|
|
2032
2027
|
},
|
|
2033
2028
|
logSettings: params === null || params === void 0 ? void 0 : params.logSettings
|
|
2034
2029
|
});
|
|
@@ -2036,18 +2031,18 @@ class HMSSDK {
|
|
|
2036
2031
|
return HmsSdk;
|
|
2037
2032
|
}
|
|
2038
2033
|
async isPipModeSupported() {
|
|
2039
|
-
return
|
|
2034
|
+
return _HMSManagerModule.default.handlePipActions('isPipModeSupported', {
|
|
2040
2035
|
id: this.id
|
|
2041
2036
|
});
|
|
2042
2037
|
}
|
|
2043
2038
|
async enablePipMode(data) {
|
|
2044
|
-
return
|
|
2039
|
+
return _HMSManagerModule.default.handlePipActions('enablePipMode', {
|
|
2045
2040
|
...data,
|
|
2046
2041
|
id: this.id
|
|
2047
2042
|
});
|
|
2048
2043
|
}
|
|
2049
2044
|
async setPipParams(data) {
|
|
2050
|
-
return
|
|
2045
|
+
return _HMSManagerModule.default.handlePipActions('setPictureInPictureParams', {
|
|
2051
2046
|
...data,
|
|
2052
2047
|
id: this.id
|
|
2053
2048
|
});
|