@100mslive/react-native-hms 0.9.93 → 1.0.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.
- package/README.md +54 -13
- 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/outputFiles.bin +0 -0
- 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/.idea/jarRepositories.xml +10 -0
- package/android/.idea/libraries/Gradle__androidx_tracing_tracing_1_1_0_aar.xml +13 -0
- package/android/.idea/libraries/Gradle__com_facebook_fbjni_fbjni_0_3_0_aar.xml +14 -0
- package/android/.idea/libraries/Gradle__com_facebook_react_react_native_0_71_0_rc_0_debug_aar.xml +14 -0
- package/android/.idea/libraries/Gradle__com_facebook_soloader_annotation_0_10_4.xml +13 -0
- package/android/.idea/libraries/Gradle__com_facebook_soloader_nativeloader_0_10_4.xml +13 -0
- package/android/.idea/libraries/Gradle__com_facebook_soloader_soloader_0_10_4_aar.xml +14 -0
- package/android/.idea/libraries/Gradle__com_github_100mslive_android_sdk_lib_2_5_1_aar.xml +10 -0
- package/android/.idea/libraries/Gradle__com_github_100mslive_webrtc_m104_hms_1_3_aar.xml +10 -0
- package/android/.idea/modules/android.androidTest.iml +35 -33
- package/android/.idea/modules/android.main.iml +36 -33
- package/android/.idea/modules/android.unitTest.iml +35 -33
- package/android/.idea/sonarlint/issuestore/3/c/3c46088b6add3088181589d8ed726652742b6221 +5 -0
- package/android/.idea/sonarlint/issuestore/a/8/a8c9f5ddd88723818e51ae3cf8693d02355a8691 +0 -0
- package/android/.idea/sonarlint/issuestore/index.pb +5 -1
- package/android/build.gradle +12 -10
- package/android/src/main/java/com/reactnativehmssdk/HMSDecoder.kt +8 -25
- package/android/src/main/java/com/reactnativehmssdk/HMSHelper.kt +119 -89
- package/android/src/main/java/com/reactnativehmssdk/HMSManager.kt +196 -0
- package/android/src/main/java/com/reactnativehmssdk/HMSRNSDK.kt +99 -40
- package/android/src/main/java/com/reactnativehmssdk/HMSView.kt +1 -1
- package/ios/HMSDecoder.swift +17 -15
- package/ios/HMSHelper.swift +52 -22
- package/ios/HMSManager.m +7 -0
- package/ios/HMSManager.swift +62 -14
- package/ios/HMSRNSDK.swift +71 -30
- package/ios/Hmssdk.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/ios/Hmssdk.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/Hmssdk.xcodeproj/project.xcworkspace/xcuserdata/yogesh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/Hmssdk.xcodeproj/xcuserdata/yogesh.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/lib/commonjs/classes/HMSAudioCodec.js +0 -1
- package/lib/commonjs/classes/HMSAudioCodec.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioDevice.js +0 -1
- package/lib/commonjs/classes/HMSAudioDevice.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioFilePlayerNode.js +0 -14
- package/lib/commonjs/classes/HMSAudioFilePlayerNode.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioMixerSource.js +3 -7
- package/lib/commonjs/classes/HMSAudioMixerSource.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioMixingMode.js +0 -1
- package/lib/commonjs/classes/HMSAudioMixingMode.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioMode.js +0 -1
- package/lib/commonjs/classes/HMSAudioMode.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioNode.js +3 -8
- package/lib/commonjs/classes/HMSAudioNode.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioSettings.js +3 -7
- package/lib/commonjs/classes/HMSAudioSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioTrack.js +0 -4
- package/lib/commonjs/classes/HMSAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioTrackSettings.js +9 -17
- package/lib/commonjs/classes/HMSAudioTrackSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSBrowserRecordingState.js +3 -9
- package/lib/commonjs/classes/HMSBrowserRecordingState.js.map +1 -1
- package/lib/commonjs/classes/HMSCameraFacing.js +0 -1
- package/lib/commonjs/classes/HMSCameraFacing.js.map +1 -1
- package/lib/commonjs/classes/HMSChangeTrackStateRequest.js +3 -8
- package/lib/commonjs/classes/HMSChangeTrackStateRequest.js.map +1 -1
- package/lib/commonjs/classes/HMSConfig.js +3 -10
- package/lib/commonjs/classes/HMSConfig.js.map +1 -1
- package/lib/commonjs/classes/HMSEncoder.js +12 -86
- package/lib/commonjs/classes/HMSEncoder.js.map +1 -1
- package/lib/commonjs/classes/HMSException.js +5 -12
- package/lib/commonjs/classes/HMSException.js.map +1 -1
- package/lib/commonjs/classes/HMSHLSConfig.js +3 -7
- package/lib/commonjs/classes/HMSHLSConfig.js.map +1 -1
- package/lib/commonjs/classes/HMSHLSMeetingURLVariant.js +3 -7
- package/lib/commonjs/classes/HMSHLSMeetingURLVariant.js.map +1 -1
- package/lib/commonjs/classes/HMSHLSRecordingConfig.js +3 -7
- package/lib/commonjs/classes/HMSHLSRecordingConfig.js.map +1 -1
- package/lib/commonjs/classes/HMSHLSRecordingState.js +3 -9
- package/lib/commonjs/classes/HMSHLSRecordingState.js.map +1 -1
- package/lib/commonjs/classes/HMSHLSStreamingState.js +3 -7
- package/lib/commonjs/classes/HMSHLSStreamingState.js.map +1 -1
- package/lib/commonjs/classes/HMSHLSVariant.js +3 -9
- package/lib/commonjs/classes/HMSHLSVariant.js.map +1 -1
- package/lib/commonjs/classes/HMSHelper.js +0 -3
- package/lib/commonjs/classes/HMSHelper.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalAudioStats.js +3 -8
- package/lib/commonjs/classes/HMSLocalAudioStats.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalAudioTrack.js +3 -16
- package/lib/commonjs/classes/HMSLocalAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalPeer.js +3 -15
- package/lib/commonjs/classes/HMSLocalPeer.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalVideoStats.js +3 -10
- package/lib/commonjs/classes/HMSLocalVideoStats.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalVideoTrack.js +3 -16
- package/lib/commonjs/classes/HMSLocalVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSLogAlarmManager.js +14 -0
- package/lib/commonjs/classes/HMSLogAlarmManager.js.map +1 -0
- package/lib/commonjs/classes/HMSLogLevel.js +0 -1
- package/lib/commonjs/classes/HMSLogLevel.js.map +1 -1
- package/lib/commonjs/classes/HMSLogSettings.js +21 -0
- package/lib/commonjs/classes/HMSLogSettings.js.map +1 -0
- package/lib/commonjs/classes/HMSLogger.js +3 -31
- package/lib/commonjs/classes/HMSLogger.js.map +1 -1
- package/lib/commonjs/classes/HMSMessage.js +4 -10
- package/lib/commonjs/classes/HMSMessage.js.map +1 -1
- package/lib/commonjs/classes/HMSMessageRecipient.js +3 -8
- package/lib/commonjs/classes/HMSMessageRecipient.js.map +1 -1
- package/lib/commonjs/classes/HMSMessageRecipientType.js +0 -1
- package/lib/commonjs/classes/HMSMessageRecipientType.js.map +1 -1
- package/lib/commonjs/classes/HMSMessageType.js +13 -0
- package/lib/commonjs/classes/HMSMessageType.js.map +1 -0
- package/lib/commonjs/classes/HMSMicNode.js +0 -7
- package/lib/commonjs/classes/HMSMicNode.js.map +1 -1
- package/lib/commonjs/classes/HMSNetworkQuality.js +3 -6
- package/lib/commonjs/classes/HMSNetworkQuality.js.map +1 -1
- package/lib/commonjs/classes/HMSPeer.js +3 -16
- package/lib/commonjs/classes/HMSPeer.js.map +1 -1
- package/lib/commonjs/classes/HMSPeerUpdate.js +0 -1
- package/lib/commonjs/classes/HMSPeerUpdate.js.map +1 -1
- package/lib/commonjs/classes/HMSPermissions.js +3 -13
- package/lib/commonjs/classes/HMSPermissions.js.map +1 -1
- package/lib/commonjs/classes/HMSPublishSettings.js +3 -12
- package/lib/commonjs/classes/HMSPublishSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSRTCStats.js +3 -12
- package/lib/commonjs/classes/HMSRTCStats.js.map +1 -1
- package/lib/commonjs/classes/HMSRTCStatsReport.js +3 -8
- package/lib/commonjs/classes/HMSRTCStatsReport.js.map +1 -1
- package/lib/commonjs/classes/HMSRTMPConfig.js +3 -9
- package/lib/commonjs/classes/HMSRTMPConfig.js.map +1 -1
- package/lib/commonjs/classes/HMSRemoteAudioStats.js +3 -10
- package/lib/commonjs/classes/HMSRemoteAudioStats.js.map +1 -1
- package/lib/commonjs/classes/HMSRemoteAudioTrack.js +3 -11
- package/lib/commonjs/classes/HMSRemoteAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSRemotePeer.js +3 -15
- package/lib/commonjs/classes/HMSRemotePeer.js.map +1 -1
- package/lib/commonjs/classes/HMSRemoteVideoStats.js +3 -12
- package/lib/commonjs/classes/HMSRemoteVideoStats.js.map +1 -1
- package/lib/commonjs/classes/HMSRemoteVideoTrack.js +3 -13
- package/lib/commonjs/classes/HMSRemoteVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSRole.js +3 -13
- package/lib/commonjs/classes/HMSRole.js.map +1 -1
- package/lib/commonjs/classes/HMSRoleChangeRequest.js +3 -7
- package/lib/commonjs/classes/HMSRoleChangeRequest.js.map +1 -1
- package/lib/commonjs/classes/HMSRoom.js +5 -16
- package/lib/commonjs/classes/HMSRoom.js.map +1 -1
- package/lib/commonjs/classes/HMSRoomUpdate.js +0 -1
- package/lib/commonjs/classes/HMSRoomUpdate.js.map +1 -1
- package/lib/commonjs/classes/HMSRtmpStreamingState.js +3 -9
- package/lib/commonjs/classes/HMSRtmpStreamingState.js.map +1 -1
- package/lib/commonjs/classes/HMSRtmpVideoResolution.js +3 -7
- package/lib/commonjs/classes/HMSRtmpVideoResolution.js.map +1 -1
- package/lib/commonjs/classes/HMSSDK.js +172 -382
- package/lib/commonjs/classes/HMSSDK.js.map +1 -1
- package/lib/commonjs/classes/HMSScreenBroadcastAudioReceiverNode.js +0 -4
- package/lib/commonjs/classes/HMSScreenBroadcastAudioReceiverNode.js.map +1 -1
- package/lib/commonjs/classes/HMSServerRecordingState.js +3 -8
- package/lib/commonjs/classes/HMSServerRecordingState.js.map +1 -1
- package/lib/commonjs/classes/HMSSimulcastLayerSettings.js +3 -9
- package/lib/commonjs/classes/HMSSimulcastLayerSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSSimulcastSettings.js +3 -7
- package/lib/commonjs/classes/HMSSimulcastSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSSpeaker.js +3 -8
- package/lib/commonjs/classes/HMSSpeaker.js.map +1 -1
- package/lib/commonjs/classes/HMSSubscribeSettings.js +5 -10
- package/lib/commonjs/classes/HMSSubscribeSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSTrack.js +3 -12
- package/lib/commonjs/classes/HMSTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSTrackSettings.js +3 -10
- package/lib/commonjs/classes/HMSTrackSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSTrackSettingsInitState.js +13 -0
- package/lib/commonjs/classes/HMSTrackSettingsInitState.js.map +1 -0
- package/lib/commonjs/classes/HMSTrackSource.js +0 -1
- package/lib/commonjs/classes/HMSTrackSource.js.map +1 -1
- package/lib/commonjs/classes/HMSTrackType.js +0 -1
- package/lib/commonjs/classes/HMSTrackType.js.map +1 -1
- package/lib/commonjs/classes/HMSTrackUpdate.js +0 -1
- package/lib/commonjs/classes/HMSTrackUpdate.js.map +1 -1
- package/lib/commonjs/classes/HMSUpdateListenerActions.js +0 -1
- package/lib/commonjs/classes/HMSUpdateListenerActions.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoCodec.js +0 -1
- package/lib/commonjs/classes/HMSVideoCodec.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoResolution.js +3 -7
- package/lib/commonjs/classes/HMSVideoResolution.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoSettings.js +3 -10
- package/lib/commonjs/classes/HMSVideoSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoTrack.js +3 -12
- package/lib/commonjs/classes/HMSVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoTrackSettings.js +14 -24
- package/lib/commonjs/classes/HMSVideoTrackSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoViewMode.js +0 -1
- package/lib/commonjs/classes/HMSVideoViewMode.js.map +1 -1
- package/lib/commonjs/classes/HmsView.js +20 -26
- package/lib/commonjs/classes/HmsView.js.map +1 -1
- package/lib/commonjs/index.js +48 -144
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/classes/HMSAudioCodec.js +0 -1
- package/lib/module/classes/HMSAudioCodec.js.map +1 -1
- package/lib/module/classes/HMSAudioDevice.js +0 -1
- package/lib/module/classes/HMSAudioDevice.js.map +1 -1
- package/lib/module/classes/HMSAudioFilePlayerNode.js +0 -9
- package/lib/module/classes/HMSAudioFilePlayerNode.js.map +1 -1
- package/lib/module/classes/HMSAudioMixerSource.js +3 -5
- package/lib/module/classes/HMSAudioMixerSource.js.map +1 -1
- package/lib/module/classes/HMSAudioMixingMode.js +0 -1
- package/lib/module/classes/HMSAudioMixingMode.js.map +1 -1
- package/lib/module/classes/HMSAudioMode.js +0 -1
- package/lib/module/classes/HMSAudioMode.js.map +1 -1
- package/lib/module/classes/HMSAudioNode.js +3 -6
- package/lib/module/classes/HMSAudioNode.js.map +1 -1
- package/lib/module/classes/HMSAudioSettings.js +3 -5
- package/lib/module/classes/HMSAudioSettings.js.map +1 -1
- package/lib/module/classes/HMSAudioTrack.js +0 -1
- package/lib/module/classes/HMSAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSAudioTrackSettings.js +9 -15
- package/lib/module/classes/HMSAudioTrackSettings.js.map +1 -1
- package/lib/module/classes/HMSBrowserRecordingState.js +3 -7
- package/lib/module/classes/HMSBrowserRecordingState.js.map +1 -1
- package/lib/module/classes/HMSCameraFacing.js +0 -1
- package/lib/module/classes/HMSCameraFacing.js.map +1 -1
- package/lib/module/classes/HMSChangeTrackStateRequest.js +3 -6
- package/lib/module/classes/HMSChangeTrackStateRequest.js.map +1 -1
- package/lib/module/classes/HMSConfig.js +3 -8
- package/lib/module/classes/HMSConfig.js.map +1 -1
- package/lib/module/classes/HMSEncoder.js +12 -54
- package/lib/module/classes/HMSEncoder.js.map +1 -1
- package/lib/module/classes/HMSException.js +5 -10
- package/lib/module/classes/HMSException.js.map +1 -1
- package/lib/module/classes/HMSHLSConfig.js +3 -5
- package/lib/module/classes/HMSHLSConfig.js.map +1 -1
- package/lib/module/classes/HMSHLSMeetingURLVariant.js +3 -5
- package/lib/module/classes/HMSHLSMeetingURLVariant.js.map +1 -1
- package/lib/module/classes/HMSHLSRecordingConfig.js +3 -5
- package/lib/module/classes/HMSHLSRecordingConfig.js.map +1 -1
- package/lib/module/classes/HMSHLSRecordingState.js +3 -7
- package/lib/module/classes/HMSHLSRecordingState.js.map +1 -1
- package/lib/module/classes/HMSHLSStreamingState.js +3 -5
- package/lib/module/classes/HMSHLSStreamingState.js.map +1 -1
- package/lib/module/classes/HMSHLSVariant.js +3 -7
- package/lib/module/classes/HMSHLSVariant.js.map +1 -1
- package/lib/module/classes/HMSHelper.js +0 -1
- package/lib/module/classes/HMSHelper.js.map +1 -1
- package/lib/module/classes/HMSLocalAudioStats.js +3 -6
- package/lib/module/classes/HMSLocalAudioStats.js.map +1 -1
- package/lib/module/classes/HMSLocalAudioTrack.js +3 -10
- package/lib/module/classes/HMSLocalAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSLocalPeer.js +3 -10
- package/lib/module/classes/HMSLocalPeer.js.map +1 -1
- package/lib/module/classes/HMSLocalVideoStats.js +3 -8
- package/lib/module/classes/HMSLocalVideoStats.js.map +1 -1
- package/lib/module/classes/HMSLocalVideoTrack.js +3 -10
- package/lib/module/classes/HMSLocalVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSLogAlarmManager.js +7 -0
- package/lib/module/classes/HMSLogAlarmManager.js.map +1 -0
- package/lib/module/classes/HMSLogLevel.js +0 -1
- package/lib/module/classes/HMSLogLevel.js.map +1 -1
- package/lib/module/classes/HMSLogSettings.js +14 -0
- package/lib/module/classes/HMSLogSettings.js.map +1 -0
- package/lib/module/classes/HMSLogger.js +3 -23
- package/lib/module/classes/HMSLogger.js.map +1 -1
- package/lib/module/classes/HMSMessage.js +4 -8
- package/lib/module/classes/HMSMessage.js.map +1 -1
- package/lib/module/classes/HMSMessageRecipient.js +3 -6
- package/lib/module/classes/HMSMessageRecipient.js.map +1 -1
- package/lib/module/classes/HMSMessageRecipientType.js +0 -1
- package/lib/module/classes/HMSMessageRecipientType.js.map +1 -1
- package/lib/module/classes/HMSMessageType.js +6 -0
- package/lib/module/classes/HMSMessageType.js.map +1 -0
- package/lib/module/classes/HMSMicNode.js +0 -2
- package/lib/module/classes/HMSMicNode.js.map +1 -1
- package/lib/module/classes/HMSNetworkQuality.js +3 -4
- package/lib/module/classes/HMSNetworkQuality.js.map +1 -1
- package/lib/module/classes/HMSPeer.js +3 -14
- package/lib/module/classes/HMSPeer.js.map +1 -1
- package/lib/module/classes/HMSPeerUpdate.js +0 -1
- package/lib/module/classes/HMSPeerUpdate.js.map +1 -1
- package/lib/module/classes/HMSPermissions.js +3 -11
- package/lib/module/classes/HMSPermissions.js.map +1 -1
- package/lib/module/classes/HMSPublishSettings.js +3 -10
- package/lib/module/classes/HMSPublishSettings.js.map +1 -1
- package/lib/module/classes/HMSRTCStats.js +3 -10
- package/lib/module/classes/HMSRTCStats.js.map +1 -1
- package/lib/module/classes/HMSRTCStatsReport.js +3 -6
- package/lib/module/classes/HMSRTCStatsReport.js.map +1 -1
- package/lib/module/classes/HMSRTMPConfig.js +3 -7
- package/lib/module/classes/HMSRTMPConfig.js.map +1 -1
- package/lib/module/classes/HMSRemoteAudioStats.js +3 -8
- package/lib/module/classes/HMSRemoteAudioStats.js.map +1 -1
- package/lib/module/classes/HMSRemoteAudioTrack.js +3 -5
- package/lib/module/classes/HMSRemoteAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSRemotePeer.js +3 -10
- package/lib/module/classes/HMSRemotePeer.js.map +1 -1
- package/lib/module/classes/HMSRemoteVideoStats.js +3 -10
- package/lib/module/classes/HMSRemoteVideoStats.js.map +1 -1
- package/lib/module/classes/HMSRemoteVideoTrack.js +3 -7
- package/lib/module/classes/HMSRemoteVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSRole.js +3 -11
- package/lib/module/classes/HMSRole.js.map +1 -1
- package/lib/module/classes/HMSRoleChangeRequest.js +3 -5
- package/lib/module/classes/HMSRoleChangeRequest.js.map +1 -1
- package/lib/module/classes/HMSRoom.js +5 -14
- package/lib/module/classes/HMSRoom.js.map +1 -1
- package/lib/module/classes/HMSRoomUpdate.js +0 -1
- package/lib/module/classes/HMSRoomUpdate.js.map +1 -1
- package/lib/module/classes/HMSRtmpStreamingState.js +3 -7
- package/lib/module/classes/HMSRtmpStreamingState.js.map +1 -1
- package/lib/module/classes/HMSRtmpVideoResolution.js +3 -5
- package/lib/module/classes/HMSRtmpVideoResolution.js.map +1 -1
- package/lib/module/classes/HMSSDK.js +172 -336
- package/lib/module/classes/HMSSDK.js.map +1 -1
- package/lib/module/classes/HMSScreenBroadcastAudioReceiverNode.js +0 -1
- package/lib/module/classes/HMSScreenBroadcastAudioReceiverNode.js.map +1 -1
- package/lib/module/classes/HMSServerRecordingState.js +3 -6
- package/lib/module/classes/HMSServerRecordingState.js.map +1 -1
- package/lib/module/classes/HMSSimulcastLayerSettings.js +3 -7
- package/lib/module/classes/HMSSimulcastLayerSettings.js.map +1 -1
- package/lib/module/classes/HMSSimulcastSettings.js +3 -5
- package/lib/module/classes/HMSSimulcastSettings.js.map +1 -1
- package/lib/module/classes/HMSSpeaker.js +3 -6
- package/lib/module/classes/HMSSpeaker.js.map +1 -1
- package/lib/module/classes/HMSSubscribeSettings.js +5 -8
- package/lib/module/classes/HMSSubscribeSettings.js.map +1 -1
- package/lib/module/classes/HMSTrack.js +3 -10
- package/lib/module/classes/HMSTrack.js.map +1 -1
- package/lib/module/classes/HMSTrackSettings.js +3 -8
- package/lib/module/classes/HMSTrackSettings.js.map +1 -1
- package/lib/module/classes/HMSTrackSettingsInitState.js +6 -0
- package/lib/module/classes/HMSTrackSettingsInitState.js.map +1 -0
- package/lib/module/classes/HMSTrackSource.js +0 -1
- package/lib/module/classes/HMSTrackSource.js.map +1 -1
- package/lib/module/classes/HMSTrackType.js +0 -1
- package/lib/module/classes/HMSTrackType.js.map +1 -1
- package/lib/module/classes/HMSTrackUpdate.js +0 -1
- package/lib/module/classes/HMSTrackUpdate.js.map +1 -1
- package/lib/module/classes/HMSUpdateListenerActions.js +0 -1
- package/lib/module/classes/HMSUpdateListenerActions.js.map +1 -1
- package/lib/module/classes/HMSVideoCodec.js +0 -1
- package/lib/module/classes/HMSVideoCodec.js.map +1 -1
- package/lib/module/classes/HMSVideoResolution.js +3 -5
- package/lib/module/classes/HMSVideoResolution.js.map +1 -1
- package/lib/module/classes/HMSVideoSettings.js +3 -8
- package/lib/module/classes/HMSVideoSettings.js.map +1 -1
- package/lib/module/classes/HMSVideoTrack.js +3 -9
- package/lib/module/classes/HMSVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSVideoTrackSettings.js +14 -22
- package/lib/module/classes/HMSVideoTrackSettings.js.map +1 -1
- package/lib/module/classes/HMSVideoViewMode.js +0 -1
- package/lib/module/classes/HMSVideoViewMode.js.map +1 -1
- package/lib/module/classes/HmsView.js +20 -15
- package/lib/module/classes/HmsView.js.map +1 -1
- package/lib/module/index.js +4 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/classes/HMSAudioTrackSettings.d.ts +5 -7
- package/lib/typescript/classes/HMSBrowserRecordingState.d.ts +2 -2
- package/lib/typescript/classes/HMSEncoder.d.ts +2 -5
- package/lib/typescript/classes/HMSLogAlarmManager.d.ts +5 -0
- package/lib/typescript/classes/HMSLogSettings.d.ts +12 -0
- package/lib/typescript/classes/HMSMessage.d.ts +3 -2
- package/lib/typescript/classes/HMSMessageType.d.ts +4 -0
- package/lib/typescript/classes/HMSRoom.d.ts +3 -0
- package/lib/typescript/classes/HMSRtmpStreamingState.d.ts +2 -2
- package/lib/typescript/classes/HMSSDK.d.ts +52 -17
- package/lib/typescript/classes/HMSServerRecordingState.d.ts +2 -2
- package/lib/typescript/classes/HMSSubscribeSettings.d.ts +2 -2
- package/lib/typescript/classes/HMSTrackSettings.d.ts +0 -2
- package/lib/typescript/classes/HMSTrackSettingsInitState.d.ts +4 -0
- package/lib/typescript/classes/HMSVideoTrack.d.ts +0 -2
- package/lib/typescript/classes/HMSVideoTrackSettings.d.ts +10 -15
- package/lib/typescript/index.d.ts +4 -0
- package/package.json +1 -1
- package/react-native-hms.podspec +2 -2
- package/src/classes/HMSAudioTrackSettings.ts +8 -10
- package/src/classes/HMSBrowserRecordingState.ts +2 -2
- package/src/classes/HMSEncoder.ts +12 -20
- package/src/classes/HMSLogAlarmManager.ts +5 -0
- package/src/classes/HMSLogSettings.ts +18 -0
- package/src/classes/HMSMessage.ts +3 -2
- package/src/classes/HMSMessageType.ts +4 -0
- package/src/classes/HMSRoom.ts +4 -0
- package/src/classes/HMSRtmpStreamingState.ts +2 -2
- package/src/classes/HMSSDK.tsx +165 -149
- package/src/classes/HMSServerRecordingState.ts +2 -2
- package/src/classes/HMSSubscribeSettings.ts +3 -3
- package/src/classes/HMSTrackSettings.ts +0 -3
- package/src/classes/HMSTrackSettingsInitState.ts +4 -0
- package/src/classes/HMSVideoTrack.ts +0 -2
- package/src/classes/HMSVideoTrackSettings.ts +14 -21
- package/src/classes/HmsView.tsx +15 -1
- package/src/index.ts +4 -0
- package/android/.idea/libraries/Gradle__com_facebook_fbjni_fbjni_java_only_0_2_2.xml +0 -13
- package/android/.idea/libraries/Gradle__com_facebook_react_react_native_0_69_1_debug_aar.xml +0 -14
- package/android/.idea/libraries/Gradle__com_facebook_soloader_annotation_0_10_3.xml +0 -13
- package/android/.idea/libraries/Gradle__com_facebook_soloader_nativeloader_0_10_3.xml +0 -13
- package/android/.idea/libraries/Gradle__com_facebook_soloader_soloader_0_10_3_aar.xml +0 -15
- package/android/.idea/libraries/Gradle__com_github_100mslive_android_sdk_lib_2_4_7_aar.xml +0 -11
- package/android/.idea/libraries/Gradle__com_github_100mslive_webrtc_m97_hms_1_1_aar.xml +0 -11
|
@@ -4,104 +4,60 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.HMSSDK = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
9
|
var _HMSEncoder = require("./HMSEncoder");
|
|
13
|
-
|
|
14
10
|
var _HMSHelper = require("./HMSHelper");
|
|
15
|
-
|
|
16
11
|
var _HMSLocalAudioStats = require("./HMSLocalAudioStats");
|
|
17
|
-
|
|
18
12
|
var _HMSLocalVideoStats = require("./HMSLocalVideoStats");
|
|
19
|
-
|
|
20
13
|
var _HMSLogger = require("./HMSLogger");
|
|
21
|
-
|
|
22
14
|
var _HMSRemoteAudioStats = require("./HMSRemoteAudioStats");
|
|
23
|
-
|
|
24
15
|
var _HMSRemoteVideoStats = require("./HMSRemoteVideoStats");
|
|
25
|
-
|
|
26
16
|
var _HMSTrackType = require("./HMSTrackType");
|
|
27
|
-
|
|
28
17
|
var _HMSUpdateListenerActions = require("./HMSUpdateListenerActions");
|
|
29
|
-
|
|
30
18
|
var _HmsView = require("./HmsView");
|
|
31
|
-
|
|
19
|
+
var _HMSMessageType = require("./HMSMessageType");
|
|
32
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
|
-
|
|
34
|
-
function
|
|
35
|
-
|
|
21
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
22
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
23
|
+
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); }
|
|
36
24
|
const {
|
|
37
25
|
/**
|
|
38
26
|
* @ignore
|
|
39
27
|
*/
|
|
40
28
|
HMSManager
|
|
41
29
|
} = _reactNative.NativeModules;
|
|
30
|
+
const ReactNativeVersion = require('react-native/Libraries/Core/ReactNativeVersion');
|
|
42
31
|
const HmsEventEmitter = new _reactNative.NativeEventEmitter(HMSManager);
|
|
43
32
|
let HmsSdk;
|
|
44
|
-
|
|
45
33
|
class HMSSDK {
|
|
46
34
|
constructor(id) {
|
|
47
35
|
var _this = this;
|
|
48
|
-
|
|
49
|
-
_defineProperty(this, "room", void 0);
|
|
50
|
-
|
|
51
|
-
_defineProperty(this, "localPeer", void 0);
|
|
52
|
-
|
|
53
|
-
_defineProperty(this, "remotePeers", void 0);
|
|
54
|
-
|
|
55
|
-
_defineProperty(this, "knownRoles", void 0);
|
|
56
|
-
|
|
57
36
|
_defineProperty(this, "id", void 0);
|
|
58
|
-
|
|
59
37
|
_defineProperty(this, "muteStatus", void 0);
|
|
60
|
-
|
|
61
38
|
_defineProperty(this, "appStateSubscription", void 0);
|
|
62
|
-
|
|
63
39
|
_defineProperty(this, "onPreviewDelegate", void 0);
|
|
64
|
-
|
|
65
40
|
_defineProperty(this, "onJoinDelegate", void 0);
|
|
66
|
-
|
|
67
41
|
_defineProperty(this, "onRoomDelegate", void 0);
|
|
68
|
-
|
|
69
42
|
_defineProperty(this, "onPeerDelegate", void 0);
|
|
70
|
-
|
|
71
43
|
_defineProperty(this, "onTrackDelegate", void 0);
|
|
72
|
-
|
|
73
44
|
_defineProperty(this, "onErrorDelegate", void 0);
|
|
74
|
-
|
|
75
45
|
_defineProperty(this, "onMessageDelegate", void 0);
|
|
76
|
-
|
|
77
46
|
_defineProperty(this, "onSpeakerDelegate", void 0);
|
|
78
|
-
|
|
79
47
|
_defineProperty(this, "onReconnectingDelegate", void 0);
|
|
80
|
-
|
|
81
48
|
_defineProperty(this, "onReconnectedDelegate", void 0);
|
|
82
|
-
|
|
83
49
|
_defineProperty(this, "onRoleChangeRequestDelegate", void 0);
|
|
84
|
-
|
|
85
50
|
_defineProperty(this, "onChangeTrackStateRequestDelegate", void 0);
|
|
86
|
-
|
|
87
51
|
_defineProperty(this, "onRemovedFromRoomDelegate", void 0);
|
|
88
|
-
|
|
89
52
|
_defineProperty(this, "onRtcStatsDelegate", void 0);
|
|
90
|
-
|
|
91
53
|
_defineProperty(this, "onLocalAudioStatsDelegate", void 0);
|
|
92
|
-
|
|
93
54
|
_defineProperty(this, "onLocalVideoStatsDelegate", void 0);
|
|
94
|
-
|
|
95
55
|
_defineProperty(this, "onRemoteAudioStatsDelegate", void 0);
|
|
96
|
-
|
|
97
56
|
_defineProperty(this, "onRemoteVideoStatsDelegate", void 0);
|
|
98
|
-
|
|
99
57
|
_defineProperty(this, "onAudioDeviceChangedDelegate", void 0);
|
|
100
|
-
|
|
101
58
|
_defineProperty(this, "setLogger", hmsLogger => {
|
|
102
59
|
(0, _HMSLogger.setLogger)(this.id, hmsLogger);
|
|
103
60
|
});
|
|
104
|
-
|
|
105
61
|
_defineProperty(this, "destroy", async () => {
|
|
106
62
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function destroy', {
|
|
107
63
|
id: this.id
|
|
@@ -111,12 +67,8 @@ class HMSSDK {
|
|
|
111
67
|
id: this.id
|
|
112
68
|
});
|
|
113
69
|
});
|
|
114
|
-
|
|
115
|
-
_defineProperty(this, "attachPreviewListener", () => {
|
|
116
|
-
HmsEventEmitter.addListener(_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PREVIEW, this.onPreviewListener);
|
|
117
|
-
});
|
|
118
|
-
|
|
119
70
|
_defineProperty(this, "attachListeners", () => {
|
|
71
|
+
HmsEventEmitter.addListener(_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PREVIEW, this.onPreviewListener);
|
|
120
72
|
HmsEventEmitter.addListener(_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_JOIN, this.onJoinListener);
|
|
121
73
|
HmsEventEmitter.addListener(_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ROOM_UPDATE, this.onRoomListener);
|
|
122
74
|
HmsEventEmitter.addListener(_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PEER_UPDATE, this.onPeerListener);
|
|
@@ -136,9 +88,9 @@ class HMSSDK {
|
|
|
136
88
|
HmsEventEmitter.addListener(_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOTE_VIDEO_STATS, this.onRemoteVideoStatsListener);
|
|
137
89
|
HmsEventEmitter.addListener(_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_AUDIO_DEVICE_CHANGED, this.onAudioDeviceChangedListener);
|
|
138
90
|
});
|
|
139
|
-
|
|
140
91
|
_defineProperty(this, "removeListeners", () => {
|
|
141
92
|
HmsEventEmitter.removeListener(_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_JOIN, this.onJoinListener);
|
|
93
|
+
HmsEventEmitter.removeListener(_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PREVIEW, this.onPreviewListener);
|
|
142
94
|
HmsEventEmitter.removeListener(_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ROOM_UPDATE, this.onRoomListener);
|
|
143
95
|
HmsEventEmitter.removeListener(_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PEER_UPDATE, this.onPeerListener);
|
|
144
96
|
HmsEventEmitter.removeListener(_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_TRACK_UPDATE, this.onTrackListener);
|
|
@@ -157,34 +109,32 @@ class HMSSDK {
|
|
|
157
109
|
HmsEventEmitter.removeListener(_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOTE_VIDEO_STATS, this.onRemoteVideoStatsListener);
|
|
158
110
|
HmsEventEmitter.removeListener(_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_AUDIO_DEVICE_CHANGED, this.onAudioDeviceChangedListener);
|
|
159
111
|
});
|
|
160
|
-
|
|
161
112
|
_defineProperty(this, "join", async config => {
|
|
162
113
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function join', {
|
|
163
114
|
config,
|
|
164
115
|
id: this.id
|
|
165
116
|
});
|
|
166
117
|
this.addAppStateListener();
|
|
167
|
-
await HMSManager.join({
|
|
118
|
+
await HMSManager.join({
|
|
119
|
+
...config,
|
|
168
120
|
id: this.id
|
|
169
121
|
});
|
|
170
122
|
});
|
|
171
|
-
|
|
172
123
|
_defineProperty(this, "preview", config => {
|
|
173
124
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function preview', {
|
|
174
125
|
config,
|
|
175
126
|
id: this.id
|
|
176
127
|
});
|
|
177
|
-
HMSManager.preview({
|
|
128
|
+
HMSManager.preview({
|
|
129
|
+
...config,
|
|
178
130
|
id: this.id
|
|
179
131
|
});
|
|
180
132
|
});
|
|
181
|
-
|
|
182
133
|
_defineProperty(this, "previewForRole", async role => {
|
|
183
134
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function previewForRole', {
|
|
184
135
|
role,
|
|
185
136
|
id: this.id
|
|
186
137
|
});
|
|
187
|
-
|
|
188
138
|
if (_reactNative.Platform.OS === 'ios') {
|
|
189
139
|
return await HMSManager.previewForRole({
|
|
190
140
|
role: role === null || role === void 0 ? void 0 : role.name,
|
|
@@ -195,7 +145,6 @@ class HMSSDK {
|
|
|
195
145
|
return 'API currently not available for android';
|
|
196
146
|
}
|
|
197
147
|
});
|
|
198
|
-
|
|
199
148
|
_defineProperty(this, "HmsView", /*#__PURE__*/_react.default.forwardRef((props, ref) => {
|
|
200
149
|
const {
|
|
201
150
|
trackId,
|
|
@@ -214,10 +163,8 @@ class HMSSDK {
|
|
|
214
163
|
id: this.id
|
|
215
164
|
});
|
|
216
165
|
}));
|
|
217
|
-
|
|
218
166
|
_defineProperty(this, "leave", async () => {
|
|
219
167
|
var _this$appStateSubscri;
|
|
220
|
-
|
|
221
168
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function leave', {
|
|
222
169
|
id: this.id
|
|
223
170
|
});
|
|
@@ -226,16 +173,11 @@ class HMSSDK {
|
|
|
226
173
|
};
|
|
227
174
|
const op = await HMSManager.leave(data);
|
|
228
175
|
this.muteStatus = undefined;
|
|
229
|
-
this.localPeer = undefined;
|
|
230
|
-
this.remotePeers = undefined;
|
|
231
|
-
this.room = undefined;
|
|
232
|
-
this.knownRoles = undefined;
|
|
233
176
|
this === null || this === void 0 ? void 0 : (_this$appStateSubscri = this.appStateSubscription) === null || _this$appStateSubscri === void 0 ? void 0 : _this$appStateSubscri.remove();
|
|
234
177
|
return op;
|
|
235
178
|
});
|
|
236
|
-
|
|
237
179
|
_defineProperty(this, "sendBroadcastMessage", async function (message) {
|
|
238
|
-
let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] :
|
|
180
|
+
let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _HMSMessageType.HMSMessageType.CHAT;
|
|
239
181
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function sendBroadcastMessage', {
|
|
240
182
|
message,
|
|
241
183
|
type: type || null,
|
|
@@ -247,9 +189,8 @@ class HMSSDK {
|
|
|
247
189
|
id: _this.id
|
|
248
190
|
});
|
|
249
191
|
});
|
|
250
|
-
|
|
251
192
|
_defineProperty(this, "sendGroupMessage", async function (message, roles) {
|
|
252
|
-
let type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] :
|
|
193
|
+
let type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _HMSMessageType.HMSMessageType.CHAT;
|
|
253
194
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function sendGroupMessage', {
|
|
254
195
|
message,
|
|
255
196
|
roles,
|
|
@@ -263,9 +204,8 @@ class HMSSDK {
|
|
|
263
204
|
type: type || null
|
|
264
205
|
});
|
|
265
206
|
});
|
|
266
|
-
|
|
267
207
|
_defineProperty(this, "sendDirectMessage", async function (message, peer) {
|
|
268
|
-
let type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] :
|
|
208
|
+
let type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _HMSMessageType.HMSMessageType.CHAT;
|
|
269
209
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function sendDirectMessage', {
|
|
270
210
|
message,
|
|
271
211
|
peerId: peer.peerID,
|
|
@@ -279,7 +219,6 @@ class HMSSDK {
|
|
|
279
219
|
type: type || null
|
|
280
220
|
});
|
|
281
221
|
});
|
|
282
|
-
|
|
283
222
|
_defineProperty(this, "changeMetadata", async metadata => {
|
|
284
223
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function changeMetadata', {
|
|
285
224
|
metadata,
|
|
@@ -290,17 +229,17 @@ class HMSSDK {
|
|
|
290
229
|
id: this.id
|
|
291
230
|
});
|
|
292
231
|
});
|
|
293
|
-
|
|
294
232
|
_defineProperty(this, "startRTMPOrRecording", async data => {
|
|
295
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function startRTMPOrRecording', {
|
|
233
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function startRTMPOrRecording', {
|
|
234
|
+
...data,
|
|
296
235
|
id: this.id
|
|
297
236
|
});
|
|
298
|
-
const op = await HMSManager.startRTMPOrRecording({
|
|
237
|
+
const op = await HMSManager.startRTMPOrRecording({
|
|
238
|
+
...data,
|
|
299
239
|
id: this.id
|
|
300
240
|
});
|
|
301
241
|
return op;
|
|
302
242
|
});
|
|
303
|
-
|
|
304
243
|
_defineProperty(this, "stopRtmpAndRecording", async () => {
|
|
305
244
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function stopRtmpAndRecording', {});
|
|
306
245
|
const op = await HMSManager.stopRtmpAndRecording({
|
|
@@ -308,23 +247,22 @@ class HMSSDK {
|
|
|
308
247
|
});
|
|
309
248
|
return op;
|
|
310
249
|
});
|
|
311
|
-
|
|
312
250
|
_defineProperty(this, "startHLSStreaming", async data => {
|
|
313
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function startHLSStreaming', {
|
|
251
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function startHLSStreaming', {
|
|
252
|
+
...data,
|
|
314
253
|
id: this.id
|
|
315
254
|
});
|
|
316
|
-
return await HMSManager.startHLSStreaming({
|
|
255
|
+
return await HMSManager.startHLSStreaming({
|
|
256
|
+
...data,
|
|
317
257
|
id: this.id
|
|
318
258
|
});
|
|
319
259
|
});
|
|
320
|
-
|
|
321
260
|
_defineProperty(this, "stopHLSStreaming", async () => {
|
|
322
261
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function stopHLSStreaming', {});
|
|
323
262
|
return await HMSManager.stopHLSStreaming({
|
|
324
263
|
id: this.id
|
|
325
264
|
});
|
|
326
265
|
});
|
|
327
|
-
|
|
328
266
|
_defineProperty(this, "changeRole", async function (peer, role) {
|
|
329
267
|
let force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
330
268
|
const data = {
|
|
@@ -336,7 +274,6 @@ class HMSSDK {
|
|
|
336
274
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function changeRole', data);
|
|
337
275
|
return await HMSManager.changeRole(data);
|
|
338
276
|
});
|
|
339
|
-
|
|
340
277
|
_defineProperty(this, "changeTrackState", async (track, mute) => {
|
|
341
278
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function changeTrackState', {
|
|
342
279
|
track,
|
|
@@ -350,14 +287,11 @@ class HMSSDK {
|
|
|
350
287
|
};
|
|
351
288
|
return await HMSManager.changeTrackState(data);
|
|
352
289
|
});
|
|
353
|
-
|
|
354
290
|
_defineProperty(this, "changeTrackStateForRoles", async (mute, type, source, roles) => {
|
|
355
291
|
let roleNames = null;
|
|
356
|
-
|
|
357
292
|
if (roles) {
|
|
358
293
|
roleNames = _HMSHelper.HMSHelper.getRoleNames(roles);
|
|
359
294
|
}
|
|
360
|
-
|
|
361
295
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function changeTrackStateRoles', {
|
|
362
296
|
source,
|
|
363
297
|
mute,
|
|
@@ -374,7 +308,6 @@ class HMSSDK {
|
|
|
374
308
|
};
|
|
375
309
|
return await HMSManager.changeTrackStateForRoles(data);
|
|
376
310
|
});
|
|
377
|
-
|
|
378
311
|
_defineProperty(this, "removePeer", async (peer, reason) => {
|
|
379
312
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function removePeer', {
|
|
380
313
|
peerId: peer.peerID,
|
|
@@ -388,7 +321,6 @@ class HMSSDK {
|
|
|
388
321
|
};
|
|
389
322
|
return await HMSManager.removePeer(data);
|
|
390
323
|
});
|
|
391
|
-
|
|
392
324
|
_defineProperty(this, "endRoom", async function (reason) {
|
|
393
325
|
let lock = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
394
326
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function endRoom', {
|
|
@@ -403,7 +335,6 @@ class HMSSDK {
|
|
|
403
335
|
};
|
|
404
336
|
return await HMSManager.endRoom(data);
|
|
405
337
|
});
|
|
406
|
-
|
|
407
338
|
_defineProperty(this, "changeName", async name => {
|
|
408
339
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function changeName', {
|
|
409
340
|
name,
|
|
@@ -415,7 +346,6 @@ class HMSSDK {
|
|
|
415
346
|
};
|
|
416
347
|
return await HMSManager.changeName(data);
|
|
417
348
|
});
|
|
418
|
-
|
|
419
349
|
_defineProperty(this, "acceptRoleChange", async () => {
|
|
420
350
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function acceptRoleChange', {
|
|
421
351
|
id: this.id
|
|
@@ -424,7 +354,6 @@ class HMSSDK {
|
|
|
424
354
|
id: this.id
|
|
425
355
|
});
|
|
426
356
|
});
|
|
427
|
-
|
|
428
357
|
_defineProperty(this, "setPlaybackForAllAudio", mute => {
|
|
429
358
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function setPlaybackForAllAudio', {
|
|
430
359
|
mute,
|
|
@@ -436,7 +365,6 @@ class HMSSDK {
|
|
|
436
365
|
id: this.id
|
|
437
366
|
});
|
|
438
367
|
});
|
|
439
|
-
|
|
440
368
|
_defineProperty(this, "remoteMuteAllAudio", async () => {
|
|
441
369
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function remoteMuteAllAudio', {
|
|
442
370
|
id: this.id
|
|
@@ -445,23 +373,46 @@ class HMSSDK {
|
|
|
445
373
|
id: this.id
|
|
446
374
|
});
|
|
447
375
|
});
|
|
448
|
-
|
|
449
376
|
_defineProperty(this, "getRoom", async () => {
|
|
450
|
-
var _this$room;
|
|
451
|
-
|
|
452
377
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function getRoom', {
|
|
453
|
-
roomID: (_this$room = this.room) === null || _this$room === void 0 ? void 0 : _this$room.id,
|
|
454
378
|
id: this.id
|
|
455
379
|
});
|
|
456
380
|
const hmsRoom = await HMSManager.getRoom({
|
|
457
381
|
id: this.id
|
|
458
382
|
});
|
|
459
|
-
|
|
460
383
|
const encodedHmsRoom = _HMSEncoder.HMSEncoder.encodeHmsRoom(hmsRoom, this.id);
|
|
461
|
-
|
|
462
384
|
return encodedHmsRoom;
|
|
463
385
|
});
|
|
464
|
-
|
|
386
|
+
_defineProperty(this, "getLocalPeer", async () => {
|
|
387
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function getLocalPeer', {
|
|
388
|
+
id: this.id
|
|
389
|
+
});
|
|
390
|
+
const localPeer = await HMSManager.getLocalPeer({
|
|
391
|
+
id: this.id
|
|
392
|
+
});
|
|
393
|
+
const encodedLocalPeer = _HMSEncoder.HMSEncoder.encodeHmsLocalPeer(localPeer, this.id);
|
|
394
|
+
return encodedLocalPeer;
|
|
395
|
+
});
|
|
396
|
+
_defineProperty(this, "getRemotePeers", async () => {
|
|
397
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function getRemotePeers', {
|
|
398
|
+
id: this.id
|
|
399
|
+
});
|
|
400
|
+
const remotePeers = await HMSManager.getRemotePeers({
|
|
401
|
+
id: this.id
|
|
402
|
+
});
|
|
403
|
+
const encodedRemotePeers = _HMSEncoder.HMSEncoder.encodeHmsRemotePeers(remotePeers, this.id);
|
|
404
|
+
return encodedRemotePeers;
|
|
405
|
+
});
|
|
406
|
+
_defineProperty(this, "getRoles", async () => {
|
|
407
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function getRoles', {
|
|
408
|
+
id: this.id
|
|
409
|
+
});
|
|
410
|
+
const roles = await HMSManager.getRoles({
|
|
411
|
+
id: this.id
|
|
412
|
+
});
|
|
413
|
+
const encodedRoles = _HMSEncoder.HMSEncoder.encodeHmsRoles(roles);
|
|
414
|
+
return encodedRoles;
|
|
415
|
+
});
|
|
465
416
|
_defineProperty(this, "setVolume", (track, volume) => {
|
|
466
417
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function setVolume', {
|
|
467
418
|
track,
|
|
@@ -474,7 +425,6 @@ class HMSSDK {
|
|
|
474
425
|
volume
|
|
475
426
|
});
|
|
476
427
|
});
|
|
477
|
-
|
|
478
428
|
_defineProperty(this, "resetVolume", () => {
|
|
479
429
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function resetVolume', {
|
|
480
430
|
id: this.id
|
|
@@ -483,7 +433,6 @@ class HMSSDK {
|
|
|
483
433
|
id: this.id
|
|
484
434
|
});
|
|
485
435
|
});
|
|
486
|
-
|
|
487
436
|
_defineProperty(this, "addAppStateListener", () => {
|
|
488
437
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function addAppStateListener', {
|
|
489
438
|
id: this.id
|
|
@@ -494,7 +443,6 @@ class HMSSDK {
|
|
|
494
443
|
}
|
|
495
444
|
});
|
|
496
445
|
});
|
|
497
|
-
|
|
498
446
|
_defineProperty(this, "startScreenshare", async () => {
|
|
499
447
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function startScreenshare', {
|
|
500
448
|
id: this.id
|
|
@@ -503,7 +451,6 @@ class HMSSDK {
|
|
|
503
451
|
id: this.id
|
|
504
452
|
});
|
|
505
453
|
});
|
|
506
|
-
|
|
507
454
|
_defineProperty(this, "isScreenShared", async () => {
|
|
508
455
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function isScreenShared', {
|
|
509
456
|
id: this.id
|
|
@@ -512,7 +459,6 @@ class HMSSDK {
|
|
|
512
459
|
id: this.id
|
|
513
460
|
});
|
|
514
461
|
});
|
|
515
|
-
|
|
516
462
|
_defineProperty(this, "stopScreenshare", async () => {
|
|
517
463
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function stopScreenshare', {
|
|
518
464
|
id: this.id
|
|
@@ -521,7 +467,6 @@ class HMSSDK {
|
|
|
521
467
|
id: this.id
|
|
522
468
|
});
|
|
523
469
|
});
|
|
524
|
-
|
|
525
470
|
_defineProperty(this, "enableRTCStats", () => {
|
|
526
471
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function enableRTCStats', {
|
|
527
472
|
id: this.id
|
|
@@ -530,7 +475,6 @@ class HMSSDK {
|
|
|
530
475
|
id: this.id
|
|
531
476
|
});
|
|
532
477
|
});
|
|
533
|
-
|
|
534
478
|
_defineProperty(this, "disableRTCStats", () => {
|
|
535
479
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function disableRTCStats', {
|
|
536
480
|
id: this.id
|
|
@@ -539,13 +483,27 @@ class HMSSDK {
|
|
|
539
483
|
id: this.id
|
|
540
484
|
});
|
|
541
485
|
});
|
|
542
|
-
|
|
486
|
+
_defineProperty(this, "enableNetworkQualityUpdates", () => {
|
|
487
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function enableNetworkQualityUpdates', {
|
|
488
|
+
id: this.id
|
|
489
|
+
});
|
|
490
|
+
HMSManager.enableNetworkQualityUpdates({
|
|
491
|
+
id: this.id
|
|
492
|
+
});
|
|
493
|
+
});
|
|
494
|
+
_defineProperty(this, "disableNetworkQualityUpdates", () => {
|
|
495
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function disableNetworkQualityUpdates', {
|
|
496
|
+
id: this.id
|
|
497
|
+
});
|
|
498
|
+
HMSManager.disableNetworkQualityUpdates({
|
|
499
|
+
id: this.id
|
|
500
|
+
});
|
|
501
|
+
});
|
|
543
502
|
_defineProperty(this, "startAudioshare", async audioMixingMode => {
|
|
544
503
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function startAudioshare', {
|
|
545
504
|
id: this.id,
|
|
546
505
|
audioMixingMode
|
|
547
506
|
});
|
|
548
|
-
|
|
549
507
|
if (_reactNative.Platform.OS === 'android') {
|
|
550
508
|
return await HMSManager.startAudioshare({
|
|
551
509
|
id: this.id,
|
|
@@ -556,12 +514,10 @@ class HMSSDK {
|
|
|
556
514
|
return 'API currently not available for iOS';
|
|
557
515
|
}
|
|
558
516
|
});
|
|
559
|
-
|
|
560
517
|
_defineProperty(this, "isAudioShared", async () => {
|
|
561
518
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function isAudioShared', {
|
|
562
519
|
id: this.id
|
|
563
520
|
});
|
|
564
|
-
|
|
565
521
|
if (_reactNative.Platform.OS === 'android') {
|
|
566
522
|
return await HMSManager.isAudioShared({
|
|
567
523
|
id: this.id
|
|
@@ -571,12 +527,10 @@ class HMSSDK {
|
|
|
571
527
|
return 'API currently not available for iOS';
|
|
572
528
|
}
|
|
573
529
|
});
|
|
574
|
-
|
|
575
530
|
_defineProperty(this, "stopAudioshare", async () => {
|
|
576
531
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function stopAudioshare', {
|
|
577
532
|
id: this.id
|
|
578
533
|
});
|
|
579
|
-
|
|
580
534
|
if (_reactNative.Platform.OS === 'android') {
|
|
581
535
|
return await HMSManager.stopAudioshare({
|
|
582
536
|
id: this.id
|
|
@@ -586,12 +540,10 @@ class HMSSDK {
|
|
|
586
540
|
return 'API currently not available for iOS';
|
|
587
541
|
}
|
|
588
542
|
});
|
|
589
|
-
|
|
590
543
|
_defineProperty(this, "getAudioMixingMode", async () => {
|
|
591
544
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function getAudioMixingMode', {
|
|
592
545
|
id: this.id
|
|
593
546
|
});
|
|
594
|
-
|
|
595
547
|
if (_reactNative.Platform.OS === 'android') {
|
|
596
548
|
return await HMSManager.getAudioMixingMode({
|
|
597
549
|
id: this.id
|
|
@@ -601,13 +553,11 @@ class HMSSDK {
|
|
|
601
553
|
return 'API currently not available for iOS';
|
|
602
554
|
}
|
|
603
555
|
});
|
|
604
|
-
|
|
605
556
|
_defineProperty(this, "setAudioMixingMode", async audioMixingMode => {
|
|
606
557
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function setAudioMixingMode', {
|
|
607
558
|
id: this.id,
|
|
608
559
|
audioMixingMode
|
|
609
560
|
});
|
|
610
|
-
|
|
611
561
|
if (_reactNative.Platform.OS === 'android') {
|
|
612
562
|
return await HMSManager.setAudioMixingMode({
|
|
613
563
|
id: this.id,
|
|
@@ -618,12 +568,10 @@ class HMSSDK {
|
|
|
618
568
|
return 'API currently not available for iOS';
|
|
619
569
|
}
|
|
620
570
|
});
|
|
621
|
-
|
|
622
571
|
_defineProperty(this, "getAudioDevicesList", async () => {
|
|
623
572
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function getAudioDevicesList', {
|
|
624
573
|
id: this.id
|
|
625
574
|
});
|
|
626
|
-
|
|
627
575
|
if (_reactNative.Platform.OS === 'android') {
|
|
628
576
|
return await HMSManager.getAudioDevicesList({
|
|
629
577
|
id: this.id
|
|
@@ -633,12 +581,10 @@ class HMSSDK {
|
|
|
633
581
|
return 'API currently not available for iOS';
|
|
634
582
|
}
|
|
635
583
|
});
|
|
636
|
-
|
|
637
584
|
_defineProperty(this, "getAudioOutputRouteType", async () => {
|
|
638
585
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function getAudioOutputRouteType', {
|
|
639
586
|
id: this.id
|
|
640
587
|
});
|
|
641
|
-
|
|
642
588
|
if (_reactNative.Platform.OS === 'android') {
|
|
643
589
|
return await HMSManager.getAudioOutputRouteType({
|
|
644
590
|
id: this.id
|
|
@@ -648,13 +594,11 @@ class HMSSDK {
|
|
|
648
594
|
return 'API currently not available for iOS';
|
|
649
595
|
}
|
|
650
596
|
});
|
|
651
|
-
|
|
652
597
|
_defineProperty(this, "switchAudioOutput", audioDevice => {
|
|
653
598
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function switchAudioOutput', {
|
|
654
599
|
id: this.id,
|
|
655
600
|
audioDevice
|
|
656
601
|
});
|
|
657
|
-
|
|
658
602
|
if (_reactNative.Platform.OS === 'android') {
|
|
659
603
|
return HMSManager.switchAudioOutput({
|
|
660
604
|
id: this.id,
|
|
@@ -665,13 +609,11 @@ class HMSSDK {
|
|
|
665
609
|
return 'API currently not available for iOS';
|
|
666
610
|
}
|
|
667
611
|
});
|
|
668
|
-
|
|
669
612
|
_defineProperty(this, "setAudioMode", audioMode => {
|
|
670
613
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function setAudioMode', {
|
|
671
614
|
id: this.id,
|
|
672
615
|
audioMode
|
|
673
616
|
});
|
|
674
|
-
|
|
675
617
|
if (_reactNative.Platform.OS === 'android') {
|
|
676
618
|
return HMSManager.setAudioMode({
|
|
677
619
|
id: this.id,
|
|
@@ -682,12 +624,10 @@ class HMSSDK {
|
|
|
682
624
|
return 'API currently not available for iOS';
|
|
683
625
|
}
|
|
684
626
|
});
|
|
685
|
-
|
|
686
627
|
_defineProperty(this, "setAudioDeviceChangeListener", callback => {
|
|
687
628
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function setAudioDeviceChangeListener', {
|
|
688
629
|
id: this.id
|
|
689
630
|
});
|
|
690
|
-
|
|
691
631
|
if (_reactNative.Platform.OS === 'android') {
|
|
692
632
|
this.addEventListener(_HMSUpdateListenerActions.HMSUpdateListenerActions.ON_AUDIO_DEVICE_CHANGED, callback);
|
|
693
633
|
return HMSManager.setAudioDeviceChangeListener({
|
|
@@ -698,181 +638,156 @@ class HMSSDK {
|
|
|
698
638
|
return 'API currently not available for iOS';
|
|
699
639
|
}
|
|
700
640
|
});
|
|
701
|
-
|
|
641
|
+
_defineProperty(this, "setSessionMetaData", async sessionMetaData => {
|
|
642
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function setSessionMetaData', {
|
|
643
|
+
id: this.id,
|
|
644
|
+
sessionMetaData
|
|
645
|
+
});
|
|
646
|
+
return await HMSManager.setSessionMetaData({
|
|
647
|
+
id: this.id,
|
|
648
|
+
sessionMetaData
|
|
649
|
+
});
|
|
650
|
+
});
|
|
651
|
+
_defineProperty(this, "getSessionMetaData", async () => {
|
|
652
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function getSessionMetaData', {
|
|
653
|
+
id: this.id
|
|
654
|
+
});
|
|
655
|
+
return await HMSManager.getSessionMetaData({
|
|
656
|
+
id: this.id
|
|
657
|
+
});
|
|
658
|
+
});
|
|
702
659
|
_defineProperty(this, "addEventListener", (action, callback) => {
|
|
703
660
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function addEventListener', {
|
|
704
661
|
action,
|
|
705
662
|
id: this.id
|
|
706
663
|
});
|
|
707
|
-
|
|
708
664
|
switch (action) {
|
|
709
665
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PREVIEW:
|
|
710
666
|
this.onPreviewDelegate = callback;
|
|
711
667
|
break;
|
|
712
|
-
|
|
713
668
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_JOIN:
|
|
714
669
|
this.onJoinDelegate = callback;
|
|
715
670
|
break;
|
|
716
|
-
|
|
717
671
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ROOM_UPDATE:
|
|
718
672
|
this.onRoomDelegate = callback;
|
|
719
673
|
break;
|
|
720
|
-
|
|
721
674
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PEER_UPDATE:
|
|
722
675
|
this.onPeerDelegate = callback;
|
|
723
676
|
break;
|
|
724
|
-
|
|
725
677
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_TRACK_UPDATE:
|
|
726
678
|
this.onTrackDelegate = callback;
|
|
727
679
|
break;
|
|
728
|
-
|
|
729
680
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ERROR:
|
|
730
681
|
this.onErrorDelegate = callback;
|
|
731
682
|
break;
|
|
732
|
-
|
|
733
683
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_MESSAGE:
|
|
734
684
|
this.onMessageDelegate = callback;
|
|
735
685
|
break;
|
|
736
|
-
|
|
737
686
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_SPEAKER:
|
|
738
687
|
this.onSpeakerDelegate = callback;
|
|
739
688
|
break;
|
|
740
|
-
|
|
741
689
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.RECONNECTING:
|
|
742
690
|
this.onReconnectingDelegate = callback;
|
|
743
691
|
break;
|
|
744
|
-
|
|
745
692
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.RECONNECTED:
|
|
746
693
|
this.onReconnectedDelegate = callback;
|
|
747
694
|
break;
|
|
748
|
-
|
|
749
695
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ROLE_CHANGE_REQUEST:
|
|
750
696
|
this.onRoleChangeRequestDelegate = callback;
|
|
751
697
|
break;
|
|
752
|
-
|
|
753
698
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_CHANGE_TRACK_STATE_REQUEST:
|
|
754
699
|
this.onChangeTrackStateRequestDelegate = callback;
|
|
755
700
|
break;
|
|
756
|
-
|
|
757
701
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOVED_FROM_ROOM:
|
|
758
702
|
this.onRemovedFromRoomDelegate = callback;
|
|
759
703
|
break;
|
|
760
|
-
|
|
761
704
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_RTC_STATS:
|
|
762
705
|
this.onRtcStatsDelegate = callback;
|
|
763
706
|
break;
|
|
764
|
-
|
|
765
707
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_LOCAL_AUDIO_STATS:
|
|
766
708
|
this.onLocalAudioStatsDelegate = callback;
|
|
767
709
|
break;
|
|
768
|
-
|
|
769
710
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_LOCAL_VIDEO_STATS:
|
|
770
711
|
this.onLocalVideoStatsDelegate = callback;
|
|
771
712
|
break;
|
|
772
|
-
|
|
773
713
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOTE_AUDIO_STATS:
|
|
774
714
|
this.onRemoteAudioStatsDelegate = callback;
|
|
775
715
|
break;
|
|
776
|
-
|
|
777
716
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOTE_VIDEO_STATS:
|
|
778
717
|
this.onRemoteVideoStatsDelegate = callback;
|
|
779
718
|
break;
|
|
780
|
-
|
|
781
719
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_AUDIO_DEVICE_CHANGED:
|
|
782
720
|
this.onAudioDeviceChangedDelegate = callback;
|
|
783
721
|
break;
|
|
784
|
-
|
|
785
722
|
default:
|
|
786
723
|
}
|
|
787
724
|
});
|
|
788
|
-
|
|
789
725
|
_defineProperty(this, "removeEventListener", action => {
|
|
790
726
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Function removeEventListener', {
|
|
791
727
|
action,
|
|
792
728
|
id: this.id
|
|
793
729
|
});
|
|
794
|
-
|
|
795
730
|
switch (action) {
|
|
796
731
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PREVIEW:
|
|
797
732
|
this.onPreviewDelegate = null;
|
|
798
733
|
break;
|
|
799
|
-
|
|
800
734
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_JOIN:
|
|
801
735
|
this.onJoinDelegate = null;
|
|
802
736
|
break;
|
|
803
|
-
|
|
804
737
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ROOM_UPDATE:
|
|
805
738
|
this.onRoomDelegate = null;
|
|
806
739
|
break;
|
|
807
|
-
|
|
808
740
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_PEER_UPDATE:
|
|
809
741
|
this.onPeerDelegate = null;
|
|
810
742
|
break;
|
|
811
|
-
|
|
812
743
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_TRACK_UPDATE:
|
|
813
744
|
this.onTrackDelegate = null;
|
|
814
745
|
break;
|
|
815
|
-
|
|
816
746
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ERROR:
|
|
817
747
|
this.onErrorDelegate = null;
|
|
818
748
|
break;
|
|
819
|
-
|
|
820
749
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_MESSAGE:
|
|
821
750
|
this.onMessageDelegate = null;
|
|
822
751
|
break;
|
|
823
|
-
|
|
824
752
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_SPEAKER:
|
|
825
753
|
this.onSpeakerDelegate = null;
|
|
826
754
|
break;
|
|
827
|
-
|
|
828
755
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.RECONNECTING:
|
|
829
756
|
this.onReconnectingDelegate = null;
|
|
830
757
|
break;
|
|
831
|
-
|
|
832
758
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.RECONNECTED:
|
|
833
759
|
this.onReconnectedDelegate = null;
|
|
834
760
|
break;
|
|
835
|
-
|
|
836
761
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_ROLE_CHANGE_REQUEST:
|
|
837
762
|
this.onRoleChangeRequestDelegate = null;
|
|
838
763
|
break;
|
|
839
|
-
|
|
840
764
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_CHANGE_TRACK_STATE_REQUEST:
|
|
841
765
|
this.onChangeTrackStateRequestDelegate = null;
|
|
842
766
|
break;
|
|
843
|
-
|
|
844
767
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOVED_FROM_ROOM:
|
|
845
768
|
this.onRemovedFromRoomDelegate = null;
|
|
846
769
|
break;
|
|
847
|
-
|
|
848
770
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_RTC_STATS:
|
|
849
771
|
this.onRtcStatsDelegate = null;
|
|
850
772
|
break;
|
|
851
|
-
|
|
852
773
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_LOCAL_AUDIO_STATS:
|
|
853
774
|
this.onLocalAudioStatsDelegate = null;
|
|
854
775
|
break;
|
|
855
|
-
|
|
856
776
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_LOCAL_VIDEO_STATS:
|
|
857
777
|
this.onLocalVideoStatsDelegate = null;
|
|
858
778
|
break;
|
|
859
|
-
|
|
860
779
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOTE_AUDIO_STATS:
|
|
861
780
|
this.onRemoteAudioStatsDelegate = null;
|
|
862
781
|
break;
|
|
863
|
-
|
|
864
782
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_REMOTE_VIDEO_STATS:
|
|
865
783
|
this.onRemoteVideoStatsDelegate = null;
|
|
866
784
|
break;
|
|
867
|
-
|
|
868
785
|
case _HMSUpdateListenerActions.HMSUpdateListenerActions.ON_AUDIO_DEVICE_CHANGED:
|
|
869
786
|
this.onAudioDeviceChangedDelegate = null;
|
|
870
787
|
break;
|
|
871
|
-
|
|
872
788
|
default:
|
|
873
789
|
}
|
|
874
790
|
});
|
|
875
|
-
|
|
876
791
|
_defineProperty(this, "removeAllListeners", () => {
|
|
877
792
|
this.onPreviewDelegate = null;
|
|
878
793
|
this.onJoinDelegate = null;
|
|
@@ -891,267 +806,152 @@ class HMSSDK {
|
|
|
891
806
|
id: this.id
|
|
892
807
|
});
|
|
893
808
|
});
|
|
894
|
-
|
|
895
809
|
_defineProperty(this, "onPreviewListener", data => {
|
|
896
810
|
if (data.id !== this.id) {
|
|
897
811
|
return;
|
|
898
812
|
}
|
|
899
|
-
|
|
900
813
|
const room = _HMSEncoder.HMSEncoder.encodeHmsRoom(data.room, this.id);
|
|
901
|
-
|
|
902
|
-
const localPeer = _HMSEncoder.HMSEncoder.encodeHmsLocalPeer(data.localPeer, this.id);
|
|
903
|
-
|
|
904
|
-
const previewTracks = _HMSEncoder.HMSEncoder.encodeHmsPreviewTracks(data.previewTracks);
|
|
905
|
-
|
|
906
|
-
this.localPeer = localPeer;
|
|
907
|
-
this.room = room;
|
|
908
|
-
|
|
814
|
+
const previewTracks = _HMSEncoder.HMSEncoder.encodeHmsPreviewTracks(data.previewTracks, this.id);
|
|
909
815
|
if (this.onPreviewDelegate) {
|
|
910
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_PREVIEW_LISTENER_CALL', {
|
|
816
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_PREVIEW_LISTENER_CALL', {
|
|
911
817
|
room,
|
|
912
|
-
localPeer,
|
|
913
818
|
previewTracks
|
|
914
819
|
});
|
|
915
|
-
this.onPreviewDelegate({
|
|
820
|
+
this.onPreviewDelegate({
|
|
916
821
|
room,
|
|
917
|
-
localPeer,
|
|
918
822
|
previewTracks
|
|
919
823
|
});
|
|
920
|
-
} else {
|
|
921
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_PREVIEW', data);
|
|
922
824
|
}
|
|
923
825
|
});
|
|
924
|
-
|
|
925
826
|
_defineProperty(this, "onJoinListener", data => {
|
|
926
827
|
if (data.id !== this.id) {
|
|
927
828
|
return;
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
|
|
829
|
+
}
|
|
931
830
|
const room = _HMSEncoder.HMSEncoder.encodeHmsRoom(data.room, this.id);
|
|
932
|
-
|
|
933
|
-
const localPeer = _HMSEncoder.HMSEncoder.encodeHmsLocalPeer(data.localPeer, this.id);
|
|
934
|
-
|
|
935
|
-
const remotePeers = _HMSEncoder.HMSEncoder.encodeHmsRemotePeers(data.remotePeers, this.id);
|
|
936
|
-
|
|
937
|
-
const roles = _HMSEncoder.HMSEncoder.encodeHmsRoles(data.roles);
|
|
938
|
-
|
|
939
|
-
this.room = room;
|
|
940
|
-
this.localPeer = localPeer;
|
|
941
|
-
this.remotePeers = remotePeers;
|
|
942
|
-
this.knownRoles = roles;
|
|
943
|
-
|
|
944
831
|
if (this.onJoinDelegate) {
|
|
945
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_JOIN_LISTENER_CALL', {
|
|
946
|
-
room
|
|
947
|
-
localPeer,
|
|
948
|
-
remotePeers
|
|
832
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_JOIN_LISTENER_CALL', {
|
|
833
|
+
room
|
|
949
834
|
});
|
|
950
|
-
this.onJoinDelegate({
|
|
951
|
-
room
|
|
952
|
-
localPeer,
|
|
953
|
-
remotePeers
|
|
835
|
+
this.onJoinDelegate({
|
|
836
|
+
room
|
|
954
837
|
});
|
|
955
|
-
} else {
|
|
956
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#LISTENER ON_JOIN', data);
|
|
957
838
|
}
|
|
958
839
|
});
|
|
959
|
-
|
|
960
840
|
_defineProperty(this, "onRoomListener", data => {
|
|
961
841
|
if (data.id !== this.id) {
|
|
962
842
|
return;
|
|
963
843
|
}
|
|
964
|
-
|
|
965
844
|
const room = _HMSEncoder.HMSEncoder.encodeHmsRoom(data.room, this.id);
|
|
966
|
-
|
|
967
|
-
const localPeer = _HMSEncoder.HMSEncoder.encodeHmsLocalPeer(data.localPeer, this.id);
|
|
968
|
-
|
|
969
|
-
const remotePeers = _HMSEncoder.HMSEncoder.encodeHmsRemotePeers(data.remotePeers, this.id);
|
|
970
|
-
|
|
971
|
-
this.room = room;
|
|
972
|
-
this.localPeer = localPeer;
|
|
973
|
-
this.remotePeers = remotePeers;
|
|
974
|
-
|
|
845
|
+
const type = data.type;
|
|
975
846
|
if (this.onRoomDelegate) {
|
|
976
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_ROOM_LISTENER_CALL', {
|
|
847
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_ROOM_LISTENER_CALL', {
|
|
977
848
|
room,
|
|
978
|
-
|
|
979
|
-
remotePeers
|
|
849
|
+
type
|
|
980
850
|
});
|
|
981
|
-
this.onRoomDelegate({
|
|
851
|
+
this.onRoomDelegate({
|
|
982
852
|
room,
|
|
983
|
-
|
|
984
|
-
remotePeers
|
|
853
|
+
type
|
|
985
854
|
});
|
|
986
|
-
} else {
|
|
987
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_ROOM', data);
|
|
988
855
|
}
|
|
989
856
|
});
|
|
990
|
-
|
|
991
857
|
_defineProperty(this, "onPeerListener", data => {
|
|
992
858
|
if (data.id !== this.id) {
|
|
993
859
|
return;
|
|
994
860
|
}
|
|
995
|
-
|
|
996
861
|
const peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer, this.id);
|
|
997
|
-
|
|
998
|
-
const room = _HMSEncoder.HMSEncoder.encodeHmsRoom(data.room, this.id);
|
|
999
|
-
|
|
1000
|
-
const localPeer = _HMSEncoder.HMSEncoder.encodeHmsLocalPeer(data.localPeer, this.id);
|
|
1001
|
-
|
|
1002
|
-
const remotePeers = _HMSEncoder.HMSEncoder.encodeHmsRemotePeers(data.remotePeers, this.id); // this.room = room;
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
this.localPeer = localPeer;
|
|
1006
|
-
this.remotePeers = remotePeers;
|
|
1007
|
-
this.room = room;
|
|
1008
|
-
|
|
862
|
+
const type = data.type;
|
|
1009
863
|
if (this.onPeerDelegate) {
|
|
1010
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_PEER_LISTENER_CALL', {
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
room,
|
|
1014
|
-
peer
|
|
864
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_PEER_LISTENER_CALL', {
|
|
865
|
+
peer,
|
|
866
|
+
type
|
|
1015
867
|
});
|
|
1016
|
-
this.onPeerDelegate({
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
room,
|
|
1020
|
-
peer
|
|
868
|
+
this.onPeerDelegate({
|
|
869
|
+
peer,
|
|
870
|
+
type
|
|
1021
871
|
});
|
|
1022
|
-
} else {
|
|
1023
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_PEER', data);
|
|
1024
872
|
}
|
|
1025
873
|
});
|
|
1026
|
-
|
|
1027
874
|
_defineProperty(this, "onTrackListener", data => {
|
|
1028
875
|
if (data.id !== this.id) {
|
|
1029
876
|
return;
|
|
1030
877
|
}
|
|
1031
|
-
|
|
1032
878
|
const track = _HMSEncoder.HMSEncoder.encodeHmsTrack(data.track, this.id);
|
|
1033
|
-
|
|
1034
879
|
const peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer, this.id);
|
|
1035
|
-
|
|
1036
|
-
const room = _HMSEncoder.HMSEncoder.encodeHmsRoom(data.room, this.id);
|
|
1037
|
-
|
|
1038
|
-
const localPeer = _HMSEncoder.HMSEncoder.encodeHmsLocalPeer(data.localPeer, this.id);
|
|
1039
|
-
|
|
1040
|
-
const remotePeers = _HMSEncoder.HMSEncoder.encodeHmsRemotePeers(data.remotePeers, this.id);
|
|
1041
|
-
|
|
880
|
+
const type = data.type;
|
|
1042
881
|
if (this.muteStatus && (data === null || data === void 0 ? void 0 : data.type) === 'TRACK_ADDED' && track.type === _HMSTrackType.HMSTrackType.AUDIO) {
|
|
1043
882
|
this.setPlaybackForAllAudio(this.muteStatus);
|
|
1044
883
|
}
|
|
1045
|
-
|
|
1046
|
-
this.room = room;
|
|
1047
|
-
this.localPeer = localPeer;
|
|
1048
|
-
this.remotePeers = remotePeers;
|
|
1049
|
-
|
|
1050
884
|
if (this.onTrackDelegate) {
|
|
1051
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_TRACK_LISTENER_CALL', {
|
|
1052
|
-
localPeer,
|
|
1053
|
-
remotePeers,
|
|
1054
|
-
room,
|
|
885
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_TRACK_LISTENER_CALL', {
|
|
1055
886
|
peer,
|
|
1056
|
-
track
|
|
887
|
+
track,
|
|
888
|
+
type
|
|
1057
889
|
});
|
|
1058
|
-
this.onTrackDelegate({
|
|
1059
|
-
localPeer,
|
|
1060
|
-
remotePeers,
|
|
1061
|
-
room,
|
|
890
|
+
this.onTrackDelegate({
|
|
1062
891
|
peer,
|
|
1063
|
-
track
|
|
892
|
+
track,
|
|
893
|
+
type
|
|
1064
894
|
});
|
|
1065
|
-
} else {
|
|
1066
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_TRACK', data);
|
|
1067
895
|
}
|
|
1068
896
|
});
|
|
1069
|
-
|
|
1070
897
|
_defineProperty(this, "onMessageListener", data => {
|
|
1071
898
|
if (data.id !== this.id) {
|
|
1072
899
|
return;
|
|
1073
900
|
}
|
|
1074
|
-
|
|
1075
901
|
const message = _HMSEncoder.HMSEncoder.encodeHMSMessage(data, this.id);
|
|
1076
|
-
|
|
1077
902
|
if (this.onMessageDelegate) {
|
|
1078
903
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_MESSAGE_LISTENER_CALL', message);
|
|
1079
904
|
this.onMessageDelegate(message);
|
|
1080
|
-
} else {
|
|
1081
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_MESSAGE', data);
|
|
1082
905
|
}
|
|
1083
906
|
});
|
|
1084
|
-
|
|
1085
907
|
_defineProperty(this, "onSpeakerListener", data => {
|
|
1086
908
|
if (data.id !== this.id) {
|
|
1087
909
|
return;
|
|
1088
910
|
}
|
|
1089
|
-
|
|
1090
911
|
if (this.onSpeakerDelegate) {
|
|
1091
912
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_SPEAKER_LISTENER_CALL', data === null || data === void 0 ? void 0 : data.speakers);
|
|
1092
913
|
this.onSpeakerDelegate(_HMSEncoder.HMSEncoder.encodeHmsSpeakers(data === null || data === void 0 ? void 0 : data.speakers, this.id));
|
|
1093
|
-
} else {
|
|
1094
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_SPEAKER', data === null || data === void 0 ? void 0 : data.speakers);
|
|
1095
914
|
}
|
|
1096
915
|
});
|
|
1097
|
-
|
|
1098
916
|
_defineProperty(this, "onErrorListener", data => {
|
|
1099
917
|
if (data.id !== this.id) {
|
|
1100
918
|
return;
|
|
1101
919
|
}
|
|
1102
|
-
|
|
1103
920
|
if (this.onErrorDelegate) {
|
|
1104
921
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_ERROR_LISTENER_CALL', data);
|
|
1105
922
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.warn('#Listener ON_ERROR_LISTENER_CALL', data);
|
|
1106
923
|
this.onErrorDelegate(_HMSEncoder.HMSEncoder.encodeHMSException(data));
|
|
1107
|
-
} else {
|
|
1108
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.warn('#Listener ON_ERROR', data);
|
|
1109
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_ERROR', data);
|
|
1110
924
|
}
|
|
1111
925
|
});
|
|
1112
|
-
|
|
1113
926
|
_defineProperty(this, "onRoleChangeRequestListener", data => {
|
|
1114
927
|
if (data.id !== this.id) {
|
|
1115
928
|
return;
|
|
1116
929
|
}
|
|
1117
|
-
|
|
1118
930
|
if (this.onRoleChangeRequestDelegate) {
|
|
1119
931
|
const encodedRoleChangeRequest = _HMSEncoder.HMSEncoder.encodeHmsRoleChangeRequest(data, this.id);
|
|
1120
|
-
|
|
1121
932
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_ROLE_CHANGE_LISTENER_CALL', encodedRoleChangeRequest);
|
|
1122
933
|
this.onRoleChangeRequestDelegate(encodedRoleChangeRequest);
|
|
1123
|
-
} else {
|
|
1124
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_ROLE_CHANGE_REQUEST', data);
|
|
1125
934
|
}
|
|
1126
935
|
});
|
|
1127
|
-
|
|
1128
936
|
_defineProperty(this, "onChangeTrackStateRequestListener", data => {
|
|
1129
937
|
if (data.id !== this.id) {
|
|
1130
938
|
return;
|
|
1131
939
|
}
|
|
1132
|
-
|
|
1133
940
|
if (this.onChangeTrackStateRequestDelegate) {
|
|
1134
941
|
const encodedRoleChangeRequest = _HMSEncoder.HMSEncoder.encodeHmsChangeTrackStateRequest(data, this.id);
|
|
1135
|
-
|
|
1136
942
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_CHANGE_TRACK_STATE_REQUEST_LISTENER_CALL', encodedRoleChangeRequest);
|
|
1137
943
|
this.onChangeTrackStateRequestDelegate(encodedRoleChangeRequest);
|
|
1138
|
-
} else {
|
|
1139
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_CHANGE_TRACK_STATE_REQUEST', data);
|
|
1140
944
|
}
|
|
1141
945
|
});
|
|
1142
|
-
|
|
1143
946
|
_defineProperty(this, "onRemovedFromRoomListener", data => {
|
|
1144
947
|
if (data.id !== this.id) {
|
|
1145
948
|
return;
|
|
1146
949
|
}
|
|
1147
|
-
|
|
1148
950
|
if (this.onRemovedFromRoomDelegate) {
|
|
1149
951
|
let requestedBy = null;
|
|
1150
|
-
|
|
1151
952
|
if (data.requestedBy) {
|
|
1152
953
|
requestedBy = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.requestedBy, this.id);
|
|
1153
954
|
}
|
|
1154
|
-
|
|
1155
955
|
const reason = data.reason;
|
|
1156
956
|
const roomEnded = data.roomEnded;
|
|
1157
957
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_REMOVED_FROM_ROOM_LISTENER_CALL', {
|
|
@@ -1165,46 +965,31 @@ class HMSSDK {
|
|
|
1165
965
|
reason,
|
|
1166
966
|
roomEnded
|
|
1167
967
|
});
|
|
1168
|
-
} else {
|
|
1169
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_REMOVED_FROM_ROOM', data);
|
|
1170
968
|
}
|
|
1171
969
|
});
|
|
1172
|
-
|
|
1173
970
|
_defineProperty(this, "reconnectingListener", data => {
|
|
1174
971
|
if (data.id !== this.id) {
|
|
1175
972
|
return;
|
|
1176
973
|
}
|
|
1177
|
-
|
|
1178
974
|
if (this.onReconnectingDelegate) {
|
|
1179
975
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_RECONNECTING_CALL', data);
|
|
1180
976
|
this.onReconnectingDelegate(data);
|
|
1181
|
-
} else {
|
|
1182
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_RECONNECTING', data);
|
|
1183
977
|
}
|
|
1184
978
|
});
|
|
1185
|
-
|
|
1186
979
|
_defineProperty(this, "reconnectedListener", data => {
|
|
1187
980
|
if (data.id !== this.id) {
|
|
1188
981
|
return;
|
|
1189
982
|
}
|
|
1190
|
-
|
|
1191
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_RECONNECTED', data);
|
|
1192
|
-
|
|
1193
983
|
if (this.onReconnectedDelegate) {
|
|
1194
984
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_RECONNECTED_CALL', data);
|
|
1195
985
|
this.onReconnectedDelegate(data);
|
|
1196
|
-
} else {
|
|
1197
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener ON_RECONNECTED', data);
|
|
1198
986
|
}
|
|
1199
987
|
});
|
|
1200
|
-
|
|
1201
988
|
_defineProperty(this, "RTCStatsListener", data => {
|
|
1202
989
|
if (data.id !== this.id) {
|
|
1203
990
|
return;
|
|
1204
991
|
}
|
|
1205
|
-
|
|
1206
992
|
let rtcStats = _HMSEncoder.HMSEncoder.encodeRTCStats(data);
|
|
1207
|
-
|
|
1208
993
|
if (this.onRtcStatsDelegate) {
|
|
1209
994
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener RTCStatsListener_CALL', {
|
|
1210
995
|
rtcStats
|
|
@@ -1212,176 +997,181 @@ class HMSSDK {
|
|
|
1212
997
|
this.onRtcStatsDelegate({
|
|
1213
998
|
rtcStats
|
|
1214
999
|
});
|
|
1215
|
-
} else {
|
|
1216
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener RTCStatsListener', data);
|
|
1217
1000
|
}
|
|
1218
1001
|
});
|
|
1219
|
-
|
|
1220
1002
|
_defineProperty(this, "onLocalAudioStatsListener", data => {
|
|
1221
1003
|
if (data.id !== this.id) {
|
|
1222
1004
|
return;
|
|
1223
1005
|
}
|
|
1224
|
-
|
|
1225
1006
|
let localAudioStats = new _HMSLocalAudioStats.HMSLocalAudioStats(data.localAudioStats);
|
|
1226
|
-
|
|
1227
1007
|
let peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer, this.id);
|
|
1228
|
-
|
|
1229
1008
|
let track = _HMSEncoder.HMSEncoder.encodeHmsLocalAudioTrack(data.track, this.id);
|
|
1230
|
-
|
|
1231
1009
|
if (this.onLocalAudioStatsDelegate) {
|
|
1232
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener onLocalAudioStatsListener_CALL', {
|
|
1010
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener onLocalAudioStatsListener_CALL', {
|
|
1011
|
+
...data,
|
|
1233
1012
|
localAudioStats,
|
|
1234
1013
|
peer,
|
|
1235
1014
|
track
|
|
1236
1015
|
});
|
|
1237
|
-
this.onLocalAudioStatsDelegate({
|
|
1016
|
+
this.onLocalAudioStatsDelegate({
|
|
1017
|
+
...data,
|
|
1238
1018
|
localAudioStats,
|
|
1239
1019
|
peer,
|
|
1240
1020
|
track
|
|
1241
1021
|
});
|
|
1242
|
-
} else {
|
|
1243
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener onLocalAudioStatsListener', data);
|
|
1244
1022
|
}
|
|
1245
1023
|
});
|
|
1246
|
-
|
|
1247
1024
|
_defineProperty(this, "onLocalVideoStatsListener", data => {
|
|
1248
1025
|
if (data.id !== this.id) {
|
|
1249
1026
|
return;
|
|
1250
1027
|
}
|
|
1251
|
-
|
|
1252
1028
|
let localVideoStats = new _HMSLocalVideoStats.HMSLocalVideoStats(data.localVideoStats);
|
|
1253
|
-
|
|
1254
1029
|
let peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer, this.id);
|
|
1255
|
-
|
|
1256
1030
|
let track = _HMSEncoder.HMSEncoder.encodeHmsLocalVideoTrack(data.track, this.id);
|
|
1257
|
-
|
|
1258
1031
|
if (this.onLocalVideoStatsDelegate) {
|
|
1259
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener onLocalVideoStatsListener_CALL', {
|
|
1032
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener onLocalVideoStatsListener_CALL', {
|
|
1033
|
+
...data,
|
|
1260
1034
|
localVideoStats,
|
|
1261
1035
|
peer,
|
|
1262
1036
|
track
|
|
1263
1037
|
});
|
|
1264
|
-
this.onLocalVideoStatsDelegate({
|
|
1038
|
+
this.onLocalVideoStatsDelegate({
|
|
1039
|
+
...data,
|
|
1265
1040
|
localVideoStats,
|
|
1266
1041
|
peer,
|
|
1267
1042
|
track
|
|
1268
1043
|
});
|
|
1269
|
-
} else {
|
|
1270
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener onLocalVideoStatsListener', data);
|
|
1271
1044
|
}
|
|
1272
1045
|
});
|
|
1273
|
-
|
|
1274
1046
|
_defineProperty(this, "onRemoteAudioStatsListener", data => {
|
|
1275
1047
|
if (data.id !== this.id) {
|
|
1276
1048
|
return;
|
|
1277
1049
|
}
|
|
1278
|
-
|
|
1279
1050
|
let remoteAudioStats = new _HMSRemoteAudioStats.HMSRemoteAudioStats(data.remoteAudioStats);
|
|
1280
|
-
|
|
1281
1051
|
let peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer, this.id);
|
|
1282
|
-
|
|
1283
1052
|
let track = _HMSEncoder.HMSEncoder.encodeHmsRemoteAudioTrack(data.track, this.id);
|
|
1284
|
-
|
|
1285
1053
|
if (this.onRemoteAudioStatsDelegate) {
|
|
1286
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener onRemoteAudioStatsListener_CALL', {
|
|
1054
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener onRemoteAudioStatsListener_CALL', {
|
|
1055
|
+
...data,
|
|
1287
1056
|
remoteAudioStats,
|
|
1288
1057
|
peer,
|
|
1289
1058
|
track
|
|
1290
1059
|
});
|
|
1291
|
-
this.onRemoteAudioStatsDelegate({
|
|
1060
|
+
this.onRemoteAudioStatsDelegate({
|
|
1061
|
+
...data,
|
|
1292
1062
|
remoteAudioStats,
|
|
1293
1063
|
peer,
|
|
1294
1064
|
track
|
|
1295
1065
|
});
|
|
1296
|
-
} else {
|
|
1297
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener onRemoteAudioStatsListener', data);
|
|
1298
1066
|
}
|
|
1299
1067
|
});
|
|
1300
|
-
|
|
1301
1068
|
_defineProperty(this, "onRemoteVideoStatsListener", data => {
|
|
1302
1069
|
if (data.id !== this.id) {
|
|
1303
1070
|
return;
|
|
1304
1071
|
}
|
|
1305
|
-
|
|
1306
1072
|
let remoteVideoStats = new _HMSRemoteVideoStats.HMSRemoteVideoStats(data.remoteVideoStats);
|
|
1307
|
-
|
|
1308
1073
|
let peer = _HMSEncoder.HMSEncoder.encodeHmsPeer(data.peer, this.id);
|
|
1309
|
-
|
|
1310
1074
|
let track = _HMSEncoder.HMSEncoder.encodeHmsRemoteVideoTrack(data.track, this.id);
|
|
1311
|
-
|
|
1312
1075
|
if (this.onRemoteVideoStatsDelegate) {
|
|
1313
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener onRemoteVideoStatsListener_CALL', {
|
|
1076
|
+
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener onRemoteVideoStatsListener_CALL', {
|
|
1077
|
+
...data,
|
|
1314
1078
|
remoteVideoStats,
|
|
1315
1079
|
peer,
|
|
1316
1080
|
track
|
|
1317
1081
|
});
|
|
1318
|
-
this.onRemoteVideoStatsDelegate({
|
|
1082
|
+
this.onRemoteVideoStatsDelegate({
|
|
1083
|
+
...data,
|
|
1319
1084
|
remoteVideoStats,
|
|
1320
1085
|
peer,
|
|
1321
1086
|
track
|
|
1322
1087
|
});
|
|
1323
|
-
} else {
|
|
1324
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener onRemoteVideoStatsListener', data);
|
|
1325
1088
|
}
|
|
1326
1089
|
});
|
|
1327
|
-
|
|
1328
1090
|
_defineProperty(this, "onAudioDeviceChangedListener", data => {
|
|
1329
1091
|
if (data.id !== this.id) {
|
|
1330
1092
|
return;
|
|
1331
1093
|
}
|
|
1332
|
-
|
|
1333
1094
|
if (this.onAudioDeviceChangedDelegate) {
|
|
1334
1095
|
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener onAudioDeviceChangedListener_CALL', data);
|
|
1335
|
-
this.onAudioDeviceChangedDelegate({
|
|
1096
|
+
this.onAudioDeviceChangedDelegate({
|
|
1097
|
+
...data
|
|
1336
1098
|
});
|
|
1337
|
-
} else {
|
|
1338
|
-
_HMSLogger.logger === null || _HMSLogger.logger === void 0 ? void 0 : _HMSLogger.logger.verbose('#Listener onAudioDeviceChangedListener', data);
|
|
1339
1099
|
}
|
|
1340
1100
|
});
|
|
1341
|
-
|
|
1342
1101
|
this.id = id;
|
|
1343
1102
|
}
|
|
1103
|
+
|
|
1344
1104
|
/**
|
|
1345
|
-
* - Returns an instance of [HMSSDK]{@link HMSSDK}
|
|
1105
|
+
* - Returns an instance of [HMSSDK] {@link HMSSDK}
|
|
1346
1106
|
* - This function must be called to get an instance of HMSSDK class and only then user can interact with its methods.
|
|
1347
1107
|
*
|
|
1108
|
+
* Regular Usage:
|
|
1109
|
+
*
|
|
1110
|
+
* const hmsInstance = await HMSSDK.build();
|
|
1111
|
+
*
|
|
1112
|
+
* For Advanced Use-Cases:
|
|
1113
|
+
* @param {trackSettings} trackSettings is an optional value only required to enable features like iOS Screen/Audio Share, Android Software Echo Cancellation, etc
|
|
1114
|
+
* @param {appGroup} appGroup is an optional value only required for implementing Screen & Audio Share on iOS. They are not required for Android. DO NOT USE if your app does not implements Screen or Audio Share on iOS.
|
|
1115
|
+
* @param {preferredExtension} preferredExtension is an optional value only required for implementing Screen & Audio Share on iOS. They are not required for Android. DO NOT USE if your app does not implements Screen or Audio Share on iOS.
|
|
1116
|
+
*
|
|
1348
1117
|
* @static
|
|
1349
1118
|
* @returns
|
|
1350
1119
|
* @memberof HMSSDK
|
|
1351
1120
|
*/
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
1121
|
static async build(params) {
|
|
1122
|
+
const {
|
|
1123
|
+
version
|
|
1124
|
+
} = require('../../package.json');
|
|
1125
|
+
const {
|
|
1126
|
+
major,
|
|
1127
|
+
minor,
|
|
1128
|
+
patch
|
|
1129
|
+
} = ReactNativeVersion.version;
|
|
1355
1130
|
let id = await HMSManager.build({
|
|
1356
1131
|
trackSettings: params === null || params === void 0 ? void 0 : params.trackSettings,
|
|
1357
1132
|
appGroup: params === null || params === void 0 ? void 0 : params.appGroup,
|
|
1358
1133
|
// required for iOS Screenshare, not required for Android
|
|
1359
|
-
preferredExtension: params === null || params === void 0 ? void 0 : params.preferredExtension
|
|
1360
|
-
|
|
1134
|
+
preferredExtension: params === null || params === void 0 ? void 0 : params.preferredExtension,
|
|
1135
|
+
// required for iOS Screenshare, not required for Android
|
|
1136
|
+
frameworkInfo: {
|
|
1137
|
+
version: major + '.' + minor + '.' + patch,
|
|
1138
|
+
sdkVersion: version
|
|
1139
|
+
},
|
|
1140
|
+
logSettings: params === null || params === void 0 ? void 0 : params.logSettings
|
|
1361
1141
|
});
|
|
1362
1142
|
HmsSdk = new HMSSDK(id);
|
|
1363
|
-
HmsSdk.attachPreviewListener();
|
|
1364
1143
|
HmsSdk.attachListeners();
|
|
1365
1144
|
return HmsSdk;
|
|
1366
1145
|
}
|
|
1146
|
+
|
|
1367
1147
|
/**
|
|
1368
1148
|
* - Returns the instance of logger which can be used to manipulate log levels.
|
|
1369
1149
|
* @returns @instance HMSLogger
|
|
1370
1150
|
* @memberof HMSSDK
|
|
1371
1151
|
*/
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
1152
|
static getLogger() {
|
|
1375
1153
|
return (0, _HMSLogger.getLogger)();
|
|
1376
1154
|
}
|
|
1155
|
+
|
|
1377
1156
|
/**
|
|
1378
1157
|
* - Updates the logger for this instance of HMSSDK
|
|
1379
1158
|
* @param {HMSLogger} hmsLogger
|
|
1380
1159
|
* @memberof HMSSDK
|
|
1381
1160
|
*/
|
|
1382
1161
|
|
|
1383
|
-
|
|
1162
|
+
async isPipModeSupported() {
|
|
1163
|
+
return HMSManager.handlePipActions('isPipModeSupported', null);
|
|
1164
|
+
}
|
|
1165
|
+
async enablePipMode(data) {
|
|
1166
|
+
const config = {
|
|
1167
|
+
aspectRatio: [16, 9],
|
|
1168
|
+
...(data || {})
|
|
1169
|
+
};
|
|
1170
|
+
return HMSManager.handlePipActions('enablePipMode', config);
|
|
1171
|
+
}
|
|
1172
|
+
async setPipParams(data) {
|
|
1173
|
+
return HMSManager.handlePipActions('setPictureInPictureParams', data || null);
|
|
1174
|
+
}
|
|
1384
1175
|
}
|
|
1385
|
-
|
|
1386
1176
|
exports.HMSSDK = HMSSDK;
|
|
1387
1177
|
//# sourceMappingURL=HMSSDK.js.map
|