@100mslive/react-native-hms 2.0.0-alpha.0 → 2.0.0-alpha.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 +21 -15
- package/android/build.gradle +95 -48
- package/android/src/main/java/com/reactnativehmssdk/HMSAudioshareActivity.kt +8 -10
- package/android/src/main/java/com/reactnativehmssdk/HMSDecoder.kt +177 -3
- package/android/src/main/java/com/reactnativehmssdk/HMSHLSPlayer.kt +149 -29
- package/android/src/main/java/com/reactnativehmssdk/HMSHLSPlayerManagerImpl.kt +185 -0
- package/android/src/main/java/com/reactnativehmssdk/HMSHelper.kt +80 -20
- package/android/src/main/java/com/reactnativehmssdk/{HMSManager.kt → HMSManagerImpl.kt} +517 -145
- package/android/src/main/java/com/reactnativehmssdk/HMSRNSDK.kt +503 -312
- package/android/src/main/java/com/reactnativehmssdk/HMSReactNativeEvent.kt +29 -0
- package/android/src/main/java/com/reactnativehmssdk/HMSSDKViewManagerImpl.kt +119 -0
- package/android/src/main/java/com/reactnativehmssdk/HMSView.kt +64 -12
- package/android/src/main/java/com/reactnativehmssdk/HmsScreenshareActivity.kt +9 -9
- package/android/src/main/java/com/reactnativehmssdk/HmssdkPackage.kt +44 -8
- package/android/src/main/java/com/reactnativehmssdk/Interactivity/HMSInteractivityDecoder.kt +435 -0
- package/android/src/main/java/com/reactnativehmssdk/Interactivity/HMSInteractivityHelper.kt +353 -0
- package/android/src/main/java/com/reactnativehmssdk/Interactivity/HMSRNInteractivityCenter.kt +245 -0
- package/android/src/main/java/com/reactnativehmssdk/PipActionReceiver.kt +13 -3
- package/android/src/newarch/java/com/reactnativehmssdk/HMSHLSPlayerManager.kt +128 -0
- package/android/src/newarch/java/com/reactnativehmssdk/HMSManager.kt +332 -0
- package/android/src/newarch/java/com/reactnativehmssdk/HMSSDKViewManager.kt +102 -0
- package/android/src/oldarch/java/com/reactnativehmssdk/HMSHLSPlayerManager.kt +61 -0
- package/android/src/oldarch/java/com/reactnativehmssdk/HMSManager.kt +351 -0
- package/android/src/oldarch/java/com/reactnativehmssdk/HMSSDKViewManager.kt +87 -0
- package/ios/HMSConstants.swift +4 -0
- package/ios/HMSDecoder.swift +154 -18
- package/ios/HMSHLSPlayerComponentView.mm +325 -0
- package/ios/HMSHLSPlayerManager.m +16 -0
- package/ios/HMSHLSPlayerManager.swift +236 -70
- package/ios/HMSHelper.swift +126 -14
- package/ios/HMSInteractivityDecoder.swift +314 -0
- package/ios/HMSInteractivityHelper.swift +169 -0
- package/ios/HMSManager.m +203 -10
- package/ios/HMSManager.mm +365 -0
- package/ios/HMSManager.swift +431 -87
- package/ios/HMSRNInteractivityCenter.swift +161 -0
- package/ios/HMSRNSDK.swift +961 -134
- package/ios/HMSView.m +9 -0
- package/ios/HMSView.swift +45 -16
- package/ios/HMSViewComponentView.mm +229 -0
- package/ios/PIPMode/HMSPipModel.swift +18 -0
- package/ios/PIPMode/HMSPipView.swift +36 -0
- package/ios/PIPMode/HMSSampleBufferSwiftUIView.swift +45 -0
- package/lib/commonjs/classes/HMSAudioCodec.js +1 -2
- package/lib/commonjs/classes/HMSAudioCodec.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioDevice.js +10 -2
- package/lib/commonjs/classes/HMSAudioDevice.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioFilePlayerNode.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioMixerSource.js +3 -3
- package/lib/commonjs/classes/HMSAudioMixerSource.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioMixingMode.js +12 -2
- package/lib/commonjs/classes/HMSAudioMixingMode.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioMode.js +1 -2
- package/lib/commonjs/classes/HMSAudioMode.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioNode.js +3 -3
- package/lib/commonjs/classes/HMSAudioNode.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioSettings.js +3 -3
- package/lib/commonjs/classes/HMSAudioSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioTrack.js +9 -0
- package/lib/commonjs/classes/HMSAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioTrackSettings.js +12 -5
- package/lib/commonjs/classes/HMSAudioTrackSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSBrowserRecordingState.js +5 -3
- package/lib/commonjs/classes/HMSBrowserRecordingState.js.map +1 -1
- package/lib/commonjs/classes/HMSCameraControl.js +3 -4
- package/lib/commonjs/classes/HMSCameraControl.js.map +1 -1
- package/lib/commonjs/classes/HMSCameraFacing.js +10 -2
- package/lib/commonjs/classes/HMSCameraFacing.js.map +1 -1
- package/lib/commonjs/classes/HMSChangeTrackStateRequest.js +3 -3
- package/lib/commonjs/classes/HMSChangeTrackStateRequest.js.map +1 -1
- package/lib/commonjs/classes/HMSConfig.js +30 -3
- package/lib/commonjs/classes/HMSConfig.js.map +1 -1
- package/lib/commonjs/classes/HMSConstants.js +1 -2
- package/lib/commonjs/classes/HMSConstants.js.map +1 -1
- package/lib/commonjs/classes/HMSEncoder.js +57 -14
- package/lib/commonjs/classes/HMSEncoder.js.map +1 -1
- package/lib/commonjs/classes/HMSEventEmitter.js +1 -2
- package/lib/commonjs/classes/HMSEventEmitter.js.map +1 -1
- package/lib/commonjs/classes/HMSException.js +21 -3
- package/lib/commonjs/classes/HMSException.js.map +1 -1
- package/lib/commonjs/classes/HMSHLSConfig.js +3 -3
- package/lib/commonjs/classes/HMSHLSConfig.js.map +1 -1
- package/lib/commonjs/classes/HMSHLSMeetingURLVariant.js +3 -3
- package/lib/commonjs/classes/HMSHLSMeetingURLVariant.js.map +1 -1
- package/lib/commonjs/classes/HMSHLSPlaylistType.js +12 -0
- package/lib/commonjs/classes/HMSHLSPlaylistType.js.map +1 -0
- package/lib/commonjs/classes/HMSHLSRecordingConfig.js +3 -3
- package/lib/commonjs/classes/HMSHLSRecordingConfig.js.map +1 -1
- package/lib/commonjs/classes/HMSHLSRecordingState.js +7 -7
- package/lib/commonjs/classes/HMSHLSRecordingState.js.map +1 -1
- package/lib/commonjs/classes/HMSHLSStreamingState.js +9 -3
- package/lib/commonjs/classes/HMSHLSStreamingState.js.map +1 -1
- package/lib/commonjs/classes/HMSHLSTimedMetadata.js +2 -0
- package/lib/commonjs/classes/HMSHLSTimedMetadata.js.map +1 -0
- package/lib/commonjs/classes/HMSHLSVariant.js +5 -3
- package/lib/commonjs/classes/HMSHLSVariant.js.map +1 -1
- package/lib/commonjs/classes/HMSHelper.js.map +1 -1
- package/lib/commonjs/classes/HMSIOSAudioMode.js +16 -2
- package/lib/commonjs/classes/HMSIOSAudioMode.js.map +1 -1
- package/lib/commonjs/classes/HMSInteractivityCenter.js +174 -0
- package/lib/commonjs/classes/HMSInteractivityCenter.js.map +1 -0
- package/lib/commonjs/classes/HMSInteractivityEncoder.js +83 -0
- package/lib/commonjs/classes/HMSInteractivityEncoder.js.map +1 -0
- package/lib/commonjs/classes/HMSLayer.js +1 -2
- package/lib/commonjs/classes/HMSLayer.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalAudioStats.js +3 -3
- package/lib/commonjs/classes/HMSLocalAudioStats.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalAudioTrack.js +3 -3
- package/lib/commonjs/classes/HMSLocalAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalPeer.js +3 -3
- package/lib/commonjs/classes/HMSLocalPeer.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalVideoStats.js +3 -3
- package/lib/commonjs/classes/HMSLocalVideoStats.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalVideoTrack.js +3 -3
- package/lib/commonjs/classes/HMSLocalVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSLogAlarmManager.js +13 -2
- package/lib/commonjs/classes/HMSLogAlarmManager.js.map +1 -1
- package/lib/commonjs/classes/HMSLogLevel.js +13 -2
- package/lib/commonjs/classes/HMSLogLevel.js.map +1 -1
- package/lib/commonjs/classes/HMSLogSettings.js +17 -3
- package/lib/commonjs/classes/HMSLogSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSLogger.js +4 -5
- package/lib/commonjs/classes/HMSLogger.js.map +1 -1
- package/lib/commonjs/classes/HMSMessage.js +3 -3
- package/lib/commonjs/classes/HMSMessage.js.map +1 -1
- package/lib/commonjs/classes/HMSMessageRecipient.js +3 -3
- package/lib/commonjs/classes/HMSMessageRecipient.js.map +1 -1
- package/lib/commonjs/classes/HMSMessageRecipientType.js +1 -2
- package/lib/commonjs/classes/HMSMessageRecipientType.js.map +1 -1
- package/lib/commonjs/classes/HMSMicNode.js.map +1 -1
- package/lib/commonjs/classes/HMSNativeEventEmitter.js +4 -6
- package/lib/commonjs/classes/HMSNativeEventEmitter.js.map +1 -1
- package/lib/commonjs/classes/HMSNativeEventListener.js +3 -4
- package/lib/commonjs/classes/HMSNativeEventListener.js.map +1 -1
- package/lib/commonjs/classes/HMSNetworkQuality.js +14 -3
- package/lib/commonjs/classes/HMSNetworkQuality.js.map +1 -1
- package/lib/commonjs/classes/HMSNoiseCancellationPlugin.js +158 -0
- package/lib/commonjs/classes/HMSNoiseCancellationPlugin.js.map +1 -0
- package/lib/commonjs/classes/HMSPIPConfig.js +6 -0
- package/lib/commonjs/classes/HMSPIPConfig.js.map +1 -0
- package/lib/commonjs/classes/HMSPIPListenerActions.js +10 -2
- package/lib/commonjs/classes/HMSPIPListenerActions.js.map +1 -1
- package/lib/commonjs/classes/HMSPeer.js +186 -5
- package/lib/commonjs/classes/HMSPeer.js.map +1 -1
- package/lib/commonjs/classes/HMSPeerListIterator.js +25 -7
- package/lib/commonjs/classes/HMSPeerListIterator.js.map +1 -1
- package/lib/commonjs/classes/HMSPeerListIteratorOptions.js.map +1 -1
- package/lib/commonjs/classes/HMSPeerType.js +24 -0
- package/lib/commonjs/classes/HMSPeerType.js.map +1 -0
- package/lib/commonjs/classes/HMSPeerUpdate.js +2 -4
- package/lib/commonjs/classes/HMSPeerUpdate.js.map +1 -1
- package/lib/commonjs/classes/HMSPeersCache.js +6 -7
- package/lib/commonjs/classes/HMSPeersCache.js.map +1 -1
- package/lib/commonjs/classes/HMSPermissions.js +11 -3
- package/lib/commonjs/classes/HMSPermissions.js.map +1 -1
- package/lib/commonjs/classes/HMSPollsListenerActions.js +11 -0
- package/lib/commonjs/classes/HMSPollsListenerActions.js.map +1 -0
- package/lib/commonjs/classes/HMSPublishSettings.js +3 -3
- package/lib/commonjs/classes/HMSPublishSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSQualityLimitationReason.js +1 -2
- package/lib/commonjs/classes/HMSQualityLimitationReason.js.map +1 -1
- package/lib/commonjs/classes/HMSQualityLimitationReasons.js +3 -3
- package/lib/commonjs/classes/HMSQualityLimitationReasons.js.map +1 -1
- package/lib/commonjs/classes/HMSRTCStats.js +3 -3
- package/lib/commonjs/classes/HMSRTCStats.js.map +1 -1
- package/lib/commonjs/classes/HMSRTCStatsReport.js +3 -3
- package/lib/commonjs/classes/HMSRTCStatsReport.js.map +1 -1
- package/lib/commonjs/classes/HMSRTMPConfig.js +17 -3
- package/lib/commonjs/classes/HMSRTMPConfig.js.map +1 -1
- package/lib/commonjs/classes/HMSRecordingState.js +17 -0
- package/lib/commonjs/classes/HMSRecordingState.js.map +1 -0
- package/lib/commonjs/classes/HMSRemoteAudioStats.js +3 -3
- package/lib/commonjs/classes/HMSRemoteAudioStats.js.map +1 -1
- package/lib/commonjs/classes/HMSRemoteAudioTrack.js +3 -3
- package/lib/commonjs/classes/HMSRemoteAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSRemotePeer.js +3 -3
- package/lib/commonjs/classes/HMSRemotePeer.js.map +1 -1
- package/lib/commonjs/classes/HMSRemoteVideoStats.js +3 -3
- package/lib/commonjs/classes/HMSRemoteVideoStats.js.map +1 -1
- package/lib/commonjs/classes/HMSRemoteVideoTrack.js +3 -3
- package/lib/commonjs/classes/HMSRemoteVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSRole.js +20 -3
- package/lib/commonjs/classes/HMSRole.js.map +1 -1
- package/lib/commonjs/classes/HMSRoleChangeRequest.js +3 -3
- package/lib/commonjs/classes/HMSRoleChangeRequest.js.map +1 -1
- package/lib/commonjs/classes/HMSRoom.js +17 -4
- package/lib/commonjs/classes/HMSRoom.js.map +1 -1
- package/lib/commonjs/classes/HMSRoomCache.js +13 -7
- package/lib/commonjs/classes/HMSRoomCache.js.map +1 -1
- package/lib/commonjs/classes/HMSRoomUpdate.js +2 -2
- package/lib/commonjs/classes/HMSRoomUpdate.js.map +1 -1
- package/lib/commonjs/classes/HMSRtmpStreamingState.js +5 -5
- package/lib/commonjs/classes/HMSRtmpStreamingState.js.map +1 -1
- package/lib/commonjs/classes/HMSRtmpVideoResolution.js +16 -3
- package/lib/commonjs/classes/HMSRtmpVideoResolution.js.map +1 -1
- package/lib/commonjs/classes/HMSSDK.js +1313 -327
- package/lib/commonjs/classes/HMSSDK.js.map +1 -1
- package/lib/commonjs/classes/HMSScreenBroadcastAudioReceiverNode.js.map +1 -1
- package/lib/commonjs/classes/HMSServerRecordingState.js +5 -3
- package/lib/commonjs/classes/HMSServerRecordingState.js.map +1 -1
- package/lib/commonjs/classes/HMSSessionStore.js +20 -23
- package/lib/commonjs/classes/HMSSessionStore.js.map +1 -1
- package/lib/commonjs/classes/HMSSimulcastLayerDefinition.js +3 -3
- package/lib/commonjs/classes/HMSSimulcastLayerDefinition.js.map +1 -1
- package/lib/commonjs/classes/HMSSimulcastLayerSettings.js +3 -3
- package/lib/commonjs/classes/HMSSimulcastLayerSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSSimulcastLayerSettingsPolicy.js +3 -3
- package/lib/commonjs/classes/HMSSimulcastLayerSettingsPolicy.js.map +1 -1
- package/lib/commonjs/classes/HMSSimulcastSettings.js +3 -3
- package/lib/commonjs/classes/HMSSimulcastSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSSimulcastSettingsPolicy.js +3 -3
- package/lib/commonjs/classes/HMSSimulcastSettingsPolicy.js.map +1 -1
- package/lib/commonjs/classes/HMSSpeaker.js +3 -3
- package/lib/commonjs/classes/HMSSpeaker.js.map +1 -1
- package/lib/commonjs/classes/HMSStreamingState.js +15 -0
- package/lib/commonjs/classes/HMSStreamingState.js.map +1 -0
- package/lib/commonjs/classes/HMSSubscribeDegradationPolicy.js +3 -3
- package/lib/commonjs/classes/HMSSubscribeDegradationPolicy.js.map +1 -1
- package/lib/commonjs/classes/HMSSubscribeSettings.js +3 -3
- package/lib/commonjs/classes/HMSSubscribeSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSTrack.js +16 -3
- package/lib/commonjs/classes/HMSTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSTrackSettings.js +13 -3
- package/lib/commonjs/classes/HMSTrackSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSTrackSettingsInitState.js +10 -2
- package/lib/commonjs/classes/HMSTrackSettingsInitState.js.map +1 -1
- package/lib/commonjs/classes/HMSTrackSource.js +11 -2
- package/lib/commonjs/classes/HMSTrackSource.js.map +1 -1
- package/lib/commonjs/classes/HMSTrackType.js +8 -2
- package/lib/commonjs/classes/HMSTrackType.js.map +1 -1
- package/lib/commonjs/classes/HMSTrackUpdate.js +1 -2
- package/lib/commonjs/classes/HMSTrackUpdate.js.map +1 -1
- package/lib/commonjs/classes/HMSUpdateListenerActions.js +44 -5
- package/lib/commonjs/classes/HMSUpdateListenerActions.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoCodec.js +1 -2
- package/lib/commonjs/classes/HMSVideoCodec.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoResolution.js +3 -3
- package/lib/commonjs/classes/HMSVideoResolution.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoSettings.js +3 -3
- package/lib/commonjs/classes/HMSVideoSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoTrack.js +20 -3
- package/lib/commonjs/classes/HMSVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoTrackSettings.js +18 -7
- package/lib/commonjs/classes/HMSVideoTrackSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoViewMode.js +1 -2
- package/lib/commonjs/classes/HMSVideoViewMode.js.map +1 -1
- package/lib/commonjs/classes/HmsView.js +77 -28
- package/lib/commonjs/classes/HmsView.js.map +1 -1
- package/lib/commonjs/classes/polls/DecodedPollLeaderboardResponse.js +6 -0
- package/lib/commonjs/classes/polls/DecodedPollLeaderboardResponse.js.map +1 -0
- package/lib/commonjs/classes/polls/HMSPoll.js +6 -0
- package/lib/commonjs/classes/polls/HMSPoll.js.map +1 -0
- package/lib/commonjs/classes/polls/HMSPollCategory.js +12 -0
- package/lib/commonjs/classes/polls/HMSPollCategory.js.map +1 -0
- package/lib/commonjs/classes/polls/HMSPollCreateParams.js +6 -0
- package/lib/commonjs/classes/polls/HMSPollCreateParams.js.map +1 -0
- package/lib/commonjs/classes/polls/HMSPollLeaderboardEntry.js +6 -0
- package/lib/commonjs/classes/polls/HMSPollLeaderboardEntry.js.map +1 -0
- package/lib/commonjs/classes/polls/HMSPollLeaderboardSummary.js +2 -0
- package/lib/commonjs/classes/polls/HMSPollLeaderboardSummary.js.map +1 -0
- package/lib/commonjs/classes/polls/HMSPollQuestion.js +6 -0
- package/lib/commonjs/classes/polls/HMSPollQuestion.js.map +1 -0
- package/lib/commonjs/classes/polls/HMSPollQuestionAnswer.js +2 -0
- package/lib/commonjs/classes/polls/HMSPollQuestionAnswer.js.map +1 -0
- package/lib/commonjs/classes/polls/HMSPollQuestionCreateParams.js +6 -0
- package/lib/commonjs/classes/polls/HMSPollQuestionCreateParams.js.map +1 -0
- package/lib/commonjs/classes/polls/HMSPollQuestionOption.js +2 -0
- package/lib/commonjs/classes/polls/HMSPollQuestionOption.js.map +1 -0
- package/lib/commonjs/classes/polls/HMSPollQuestionOptionCreateParams.js +6 -0
- package/lib/commonjs/classes/polls/HMSPollQuestionOptionCreateParams.js.map +1 -0
- package/lib/commonjs/classes/polls/HMSPollQuestionQuizOptionCreateParams.js +6 -0
- package/lib/commonjs/classes/polls/HMSPollQuestionQuizOptionCreateParams.js.map +1 -0
- package/lib/commonjs/classes/polls/HMSPollQuestionResponse.js +6 -0
- package/lib/commonjs/classes/polls/HMSPollQuestionResponse.js.map +1 -0
- package/lib/commonjs/classes/polls/HMSPollQuestionResponseCreateParams.js +6 -0
- package/lib/commonjs/classes/polls/HMSPollQuestionResponseCreateParams.js.map +1 -0
- package/lib/commonjs/classes/polls/HMSPollQuestionResponseResult.js +2 -0
- package/lib/commonjs/classes/polls/HMSPollQuestionResponseResult.js.map +1 -0
- package/lib/commonjs/classes/polls/HMSPollQuestionResult.js +2 -0
- package/lib/commonjs/classes/polls/HMSPollQuestionResult.js.map +1 -0
- package/lib/commonjs/classes/polls/HMSPollQuestionType.js +14 -0
- package/lib/commonjs/classes/polls/HMSPollQuestionType.js.map +1 -0
- package/lib/commonjs/classes/polls/HMSPollResponsePeerInfo.js +2 -0
- package/lib/commonjs/classes/polls/HMSPollResponsePeerInfo.js.map +1 -0
- package/lib/commonjs/classes/polls/HMSPollResult.js +6 -0
- package/lib/commonjs/classes/polls/HMSPollResult.js.map +1 -0
- package/lib/commonjs/classes/polls/HMSPollState.js +13 -0
- package/lib/commonjs/classes/polls/HMSPollState.js.map +1 -0
- package/lib/commonjs/classes/polls/HMSPollType.js +12 -0
- package/lib/commonjs/classes/polls/HMSPollType.js.map +1 -0
- package/lib/commonjs/classes/polls/HMSPollUpdateType.js +13 -0
- package/lib/commonjs/classes/polls/HMSPollUpdateType.js.map +1 -0
- package/lib/commonjs/classes/polls/HMSPollUserTrackingMode.js +13 -0
- package/lib/commonjs/classes/polls/HMSPollUserTrackingMode.js.map +1 -0
- package/lib/commonjs/classes/polls/PollLeaderboardResponse.js +6 -0
- package/lib/commonjs/classes/polls/PollLeaderboardResponse.js.map +1 -0
- package/lib/commonjs/classes/transcriptions/HMSTranscript.js +6 -0
- package/lib/commonjs/classes/transcriptions/HMSTranscript.js.map +1 -0
- package/lib/commonjs/classes/transcriptions/OnTranscriptionError.js +2 -0
- package/lib/commonjs/classes/transcriptions/OnTranscriptionError.js.map +1 -0
- package/lib/commonjs/classes/transcriptions/TranscriptionState.js +14 -0
- package/lib/commonjs/classes/transcriptions/TranscriptionState.js.map +1 -0
- package/lib/commonjs/classes/transcriptions/Transcriptions.js +6 -0
- package/lib/commonjs/classes/transcriptions/Transcriptions.js.map +1 -0
- package/lib/commonjs/classes/transcriptions/TranscriptionsMode.js +12 -0
- package/lib/commonjs/classes/transcriptions/TranscriptionsMode.js.map +1 -0
- package/lib/commonjs/classes/transcriptions/index.js +61 -0
- package/lib/commonjs/classes/transcriptions/index.js.map +1 -0
- package/lib/commonjs/classes/whiteboard/HMSWhiteboard.js +6 -0
- package/lib/commonjs/classes/whiteboard/HMSWhiteboard.js.map +1 -0
- package/lib/commonjs/classes/whiteboard/HMSWhiteboardListenerActions.js +11 -0
- package/lib/commonjs/classes/whiteboard/HMSWhiteboardListenerActions.js.map +1 -0
- package/lib/commonjs/classes/whiteboard/HMSWhiteboardState.js +12 -0
- package/lib/commonjs/classes/whiteboard/HMSWhiteboardState.js.map +1 -0
- package/lib/commonjs/classes/whiteboard/HMSWhiteboardUpdateType.js +12 -0
- package/lib/commonjs/classes/whiteboard/HMSWhiteboardUpdateType.js.map +1 -0
- package/lib/commonjs/classes/whiteboard/index.js +39 -0
- package/lib/commonjs/classes/whiteboard/index.js.map +1 -0
- package/lib/commonjs/classes/whiteboard/registerCallbacks.js +26 -0
- package/lib/commonjs/classes/whiteboard/registerCallbacks.js.map +1 -0
- package/lib/commonjs/components/HMSHLSPlayer/HMSHLSPlayer.js +155 -49
- package/lib/commonjs/components/HMSHLSPlayer/HMSHLSPlayer.js.map +1 -1
- package/lib/commonjs/components/HMSHLSPlayer/RCTHMSHLSPlayer.js +5 -6
- package/lib/commonjs/components/HMSHLSPlayer/RCTHMSHLSPlayer.js.map +1 -1
- package/lib/commonjs/components/HMSHLSPlayer/hooks.js +26 -16
- package/lib/commonjs/components/HMSHLSPlayer/hooks.js.map +1 -1
- package/lib/commonjs/components/HMSHLSPlayer/index.js +22 -1
- package/lib/commonjs/components/HMSHLSPlayer/index.js.map +1 -1
- package/lib/commonjs/hooks/hmsviews.js +17 -0
- package/lib/commonjs/hooks/hmsviews.js.map +1 -0
- package/lib/commonjs/hooks/polls.js +17 -0
- package/lib/commonjs/hooks/polls.js.map +1 -0
- package/lib/commonjs/hooks/useHMSPeerUpdates.js +3 -5
- package/lib/commonjs/hooks/useHMSPeerUpdates.js.map +1 -1
- package/lib/commonjs/index.js +233 -6
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/modules/HMSManagerModule.js +10 -0
- package/lib/commonjs/modules/HMSManagerModule.js.map +1 -0
- package/lib/commonjs/specs/HMSHLSPlayerNativeComponent.js +75 -0
- package/lib/commonjs/specs/HMSHLSPlayerNativeComponent.js.map +1 -0
- package/lib/commonjs/specs/HMSViewNativeComponent.js +55 -0
- package/lib/commonjs/specs/HMSViewNativeComponent.js.map +1 -0
- package/lib/commonjs/specs/NativeHMSManager.js +38 -0
- package/lib/commonjs/specs/NativeHMSManager.js.map +1 -0
- package/lib/commonjs/stores/hls-player-playback-slice.js +10 -0
- package/lib/commonjs/stores/hls-player-playback-slice.js.map +1 -1
- package/lib/commonjs/stores/hls-player-stats-store.js +28 -17
- package/lib/commonjs/stores/hls-player-stats-store.js.map +1 -1
- package/lib/commonjs/stores/hms-interactivity-store.js +21 -0
- package/lib/commonjs/stores/hms-interactivity-store.js.map +1 -0
- package/lib/commonjs/stores/hms-polls-slice.js +19 -0
- package/lib/commonjs/stores/hms-polls-slice.js.map +1 -0
- package/lib/commonjs/stores/hms-store.js +5 -6
- package/lib/commonjs/stores/hms-store.js.map +1 -1
- package/lib/commonjs/stores/hmsviews-slice.js +19 -0
- package/lib/commonjs/stores/hmsviews-slice.js.map +1 -0
- package/lib/commonjs/stores/types.js.map +1 -1
- package/lib/commonjs/types.js +4 -7
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/utils/emitter/EventEmitter.js +23 -7
- package/lib/commonjs/utils/emitter/EventEmitter.js.map +1 -1
- package/lib/commonjs/utils/emitter/_EmitterSubscription.js +3 -3
- package/lib/commonjs/utils/emitter/_EmitterSubscription.js.map +1 -1
- package/lib/commonjs/utils/emitter/_EventSubscription.js +3 -3
- package/lib/commonjs/utils/emitter/_EventSubscription.js.map +1 -1
- package/lib/commonjs/utils/emitter/_EventSubscriptionVendor.js +3 -4
- package/lib/commonjs/utils/emitter/_EventSubscriptionVendor.js.map +1 -1
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/keyboard.js +46 -0
- package/lib/commonjs/utils/keyboard.js.map +1 -0
- package/lib/commonjs/utils/notification.js +13 -0
- package/lib/commonjs/utils/notification.js.map +1 -0
- package/lib/commonjs/utils/windowController.js +30 -0
- package/lib/commonjs/utils/windowController.js.map +1 -0
- package/lib/module/classes/HMSAudioCodec.js.map +1 -1
- package/lib/module/classes/HMSAudioDevice.js +9 -0
- package/lib/module/classes/HMSAudioDevice.js.map +1 -1
- package/lib/module/classes/HMSAudioFilePlayerNode.js.map +1 -1
- package/lib/module/classes/HMSAudioMixerSource.js +3 -3
- package/lib/module/classes/HMSAudioMixerSource.js.map +1 -1
- package/lib/module/classes/HMSAudioMixingMode.js +11 -0
- package/lib/module/classes/HMSAudioMixingMode.js.map +1 -1
- package/lib/module/classes/HMSAudioMode.js.map +1 -1
- package/lib/module/classes/HMSAudioNode.js +3 -3
- package/lib/module/classes/HMSAudioNode.js.map +1 -1
- package/lib/module/classes/HMSAudioSettings.js +3 -3
- package/lib/module/classes/HMSAudioSettings.js.map +1 -1
- package/lib/module/classes/HMSAudioTrack.js +9 -0
- package/lib/module/classes/HMSAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSAudioTrackSettings.js +12 -5
- package/lib/module/classes/HMSAudioTrackSettings.js.map +1 -1
- package/lib/module/classes/HMSBrowserRecordingState.js +5 -3
- package/lib/module/classes/HMSBrowserRecordingState.js.map +1 -1
- package/lib/module/classes/HMSCameraControl.js +2 -3
- package/lib/module/classes/HMSCameraControl.js.map +1 -1
- package/lib/module/classes/HMSCameraFacing.js +9 -0
- package/lib/module/classes/HMSCameraFacing.js.map +1 -1
- package/lib/module/classes/HMSChangeTrackStateRequest.js +3 -3
- package/lib/module/classes/HMSChangeTrackStateRequest.js.map +1 -1
- package/lib/module/classes/HMSConfig.js +30 -3
- package/lib/module/classes/HMSConfig.js.map +1 -1
- package/lib/module/classes/HMSConstants.js.map +1 -1
- package/lib/module/classes/HMSEncoder.js +56 -13
- package/lib/module/classes/HMSEncoder.js.map +1 -1
- package/lib/module/classes/HMSEventEmitter.js.map +1 -1
- package/lib/module/classes/HMSException.js +21 -3
- package/lib/module/classes/HMSException.js.map +1 -1
- package/lib/module/classes/HMSHLSConfig.js +3 -3
- package/lib/module/classes/HMSHLSConfig.js.map +1 -1
- package/lib/module/classes/HMSHLSMeetingURLVariant.js +3 -3
- package/lib/module/classes/HMSHLSMeetingURLVariant.js.map +1 -1
- package/lib/module/classes/HMSHLSPlaylistType.js +6 -0
- package/lib/module/classes/HMSHLSPlaylistType.js.map +1 -0
- package/lib/module/classes/HMSHLSRecordingConfig.js +3 -3
- package/lib/module/classes/HMSHLSRecordingConfig.js.map +1 -1
- package/lib/module/classes/HMSHLSRecordingState.js +7 -7
- package/lib/module/classes/HMSHLSRecordingState.js.map +1 -1
- package/lib/module/classes/HMSHLSStreamingState.js +9 -3
- package/lib/module/classes/HMSHLSStreamingState.js.map +1 -1
- package/lib/module/classes/HMSHLSTimedMetadata.js +2 -0
- package/lib/module/classes/HMSHLSTimedMetadata.js.map +1 -0
- package/lib/module/classes/HMSHLSVariant.js +5 -3
- package/lib/module/classes/HMSHLSVariant.js.map +1 -1
- package/lib/module/classes/HMSHelper.js.map +1 -1
- package/lib/module/classes/HMSIOSAudioMode.js +15 -0
- package/lib/module/classes/HMSIOSAudioMode.js.map +1 -1
- package/lib/module/classes/HMSInteractivityCenter.js +166 -0
- package/lib/module/classes/HMSInteractivityCenter.js.map +1 -0
- package/lib/module/classes/HMSInteractivityEncoder.js +76 -0
- package/lib/module/classes/HMSInteractivityEncoder.js.map +1 -0
- package/lib/module/classes/HMSLayer.js.map +1 -1
- package/lib/module/classes/HMSLocalAudioStats.js +3 -3
- package/lib/module/classes/HMSLocalAudioStats.js.map +1 -1
- package/lib/module/classes/HMSLocalAudioTrack.js +3 -3
- package/lib/module/classes/HMSLocalAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSLocalPeer.js +3 -3
- package/lib/module/classes/HMSLocalPeer.js.map +1 -1
- package/lib/module/classes/HMSLocalVideoStats.js +3 -3
- package/lib/module/classes/HMSLocalVideoStats.js.map +1 -1
- package/lib/module/classes/HMSLocalVideoTrack.js +3 -3
- package/lib/module/classes/HMSLocalVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSLogAlarmManager.js +12 -0
- package/lib/module/classes/HMSLogAlarmManager.js.map +1 -1
- package/lib/module/classes/HMSLogLevel.js +12 -0
- package/lib/module/classes/HMSLogLevel.js.map +1 -1
- package/lib/module/classes/HMSLogSettings.js +17 -3
- package/lib/module/classes/HMSLogSettings.js.map +1 -1
- package/lib/module/classes/HMSLogger.js +3 -3
- package/lib/module/classes/HMSLogger.js.map +1 -1
- package/lib/module/classes/HMSMessage.js +3 -3
- package/lib/module/classes/HMSMessage.js.map +1 -1
- package/lib/module/classes/HMSMessageRecipient.js +3 -3
- package/lib/module/classes/HMSMessageRecipient.js.map +1 -1
- package/lib/module/classes/HMSMessageRecipientType.js.map +1 -1
- package/lib/module/classes/HMSMicNode.js.map +1 -1
- package/lib/module/classes/HMSNativeEventEmitter.js +4 -6
- package/lib/module/classes/HMSNativeEventEmitter.js.map +1 -1
- package/lib/module/classes/HMSNativeEventListener.js +1 -1
- package/lib/module/classes/HMSNativeEventListener.js.map +1 -1
- package/lib/module/classes/HMSNetworkQuality.js +14 -3
- package/lib/module/classes/HMSNetworkQuality.js.map +1 -1
- package/lib/module/classes/HMSNoiseCancellationPlugin.js +152 -0
- package/lib/module/classes/HMSNoiseCancellationPlugin.js.map +1 -0
- package/lib/module/classes/HMSPIPConfig.js +2 -0
- package/lib/module/classes/HMSPIPConfig.js.map +1 -0
- package/lib/module/classes/HMSPIPListenerActions.js +9 -0
- package/lib/module/classes/HMSPIPListenerActions.js.map +1 -1
- package/lib/module/classes/HMSPeer.js +187 -5
- package/lib/module/classes/HMSPeer.js.map +1 -1
- package/lib/module/classes/HMSPeerListIterator.js +24 -6
- package/lib/module/classes/HMSPeerListIterator.js.map +1 -1
- package/lib/module/classes/HMSPeerListIteratorOptions.js.map +1 -1
- package/lib/module/classes/HMSPeerType.js +18 -0
- package/lib/module/classes/HMSPeerType.js.map +1 -0
- package/lib/module/classes/HMSPeerUpdate.js.map +1 -1
- package/lib/module/classes/HMSPeersCache.js +4 -4
- package/lib/module/classes/HMSPeersCache.js.map +1 -1
- package/lib/module/classes/HMSPermissions.js +11 -3
- package/lib/module/classes/HMSPermissions.js.map +1 -1
- package/lib/module/classes/HMSPollsListenerActions.js +5 -0
- package/lib/module/classes/HMSPollsListenerActions.js.map +1 -0
- package/lib/module/classes/HMSPublishSettings.js +3 -3
- package/lib/module/classes/HMSPublishSettings.js.map +1 -1
- package/lib/module/classes/HMSQualityLimitationReason.js.map +1 -1
- package/lib/module/classes/HMSQualityLimitationReasons.js +3 -3
- package/lib/module/classes/HMSQualityLimitationReasons.js.map +1 -1
- package/lib/module/classes/HMSRTCStats.js +3 -3
- package/lib/module/classes/HMSRTCStats.js.map +1 -1
- package/lib/module/classes/HMSRTCStatsReport.js +3 -3
- package/lib/module/classes/HMSRTCStatsReport.js.map +1 -1
- package/lib/module/classes/HMSRTMPConfig.js +17 -3
- package/lib/module/classes/HMSRTMPConfig.js.map +1 -1
- package/lib/module/classes/HMSRecordingState.js +11 -0
- package/lib/module/classes/HMSRecordingState.js.map +1 -0
- package/lib/module/classes/HMSRemoteAudioStats.js +3 -3
- package/lib/module/classes/HMSRemoteAudioStats.js.map +1 -1
- package/lib/module/classes/HMSRemoteAudioTrack.js +3 -3
- package/lib/module/classes/HMSRemoteAudioTrack.js.map +1 -1
- package/lib/module/classes/HMSRemotePeer.js +3 -3
- package/lib/module/classes/HMSRemotePeer.js.map +1 -1
- package/lib/module/classes/HMSRemoteVideoStats.js +3 -3
- package/lib/module/classes/HMSRemoteVideoStats.js.map +1 -1
- package/lib/module/classes/HMSRemoteVideoTrack.js +3 -3
- package/lib/module/classes/HMSRemoteVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSRole.js +20 -3
- package/lib/module/classes/HMSRole.js.map +1 -1
- package/lib/module/classes/HMSRoleChangeRequest.js +3 -3
- package/lib/module/classes/HMSRoleChangeRequest.js.map +1 -1
- package/lib/module/classes/HMSRoom.js +17 -4
- package/lib/module/classes/HMSRoom.js.map +1 -1
- package/lib/module/classes/HMSRoomCache.js +11 -4
- package/lib/module/classes/HMSRoomCache.js.map +1 -1
- package/lib/module/classes/HMSRoomUpdate.js +1 -0
- package/lib/module/classes/HMSRoomUpdate.js.map +1 -1
- package/lib/module/classes/HMSRtmpStreamingState.js +5 -5
- package/lib/module/classes/HMSRtmpStreamingState.js.map +1 -1
- package/lib/module/classes/HMSRtmpVideoResolution.js +16 -3
- package/lib/module/classes/HMSRtmpVideoResolution.js.map +1 -1
- package/lib/module/classes/HMSSDK.js +1314 -328
- package/lib/module/classes/HMSSDK.js.map +1 -1
- package/lib/module/classes/HMSScreenBroadcastAudioReceiverNode.js.map +1 -1
- package/lib/module/classes/HMSServerRecordingState.js +5 -3
- package/lib/module/classes/HMSServerRecordingState.js.map +1 -1
- package/lib/module/classes/HMSSessionStore.js +19 -22
- package/lib/module/classes/HMSSessionStore.js.map +1 -1
- package/lib/module/classes/HMSSimulcastLayerDefinition.js +3 -3
- package/lib/module/classes/HMSSimulcastLayerDefinition.js.map +1 -1
- package/lib/module/classes/HMSSimulcastLayerSettings.js +3 -3
- package/lib/module/classes/HMSSimulcastLayerSettings.js.map +1 -1
- package/lib/module/classes/HMSSimulcastLayerSettingsPolicy.js +3 -3
- package/lib/module/classes/HMSSimulcastLayerSettingsPolicy.js.map +1 -1
- package/lib/module/classes/HMSSimulcastSettings.js +3 -3
- package/lib/module/classes/HMSSimulcastSettings.js.map +1 -1
- package/lib/module/classes/HMSSimulcastSettingsPolicy.js +3 -3
- package/lib/module/classes/HMSSimulcastSettingsPolicy.js.map +1 -1
- package/lib/module/classes/HMSSpeaker.js +3 -3
- package/lib/module/classes/HMSSpeaker.js.map +1 -1
- package/lib/module/classes/HMSStreamingState.js +9 -0
- package/lib/module/classes/HMSStreamingState.js.map +1 -0
- package/lib/module/classes/HMSSubscribeDegradationPolicy.js +3 -3
- package/lib/module/classes/HMSSubscribeDegradationPolicy.js.map +1 -1
- package/lib/module/classes/HMSSubscribeSettings.js +3 -3
- package/lib/module/classes/HMSSubscribeSettings.js.map +1 -1
- package/lib/module/classes/HMSTrack.js +16 -3
- package/lib/module/classes/HMSTrack.js.map +1 -1
- package/lib/module/classes/HMSTrackSettings.js +13 -3
- package/lib/module/classes/HMSTrackSettings.js.map +1 -1
- package/lib/module/classes/HMSTrackSettingsInitState.js +9 -0
- package/lib/module/classes/HMSTrackSettingsInitState.js.map +1 -1
- package/lib/module/classes/HMSTrackSource.js +10 -0
- package/lib/module/classes/HMSTrackSource.js.map +1 -1
- package/lib/module/classes/HMSTrackType.js +7 -0
- package/lib/module/classes/HMSTrackType.js.map +1 -1
- package/lib/module/classes/HMSTrackUpdate.js.map +1 -1
- package/lib/module/classes/HMSUpdateListenerActions.js +43 -3
- package/lib/module/classes/HMSUpdateListenerActions.js.map +1 -1
- package/lib/module/classes/HMSVideoCodec.js.map +1 -1
- package/lib/module/classes/HMSVideoResolution.js +3 -3
- package/lib/module/classes/HMSVideoResolution.js.map +1 -1
- package/lib/module/classes/HMSVideoSettings.js +3 -3
- package/lib/module/classes/HMSVideoSettings.js.map +1 -1
- package/lib/module/classes/HMSVideoTrack.js +20 -3
- package/lib/module/classes/HMSVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSVideoTrackSettings.js +18 -7
- package/lib/module/classes/HMSVideoTrackSettings.js.map +1 -1
- package/lib/module/classes/HMSVideoViewMode.js.map +1 -1
- package/lib/module/classes/HmsView.js +77 -25
- package/lib/module/classes/HmsView.js.map +1 -1
- package/lib/module/classes/polls/DecodedPollLeaderboardResponse.js +2 -0
- package/lib/module/classes/polls/DecodedPollLeaderboardResponse.js.map +1 -0
- package/lib/module/classes/polls/HMSPoll.js +2 -0
- package/lib/module/classes/polls/HMSPoll.js.map +1 -0
- package/lib/module/classes/polls/HMSPollCategory.js +6 -0
- package/lib/module/classes/polls/HMSPollCategory.js.map +1 -0
- package/lib/module/classes/polls/HMSPollCreateParams.js +2 -0
- package/lib/module/classes/polls/HMSPollCreateParams.js.map +1 -0
- package/lib/module/classes/polls/HMSPollLeaderboardEntry.js +2 -0
- package/lib/module/classes/polls/HMSPollLeaderboardEntry.js.map +1 -0
- package/lib/module/classes/polls/HMSPollLeaderboardSummary.js +2 -0
- package/lib/module/classes/polls/HMSPollLeaderboardSummary.js.map +1 -0
- package/lib/module/classes/polls/HMSPollQuestion.js +2 -0
- package/lib/module/classes/polls/HMSPollQuestion.js.map +1 -0
- package/lib/module/classes/polls/HMSPollQuestionAnswer.js +2 -0
- package/lib/module/classes/polls/HMSPollQuestionAnswer.js.map +1 -0
- package/lib/module/classes/polls/HMSPollQuestionCreateParams.js +2 -0
- package/lib/module/classes/polls/HMSPollQuestionCreateParams.js.map +1 -0
- package/lib/module/classes/polls/HMSPollQuestionOption.js +2 -0
- package/lib/module/classes/polls/HMSPollQuestionOption.js.map +1 -0
- package/lib/module/classes/polls/HMSPollQuestionOptionCreateParams.js +2 -0
- package/lib/module/classes/polls/HMSPollQuestionOptionCreateParams.js.map +1 -0
- package/lib/module/classes/polls/HMSPollQuestionQuizOptionCreateParams.js +2 -0
- package/lib/module/classes/polls/HMSPollQuestionQuizOptionCreateParams.js.map +1 -0
- package/lib/module/classes/polls/HMSPollQuestionResponse.js +2 -0
- package/lib/module/classes/polls/HMSPollQuestionResponse.js.map +1 -0
- package/lib/module/classes/polls/HMSPollQuestionResponseCreateParams.js +2 -0
- package/lib/module/classes/polls/HMSPollQuestionResponseCreateParams.js.map +1 -0
- package/lib/module/classes/polls/HMSPollQuestionResponseResult.js +2 -0
- package/lib/module/classes/polls/HMSPollQuestionResponseResult.js.map +1 -0
- package/lib/module/classes/polls/HMSPollQuestionResult.js +2 -0
- package/lib/module/classes/polls/HMSPollQuestionResult.js.map +1 -0
- package/lib/module/classes/polls/HMSPollQuestionType.js +8 -0
- package/lib/module/classes/polls/HMSPollQuestionType.js.map +1 -0
- package/lib/module/classes/polls/HMSPollResponsePeerInfo.js +2 -0
- package/lib/module/classes/polls/HMSPollResponsePeerInfo.js.map +1 -0
- package/lib/module/classes/polls/HMSPollResult.js +2 -0
- package/lib/module/classes/polls/HMSPollResult.js.map +1 -0
- package/lib/module/classes/polls/HMSPollState.js +7 -0
- package/lib/module/classes/polls/HMSPollState.js.map +1 -0
- package/lib/module/classes/polls/HMSPollType.js +6 -0
- package/lib/module/classes/polls/HMSPollType.js.map +1 -0
- package/lib/module/classes/polls/HMSPollUpdateType.js +7 -0
- package/lib/module/classes/polls/HMSPollUpdateType.js.map +1 -0
- package/lib/module/classes/polls/HMSPollUserTrackingMode.js +7 -0
- package/lib/module/classes/polls/HMSPollUserTrackingMode.js.map +1 -0
- package/lib/module/classes/polls/PollLeaderboardResponse.js +2 -0
- package/lib/module/classes/polls/PollLeaderboardResponse.js.map +1 -0
- package/lib/module/classes/transcriptions/HMSTranscript.js +2 -0
- package/lib/module/classes/transcriptions/HMSTranscript.js.map +1 -0
- package/lib/module/classes/transcriptions/OnTranscriptionError.js +2 -0
- package/lib/module/classes/transcriptions/OnTranscriptionError.js.map +1 -0
- package/lib/module/classes/transcriptions/TranscriptionState.js +8 -0
- package/lib/module/classes/transcriptions/TranscriptionState.js.map +1 -0
- package/lib/module/classes/transcriptions/Transcriptions.js +2 -0
- package/lib/module/classes/transcriptions/Transcriptions.js.map +1 -0
- package/lib/module/classes/transcriptions/TranscriptionsMode.js +6 -0
- package/lib/module/classes/transcriptions/TranscriptionsMode.js.map +1 -0
- package/lib/module/classes/transcriptions/index.js +6 -0
- package/lib/module/classes/transcriptions/index.js.map +1 -0
- package/lib/module/classes/whiteboard/HMSWhiteboard.js +2 -0
- package/lib/module/classes/whiteboard/HMSWhiteboard.js.map +1 -0
- package/lib/module/classes/whiteboard/HMSWhiteboardListenerActions.js +5 -0
- package/lib/module/classes/whiteboard/HMSWhiteboardListenerActions.js.map +1 -0
- package/lib/module/classes/whiteboard/HMSWhiteboardState.js +6 -0
- package/lib/module/classes/whiteboard/HMSWhiteboardState.js.map +1 -0
- package/lib/module/classes/whiteboard/HMSWhiteboardUpdateType.js +6 -0
- package/lib/module/classes/whiteboard/HMSWhiteboardUpdateType.js.map +1 -0
- package/lib/module/classes/whiteboard/index.js +4 -0
- package/lib/module/classes/whiteboard/index.js.map +1 -0
- package/lib/module/classes/whiteboard/registerCallbacks.js +18 -0
- package/lib/module/classes/whiteboard/registerCallbacks.js.map +1 -0
- package/lib/module/components/HMSHLSPlayer/HMSHLSPlayer.js +157 -49
- package/lib/module/components/HMSHLSPlayer/HMSHLSPlayer.js.map +1 -1
- package/lib/module/components/HMSHLSPlayer/RCTHMSHLSPlayer.js +3 -3
- package/lib/module/components/HMSHLSPlayer/RCTHMSHLSPlayer.js.map +1 -1
- package/lib/module/components/HMSHLSPlayer/hooks.js +16 -4
- package/lib/module/components/HMSHLSPlayer/hooks.js.map +1 -1
- package/lib/module/components/HMSHLSPlayer/index.js +1 -1
- package/lib/module/components/HMSHLSPlayer/index.js.map +1 -1
- package/lib/module/hooks/hmsviews.js +12 -0
- package/lib/module/hooks/hmsviews.js.map +1 -0
- package/lib/module/hooks/polls.js +12 -0
- package/lib/module/hooks/polls.js.map +1 -0
- package/lib/module/hooks/useHMSPeerUpdates.js +1 -2
- package/lib/module/hooks/useHMSPeerUpdates.js.map +1 -1
- package/lib/module/index.js +29 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/modules/HMSManagerModule.js +3 -0
- package/lib/module/modules/HMSManagerModule.js.map +1 -0
- package/lib/module/specs/HMSHLSPlayerNativeComponent.js +69 -0
- package/lib/module/specs/HMSHLSPlayerNativeComponent.js.map +1 -0
- package/lib/module/specs/HMSViewNativeComponent.js +49 -0
- package/lib/module/specs/HMSViewNativeComponent.js.map +1 -0
- package/lib/module/specs/NativeHMSManager.js +33 -0
- package/lib/module/specs/NativeHMSManager.js.map +1 -0
- package/lib/module/stores/hls-player-playback-slice.js +10 -0
- package/lib/module/stores/hls-player-playback-slice.js.map +1 -1
- package/lib/module/stores/hls-player-stats-store.js +27 -15
- package/lib/module/stores/hls-player-stats-store.js.map +1 -1
- package/lib/module/stores/hms-interactivity-store.js +15 -0
- package/lib/module/stores/hms-interactivity-store.js.map +1 -0
- package/lib/module/stores/hms-polls-slice.js +12 -0
- package/lib/module/stores/hms-polls-slice.js.map +1 -0
- package/lib/module/stores/hms-store.js +5 -5
- package/lib/module/stores/hms-store.js.map +1 -1
- package/lib/module/stores/hmsviews-slice.js +12 -0
- package/lib/module/stores/hmsviews-slice.js.map +1 -0
- package/lib/module/stores/types.js.map +1 -1
- package/lib/module/types.js +3 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/emitter/EventEmitter.js +23 -7
- package/lib/module/utils/emitter/EventEmitter.js.map +1 -1
- package/lib/module/utils/emitter/_EmitterSubscription.js +3 -3
- package/lib/module/utils/emitter/_EmitterSubscription.js.map +1 -1
- package/lib/module/utils/emitter/_EventSubscription.js +3 -3
- package/lib/module/utils/emitter/_EventSubscription.js.map +1 -1
- package/lib/module/utils/emitter/_EventSubscriptionVendor.js +3 -4
- package/lib/module/utils/emitter/_EventSubscriptionVendor.js.map +1 -1
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/keyboard.js +38 -0
- package/lib/module/utils/keyboard.js.map +1 -0
- package/lib/module/utils/notification.js +5 -0
- package/lib/module/utils/notification.js.map +1 -0
- package/lib/module/utils/windowController.js +22 -0
- package/lib/module/utils/windowController.js.map +1 -0
- package/lib/typescript/classes/HMSAudioDevice.d.ts +14 -0
- package/lib/typescript/classes/HMSAudioMixingMode.d.ts +11 -0
- package/lib/typescript/classes/HMSAudioTrack.d.ts +9 -0
- package/lib/typescript/classes/HMSAudioTrackSettings.d.ts +9 -0
- package/lib/typescript/classes/HMSBrowserRecordingState.d.ts +3 -0
- package/lib/typescript/classes/HMSCameraFacing.d.ts +11 -0
- package/lib/typescript/classes/HMSConfig.d.ts +27 -0
- package/lib/typescript/classes/HMSEncoder.d.ts +5 -0
- package/lib/typescript/classes/HMSException.d.ts +18 -0
- package/lib/typescript/classes/HMSHLSPlaylistType.d.ts +4 -0
- package/lib/typescript/classes/HMSHLSRecordingState.d.ts +6 -4
- package/lib/typescript/classes/HMSHLSStreamingState.d.ts +8 -0
- package/lib/typescript/classes/HMSHLSTimedMetadata.d.ts +16 -0
- package/lib/typescript/classes/HMSHLSVariant.d.ts +3 -0
- package/lib/typescript/classes/HMSIOSAudioMode.d.ts +15 -0
- package/lib/typescript/classes/HMSInteractivityCenter.d.ts +62 -0
- package/lib/typescript/classes/HMSInteractivityEncoder.d.ts +9 -0
- package/lib/typescript/classes/HMSLogAlarmManager.d.ts +12 -0
- package/lib/typescript/classes/HMSLogLevel.d.ts +12 -0
- package/lib/typescript/classes/HMSLogSettings.d.ts +14 -0
- package/lib/typescript/classes/HMSNetworkQuality.d.ts +11 -0
- package/lib/typescript/classes/HMSNoiseCancellationPlugin.d.ts +87 -0
- package/lib/typescript/classes/HMSPIPConfig.d.ts +47 -0
- package/lib/typescript/classes/HMSPIPListenerActions.d.ts +17 -0
- package/lib/typescript/classes/HMSPeer.d.ts +144 -1
- package/lib/typescript/classes/HMSPeerListIterator.d.ts +3 -1
- package/lib/typescript/classes/HMSPeerListIteratorOptions.d.ts +19 -0
- package/lib/typescript/classes/HMSPeerType.d.ts +16 -0
- package/lib/typescript/classes/HMSPeersCache.d.ts +2 -0
- package/lib/typescript/classes/HMSPermissions.d.ts +18 -0
- package/lib/typescript/classes/HMSPollsListenerActions.d.ts +3 -0
- package/lib/typescript/classes/HMSRTMPConfig.d.ts +14 -0
- package/lib/typescript/classes/HMSRecordingState.d.ts +9 -0
- package/lib/typescript/classes/HMSRole.d.ts +17 -0
- package/lib/typescript/classes/HMSRoom.d.ts +3 -0
- package/lib/typescript/classes/HMSRoomUpdate.d.ts +2 -1
- package/lib/typescript/classes/HMSRtmpStreamingState.d.ts +3 -2
- package/lib/typescript/classes/HMSRtmpVideoResolution.d.ts +13 -0
- package/lib/typescript/classes/HMSSDK.d.ts +1123 -249
- package/lib/typescript/classes/HMSServerRecordingState.d.ts +3 -0
- package/lib/typescript/classes/HMSSessionStore.d.ts +23 -22
- package/lib/typescript/classes/HMSStreamingState.d.ts +7 -0
- package/lib/typescript/classes/HMSTrack.d.ts +13 -0
- package/lib/typescript/classes/HMSTrackSettings.d.ts +10 -0
- package/lib/typescript/classes/HMSTrackSettingsInitState.d.ts +11 -0
- package/lib/typescript/classes/HMSTrackSource.d.ts +10 -0
- package/lib/typescript/classes/HMSTrackType.d.ts +7 -0
- package/lib/typescript/classes/HMSUpdateListenerActions.d.ts +290 -3
- package/lib/typescript/classes/HMSVideoTrack.d.ts +17 -0
- package/lib/typescript/classes/HMSVideoTrackSettings.d.ts +23 -2
- package/lib/typescript/classes/HmsView.d.ts +16 -0
- package/lib/typescript/classes/polls/DecodedPollLeaderboardResponse.d.ts +37 -0
- package/lib/typescript/classes/polls/HMSPoll.d.ts +73 -0
- package/lib/typescript/classes/polls/HMSPollCategory.d.ts +10 -0
- package/lib/typescript/classes/polls/HMSPollCreateParams.d.ts +6 -0
- package/lib/typescript/classes/polls/HMSPollLeaderboardEntry.d.ts +9 -0
- package/lib/typescript/classes/polls/HMSPollLeaderboardSummary.d.ts +7 -0
- package/lib/typescript/classes/polls/HMSPollQuestion.d.ts +61 -0
- package/lib/typescript/classes/polls/HMSPollQuestionAnswer.d.ts +17 -0
- package/lib/typescript/classes/polls/HMSPollQuestionCreateParams.d.ts +25 -0
- package/lib/typescript/classes/polls/HMSPollQuestionOption.d.ts +21 -0
- package/lib/typescript/classes/polls/HMSPollQuestionOptionCreateParams.d.ts +3 -0
- package/lib/typescript/classes/polls/HMSPollQuestionQuizOptionCreateParams.d.ts +4 -0
- package/lib/typescript/classes/polls/HMSPollQuestionResponse.d.ts +47 -0
- package/lib/typescript/classes/polls/HMSPollQuestionResponseCreateParams.d.ts +2 -0
- package/lib/typescript/classes/polls/HMSPollQuestionResponseResult.d.ts +17 -0
- package/lib/typescript/classes/polls/HMSPollQuestionResult.d.ts +29 -0
- package/lib/typescript/classes/polls/HMSPollQuestionType.d.ts +18 -0
- package/lib/typescript/classes/polls/HMSPollResponsePeerInfo.d.ts +21 -0
- package/lib/typescript/classes/polls/HMSPollResult.d.ts +22 -0
- package/lib/typescript/classes/polls/HMSPollState.d.ts +14 -0
- package/lib/typescript/classes/polls/HMSPollType.d.ts +4 -0
- package/lib/typescript/classes/polls/HMSPollUpdateType.d.ts +5 -0
- package/lib/typescript/classes/polls/HMSPollUserTrackingMode.d.ts +14 -0
- package/lib/typescript/classes/polls/PollLeaderboardResponse.d.ts +7 -0
- package/lib/typescript/classes/transcriptions/HMSTranscript.d.ts +8 -0
- package/lib/typescript/classes/transcriptions/OnTranscriptionError.d.ts +4 -0
- package/lib/typescript/classes/transcriptions/TranscriptionState.d.ts +6 -0
- package/lib/typescript/classes/transcriptions/Transcriptions.d.ts +12 -0
- package/lib/typescript/classes/transcriptions/TranscriptionsMode.d.ts +4 -0
- package/lib/typescript/classes/transcriptions/index.d.ts +5 -0
- package/lib/typescript/classes/whiteboard/HMSWhiteboard.d.ts +10 -0
- package/lib/typescript/classes/whiteboard/HMSWhiteboardListenerActions.d.ts +3 -0
- package/lib/typescript/classes/whiteboard/HMSWhiteboardState.d.ts +4 -0
- package/lib/typescript/classes/whiteboard/HMSWhiteboardUpdateType.d.ts +4 -0
- package/lib/typescript/classes/whiteboard/index.d.ts +3 -0
- package/lib/typescript/classes/whiteboard/registerCallbacks.d.ts +8 -0
- package/lib/typescript/components/HMSHLSPlayer/HMSHLSPlayer.d.ts +6 -0
- package/lib/typescript/components/HMSHLSPlayer/RCTHMSHLSPlayer.d.ts +11 -9
- package/lib/typescript/components/HMSHLSPlayer/hooks.d.ts +5 -0
- package/lib/typescript/components/HMSHLSPlayer/index.d.ts +1 -1
- package/lib/typescript/hooks/hmsviews.d.ts +3 -0
- package/lib/typescript/hooks/polls.d.ts +3 -0
- package/lib/typescript/index.d.ts +29 -2
- package/lib/typescript/specs/HMSHLSPlayerNativeComponent.d.ts +115 -0
- package/lib/typescript/specs/HMSViewNativeComponent.d.ts +97 -0
- package/lib/typescript/specs/NativeHMSManager.d.ts +147 -0
- package/lib/typescript/stores/hls-player-stats-store.d.ts +4 -3
- package/lib/typescript/stores/hms-interactivity-store.d.ts +9 -0
- package/lib/typescript/stores/hms-polls-slice.d.ts +5 -0
- package/lib/typescript/stores/hms-store.d.ts +4 -3
- package/lib/typescript/stores/hmsviews-slice.d.ts +5 -0
- package/lib/typescript/stores/types.d.ts +27 -3
- package/lib/typescript/types.d.ts +18 -5
- package/lib/typescript/utils/emitter/EventEmitter.d.ts +7 -0
- package/lib/typescript/utils/keyboard.d.ts +16 -0
- package/lib/typescript/utils/notification.d.ts +5 -0
- package/lib/typescript/utils/windowController.d.ts +10 -0
- package/package.json +49 -7
- package/react-native-hms.podspec +56 -2
- package/sdk-versions.json +4 -3
- package/src/classes/HMSAudioDevice.ts +18 -0
- package/src/classes/HMSAudioMixingMode.ts +11 -0
- package/src/classes/HMSAudioTrack.ts +9 -0
- package/src/classes/HMSAudioTrackSettings.ts +11 -0
- package/src/classes/HMSBrowserRecordingState.ts +4 -0
- package/src/classes/HMSCameraControl.ts +1 -1
- package/src/classes/HMSCameraFacing.ts +11 -0
- package/src/classes/HMSConfig.ts +27 -0
- package/src/classes/HMSEncoder.ts +57 -4
- package/src/classes/HMSException.ts +18 -0
- package/src/classes/HMSHLSPlaylistType.ts +4 -0
- package/src/classes/HMSHLSRecordingState.ts +9 -7
- package/src/classes/HMSHLSStreamingState.ts +15 -1
- package/src/classes/HMSHLSTimedMetadata.ts +16 -0
- package/src/classes/HMSHLSVariant.ts +5 -0
- package/src/classes/HMSIOSAudioMode.ts +15 -0
- package/src/classes/HMSInteractivityCenter.ts +246 -0
- package/src/classes/HMSInteractivityEncoder.ts +92 -0
- package/src/classes/HMSLogAlarmManager.ts +12 -0
- package/src/classes/HMSLogLevel.ts +12 -0
- package/src/classes/HMSLogSettings.ts +14 -0
- package/src/classes/HMSNativeEventEmitter.ts +1 -7
- package/src/classes/HMSNativeEventListener.ts +1 -1
- package/src/classes/HMSNetworkQuality.ts +11 -0
- package/src/classes/HMSNoiseCancellationPlugin.ts +162 -0
- package/src/classes/HMSPIPConfig.ts +54 -0
- package/src/classes/HMSPIPListenerActions.ts +18 -0
- package/src/classes/HMSPeer.ts +193 -3
- package/src/classes/HMSPeerListIterator.ts +29 -7
- package/src/classes/HMSPeerListIteratorOptions.ts +21 -0
- package/src/classes/HMSPeerType.ts +20 -0
- package/src/classes/HMSPeersCache.ts +3 -1
- package/src/classes/HMSPermissions.ts +25 -0
- package/src/classes/HMSPollsListenerActions.ts +3 -0
- package/src/classes/HMSRTMPConfig.ts +14 -0
- package/src/classes/HMSRecordingState.ts +9 -0
- package/src/classes/HMSRole.ts +17 -0
- package/src/classes/HMSRoom.ts +27 -0
- package/src/classes/HMSRoomCache.ts +10 -1
- package/src/classes/HMSRoomUpdate.ts +1 -0
- package/src/classes/HMSRtmpStreamingState.ts +4 -3
- package/src/classes/HMSRtmpVideoResolution.ts +13 -0
- package/src/classes/HMSSDK.tsx +1379 -345
- package/src/classes/HMSServerRecordingState.ts +4 -0
- package/src/classes/HMSSessionStore.ts +34 -45
- package/src/classes/HMSStreamingState.ts +7 -0
- package/src/classes/HMSTrack.ts +13 -0
- package/src/classes/HMSTrackSettings.ts +10 -0
- package/src/classes/HMSTrackSettingsInitState.ts +11 -0
- package/src/classes/HMSTrackSource.ts +10 -0
- package/src/classes/HMSTrackType.ts +7 -0
- package/src/classes/HMSUpdateListenerActions.ts +313 -3
- package/src/classes/HMSVideoTrack.ts +17 -0
- package/src/classes/HMSVideoTrackSettings.ts +27 -2
- package/src/classes/HmsView.tsx +92 -57
- package/src/classes/polls/DecodedPollLeaderboardResponse.ts +43 -0
- package/src/classes/polls/HMSPoll.ts +99 -0
- package/src/classes/polls/HMSPollCategory.ts +11 -0
- package/src/classes/polls/HMSPollCreateParams.ts +19 -0
- package/src/classes/polls/HMSPollLeaderboardEntry.ts +10 -0
- package/src/classes/polls/HMSPollLeaderboardSummary.ts +7 -0
- package/src/classes/polls/HMSPollQuestion.ts +92 -0
- package/src/classes/polls/HMSPollQuestionAnswer.ts +29 -0
- package/src/classes/polls/HMSPollQuestionCreateParams.ts +36 -0
- package/src/classes/polls/HMSPollQuestionOption.ts +24 -0
- package/src/classes/polls/HMSPollQuestionOptionCreateParams.ts +8 -0
- package/src/classes/polls/HMSPollQuestionQuizOptionCreateParams.ts +6 -0
- package/src/classes/polls/HMSPollQuestionResponse.ts +72 -0
- package/src/classes/polls/HMSPollQuestionResponseCreateParams.ts +6 -0
- package/src/classes/polls/HMSPollQuestionResponseResult.ts +19 -0
- package/src/classes/polls/HMSPollQuestionResult.ts +41 -0
- package/src/classes/polls/HMSPollQuestionType.ts +21 -0
- package/src/classes/polls/HMSPollResponsePeerInfo.ts +24 -0
- package/src/classes/polls/HMSPollResult.ts +26 -0
- package/src/classes/polls/HMSPollState.ts +16 -0
- package/src/classes/polls/HMSPollType.ts +4 -0
- package/src/classes/polls/HMSPollUpdateType.ts +5 -0
- package/src/classes/polls/HMSPollUserTrackingMode.ts +16 -0
- package/src/classes/polls/PollLeaderboardResponse.ts +8 -0
- package/src/classes/transcriptions/HMSTranscript.ts +13 -0
- package/src/classes/transcriptions/OnTranscriptionError.ts +5 -0
- package/src/classes/transcriptions/TranscriptionState.ts +6 -0
- package/src/classes/transcriptions/Transcriptions.ts +19 -0
- package/src/classes/transcriptions/TranscriptionsMode.ts +4 -0
- package/src/classes/transcriptions/index.ts +5 -0
- package/src/classes/whiteboard/HMSWhiteboard.tsx +16 -0
- package/src/classes/whiteboard/HMSWhiteboardListenerActions.ts +3 -0
- package/src/classes/whiteboard/HMSWhiteboardState.tsx +4 -0
- package/src/classes/whiteboard/HMSWhiteboardUpdateType.tsx +4 -0
- package/src/classes/whiteboard/index.ts +3 -0
- package/src/classes/whiteboard/registerCallbacks.ts +34 -0
- package/src/components/HMSHLSPlayer/HMSHLSPlayer.tsx +176 -92
- package/src/components/HMSHLSPlayer/RCTHMSHLSPlayer.ts +20 -13
- package/src/components/HMSHLSPlayer/hooks.ts +22 -4
- package/src/components/HMSHLSPlayer/index.ts +3 -0
- package/src/hooks/hmsviews.ts +15 -0
- package/src/hooks/polls.ts +14 -0
- package/src/index.ts +38 -3
- package/src/modules/HMSManagerModule.ts +5 -0
- package/src/specs/HMSHLSPlayerNativeComponent.ts +203 -0
- package/src/specs/HMSViewNativeComponent.ts +119 -0
- package/src/specs/NativeHMSManager.ts +307 -0
- package/src/stores/hls-player-playback-slice.ts +11 -0
- package/src/stores/hls-player-stats-store.ts +28 -18
- package/src/stores/hms-interactivity-store.ts +18 -0
- package/src/stores/hms-polls-slice.ts +20 -0
- package/src/stores/hms-store.ts +2 -0
- package/src/stores/hmsviews-slice.ts +20 -0
- package/src/stores/types.ts +50 -4
- package/src/types.ts +28 -3
- package/src/utils/emitter/EventEmitter.ts +26 -0
- package/src/utils/keyboard.ts +37 -0
- package/src/utils/notification.ts +10 -0
- package/src/utils/windowController.ts +23 -0
- 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.7.1/gc.properties +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/fileChanges/last-build.bin +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/6.9/fileHashes/resourceHashesCache.bin +0 -0
- package/android/.gradle/6.9/gc.properties +0 -0
- package/android/.gradle/6.9/javaCompile/classAnalysis.bin +0 -0
- package/android/.gradle/6.9/javaCompile/jarAnalysis.bin +0 -0
- package/android/.gradle/6.9/javaCompile/javaCompile.lock +0 -0
- package/android/.gradle/6.9/javaCompile/taskHistory.bin +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- 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/.gradle/configuration-cache/gc.properties +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/compiler.xml +0 -6
- package/android/.idea/gradle.xml +0 -18
- package/android/.idea/jarRepositories.xml +0 -45
- package/android/.idea/misc.xml +0 -10
- package/android/.idea/vcs.xml +0 -6
- package/android/local.properties +0 -8
- package/android/src/main/java/com/reactnativehmssdk/HMSHLSPlayerManager.kt +0 -114
- package/android/src/main/java/com/reactnativehmssdk/HMSSDKViewManager.kt +0 -115
- 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/jatinnagar.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/Hmssdk.xcodeproj/xcuserdata/jatinnagar.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
- package/lib/commonjs/classes/HMSManagerModule.js +0 -18
- package/lib/commonjs/classes/HMSManagerModule.js.map +0 -1
- package/lib/module/classes/HMSManagerModule.js +0 -11
- package/lib/module/classes/HMSManagerModule.js.map +0 -1
- package/src/classes/HMSManagerModule.ts +0 -18
- /package/lib/typescript/{classes → modules}/HMSManagerModule.d.ts +0 -0
|
@@ -6,10 +6,33 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.HMSPeer = void 0;
|
|
7
7
|
var _HMSPeersCache = require("./HMSPeersCache");
|
|
8
8
|
var _HMSConstants = require("./HMSConstants");
|
|
9
|
-
|
|
10
|
-
function
|
|
11
|
-
function
|
|
9
|
+
var _HMSPeerType = require("./HMSPeerType");
|
|
10
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
12
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
|
+
/**
|
|
14
|
+
* Represents a peer in the HMS ecosystem.
|
|
15
|
+
*
|
|
16
|
+
* This class encapsulates the properties and state of a peer within a session, including their ID, name, role, and various status flags.
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @class HMSPeer
|
|
20
|
+
* @property {string} peerID - The unique identifier for the peer.
|
|
21
|
+
* @property {string | undefined} _name - The name of the peer. Private access.
|
|
22
|
+
* @property {boolean | undefined} _isLocal - Flag indicating whether the peer is the local user. Private access.
|
|
23
|
+
* @property {string | undefined} _customerUserID - An optional custom user ID set by the application. Private access.
|
|
24
|
+
* @property {string | undefined} _metadata - Optional metadata associated with the peer. Private access.
|
|
25
|
+
* @property {HMSRole | undefined} _role - The role assigned to the peer within the session. Private access.
|
|
26
|
+
* @property {boolean} _isHandRaised - Flag indicating whether the peer has raised their hand. Defaults to false. Private access.
|
|
27
|
+
* @property {HMSPeerType} _type - The type of the peer, e.g., regular, screen share. Defaults to `HMSPeerType.REGULAR`. Private access.
|
|
28
|
+
*/
|
|
12
29
|
class HMSPeer {
|
|
30
|
+
_updateName(value) {
|
|
31
|
+
// If `_isLocal` is outdated, update it
|
|
32
|
+
if (this._name !== value) {
|
|
33
|
+
this._name = value;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
13
36
|
_updateIsLocal(value) {
|
|
14
37
|
// If `_isLocal` is outdated, update it
|
|
15
38
|
if (this._isLocal !== value) {
|
|
@@ -40,17 +63,56 @@ class HMSPeer {
|
|
|
40
63
|
this._role = value;
|
|
41
64
|
}
|
|
42
65
|
}
|
|
66
|
+
_updateType(value) {
|
|
67
|
+
// If `_type` is outdated, update it
|
|
68
|
+
if (this._type !== value) {
|
|
69
|
+
this._type = value;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
43
72
|
constructor(params) {
|
|
44
73
|
_defineProperty(this, "peerID", void 0);
|
|
45
|
-
_defineProperty(this, "
|
|
74
|
+
_defineProperty(this, "_name", void 0);
|
|
46
75
|
_defineProperty(this, "_isLocal", void 0);
|
|
47
76
|
_defineProperty(this, "_customerUserID", void 0);
|
|
48
77
|
_defineProperty(this, "_metadata", void 0);
|
|
49
78
|
_defineProperty(this, "_role", void 0);
|
|
50
79
|
_defineProperty(this, "_isHandRaised", false);
|
|
80
|
+
_defineProperty(this, "_type", _HMSPeerType.HMSPeerType.REGULAR);
|
|
51
81
|
this.peerID = params.peerID;
|
|
52
|
-
this.
|
|
82
|
+
this._name = params.name;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Gets the name of the peer.
|
|
87
|
+
*
|
|
88
|
+
* This getter method retrieves the name of the peer. If the name has already been set locally, it returns that value.
|
|
89
|
+
* Otherwise, it attempts to retrieve the name from the HMS peers cache. If the cache does not contain the name,
|
|
90
|
+
* it falls back to fetching the name directly from the native layer using the peer's ID.
|
|
91
|
+
* Once a value is retrieved, it updates the local `_name` property to ensure consistency.
|
|
92
|
+
*
|
|
93
|
+
* @returns {string | undefined} The name of the peer if available, otherwise `undefined`.
|
|
94
|
+
*/
|
|
95
|
+
get name() {
|
|
96
|
+
if (this._name) {
|
|
97
|
+
return this._name;
|
|
98
|
+
}
|
|
99
|
+
const hmsPeersCache = (0, _HMSPeersCache.getHmsPeersCache)();
|
|
100
|
+
const value = hmsPeersCache ? hmsPeersCache.getProperty(this.peerID, 'name') : (0, _HMSPeersCache.getPeerPropertyFromNative)(_HMSConstants.HMSConstants.DEFAULT_SDK_ID, this.peerID, 'name');
|
|
101
|
+
if (typeof value === 'string') {
|
|
102
|
+
this._updateName(value);
|
|
103
|
+
}
|
|
104
|
+
return value ?? this._name;
|
|
53
105
|
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Determines if the peer is the local user.
|
|
109
|
+
*
|
|
110
|
+
* This getter method checks if the peer is the local user by first attempting to retrieve the 'isLocal' property value from the HMS peers cache.
|
|
111
|
+
* If the value is not found in the cache, it falls back to fetching the property directly from the native layer using the peer's ID.
|
|
112
|
+
* Once a value is retrieved, it updates the local `_isLocal` property to ensure the value is current.
|
|
113
|
+
*
|
|
114
|
+
* @returns {boolean | undefined} True if the peer is the local user, false otherwise. Returns `undefined` if the information is not available.
|
|
115
|
+
*/
|
|
54
116
|
get isLocal() {
|
|
55
117
|
const hmsPeersCache = (0, _HMSPeersCache.getHmsPeersCache)();
|
|
56
118
|
const value = hmsPeersCache ? hmsPeersCache.getProperty(this.peerID, 'isLocal') : (0, _HMSPeersCache.getPeerPropertyFromNative)(_HMSConstants.HMSConstants.DEFAULT_SDK_ID, this.peerID, 'isLocal');
|
|
@@ -59,6 +121,19 @@ class HMSPeer {
|
|
|
59
121
|
}
|
|
60
122
|
return value ?? this._isLocal;
|
|
61
123
|
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Checks if the peer has raised their hand.
|
|
127
|
+
*
|
|
128
|
+
* This getter method determines whether the peer has their hand raised in the session. It first attempts to retrieve the 'isHandRaised' property value
|
|
129
|
+
* from the HMS peers cache. If the value is not found in the cache, it falls back to fetching the property directly from the native layer using the peer's ID.
|
|
130
|
+
* Once a value is retrieved, it updates the local `_isHandRaised` property to ensure the value is current and consistent.
|
|
131
|
+
*
|
|
132
|
+
* @returns {boolean} True if the peer has their hand raised, false otherwise. Defaults to false if the information is not available.
|
|
133
|
+
*
|
|
134
|
+
* @see https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/peer/large-room
|
|
135
|
+
*
|
|
136
|
+
*/
|
|
62
137
|
get isHandRaised() {
|
|
63
138
|
const hmsPeersCache = (0, _HMSPeersCache.getHmsPeersCache)();
|
|
64
139
|
const value = hmsPeersCache ? hmsPeersCache.getProperty(this.peerID, 'isHandRaised') : (0, _HMSPeersCache.getPeerPropertyFromNative)(_HMSConstants.HMSConstants.DEFAULT_SDK_ID, this.peerID, 'isHandRaised');
|
|
@@ -67,6 +142,19 @@ class HMSPeer {
|
|
|
67
142
|
}
|
|
68
143
|
return value ?? this._isHandRaised;
|
|
69
144
|
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Retrieves the network quality of the peer.
|
|
148
|
+
*
|
|
149
|
+
* This getter method attempts to obtain the network quality of the peer, which is an indicator of the current network conditions affecting the peer's connection.
|
|
150
|
+
* It first tries to get this information from the HMS peers cache. If the information is not available in the cache,
|
|
151
|
+
* it falls back to fetching the network quality directly from the native layer using the peer's ID.
|
|
152
|
+
* The network quality is represented by the `HMSNetworkQuality` type, which may include values such as 'good', 'poor', etc., depending on the implementation.
|
|
153
|
+
*
|
|
154
|
+
* @returns {HMSNetworkQuality | undefined} The network quality of the peer if available, otherwise `undefined`.
|
|
155
|
+
*
|
|
156
|
+
* @see https://www.100ms.live/docs/react-native/v2/how-to-guides/measure-network-quality-and-performance/network-quality
|
|
157
|
+
*/
|
|
70
158
|
get networkQuality() {
|
|
71
159
|
const hmsPeersCache = (0, _HMSPeersCache.getHmsPeersCache)();
|
|
72
160
|
if (hmsPeersCache) {
|
|
@@ -74,6 +162,17 @@ class HMSPeer {
|
|
|
74
162
|
}
|
|
75
163
|
return (0, _HMSPeersCache.getPeerPropertyFromNative)(_HMSConstants.HMSConstants.DEFAULT_SDK_ID, this.peerID, 'networkQuality');
|
|
76
164
|
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Retrieves the custom user ID of the peer.
|
|
168
|
+
*
|
|
169
|
+
* This getter method attempts to obtain the custom user ID of the peer, which is an optional identifier that can be set by the application.
|
|
170
|
+
* It first tries to get this information from the HMS peers cache. If the information is not available in the cache,
|
|
171
|
+
* it falls back to fetching the custom user ID directly from the native layer using the peer's ID.
|
|
172
|
+
* Once a value is retrieved, it updates the local `_customerUserID` property to ensure the value is current and consistent.
|
|
173
|
+
*
|
|
174
|
+
* @returns {string | undefined} The custom user ID of the peer if available, otherwise `undefined`.
|
|
175
|
+
*/
|
|
77
176
|
get customerUserID() {
|
|
78
177
|
const hmsPeersCache = (0, _HMSPeersCache.getHmsPeersCache)();
|
|
79
178
|
const value = hmsPeersCache ? hmsPeersCache.getProperty(this.peerID, 'customerUserID') : (0, _HMSPeersCache.getPeerPropertyFromNative)(_HMSConstants.HMSConstants.DEFAULT_SDK_ID, this.peerID, 'customerUserID');
|
|
@@ -82,6 +181,19 @@ class HMSPeer {
|
|
|
82
181
|
}
|
|
83
182
|
return value ?? this._customerUserID;
|
|
84
183
|
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Retrieves the metadata associated with the peer.
|
|
187
|
+
*
|
|
188
|
+
* This getter method attempts to obtain the metadata of the peer, which can include any additional information set by the application.
|
|
189
|
+
* It first tries to get this information from the HMS peers cache. If the information is not available in the cache,
|
|
190
|
+
* it falls back to fetching the metadata directly from the native layer using the peer's ID.
|
|
191
|
+
* Once a value is retrieved, it updates the local `_metadata` property to ensure the value is current and consistent.
|
|
192
|
+
*
|
|
193
|
+
* @returns {string | undefined} The metadata of the peer if available, otherwise `undefined`.
|
|
194
|
+
*
|
|
195
|
+
* @see https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/peer/change-metadata
|
|
196
|
+
*/
|
|
85
197
|
get metadata() {
|
|
86
198
|
const hmsPeersCache = (0, _HMSPeersCache.getHmsPeersCache)();
|
|
87
199
|
const value = hmsPeersCache ? hmsPeersCache.getProperty(this.peerID, 'metadata') : (0, _HMSPeersCache.getPeerPropertyFromNative)(_HMSConstants.HMSConstants.DEFAULT_SDK_ID, this.peerID, 'metadata');
|
|
@@ -90,6 +202,19 @@ class HMSPeer {
|
|
|
90
202
|
}
|
|
91
203
|
return value ?? this._metadata;
|
|
92
204
|
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Retrieves the role of the peer.
|
|
208
|
+
*
|
|
209
|
+
* This getter method attempts to obtain the role assigned to the peer within the session. The role can define permissions and capabilities
|
|
210
|
+
* within the session context. It first tries to get this information from the HMS peers cache. If the role information is not available in the cache,
|
|
211
|
+
* it falls back to fetching the role directly from the native layer using the peer's ID. Once a value is retrieved, it updates the local `_role`
|
|
212
|
+
* property to ensure the value is current and consistent.
|
|
213
|
+
*
|
|
214
|
+
* @returns {HMSRole | undefined} The role of the peer if available, otherwise `undefined`.
|
|
215
|
+
*
|
|
216
|
+
* @see https://www.100ms.live/docs/get-started/v2/get-started/concepts/templates-and-roles
|
|
217
|
+
*/
|
|
93
218
|
get role() {
|
|
94
219
|
const hmsPeersCache = (0, _HMSPeersCache.getHmsPeersCache)();
|
|
95
220
|
const value = hmsPeersCache ? hmsPeersCache.getProperty(this.peerID, 'role') : (0, _HMSPeersCache.getPeerPropertyFromNative)(_HMSConstants.HMSConstants.DEFAULT_SDK_ID, this.peerID, 'role');
|
|
@@ -98,6 +223,16 @@ class HMSPeer {
|
|
|
98
223
|
}
|
|
99
224
|
return value ?? this._role;
|
|
100
225
|
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Retrieves the audio track associated with the peer.
|
|
229
|
+
*
|
|
230
|
+
* This getter method attempts to obtain the audio track of the peer. It first tries to get this information from the HMS peers cache.
|
|
231
|
+
* If the audio track information is not available in the cache, it falls back to fetching the audio track directly from the native layer using the peer's ID.
|
|
232
|
+
* This allows for real-time access to the peer's audio track, which can be used for various audio-related functionalities within the application.
|
|
233
|
+
*
|
|
234
|
+
* @returns {HMSAudioTrack | undefined} The audio track of the peer if available, otherwise `undefined`.
|
|
235
|
+
*/
|
|
101
236
|
get audioTrack() {
|
|
102
237
|
const hmsPeersCache = (0, _HMSPeersCache.getHmsPeersCache)();
|
|
103
238
|
if (hmsPeersCache) {
|
|
@@ -105,6 +240,17 @@ class HMSPeer {
|
|
|
105
240
|
}
|
|
106
241
|
return (0, _HMSPeersCache.getPeerPropertyFromNative)(_HMSConstants.HMSConstants.DEFAULT_SDK_ID, this.peerID, 'audioTrack');
|
|
107
242
|
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Retrieves the video track associated with the peer.
|
|
246
|
+
*
|
|
247
|
+
* This getter method attempts to obtain the video track of the peer. It first tries to get this information from the HMS peers cache.
|
|
248
|
+
* If the video track information is not available in the cache, it falls back to fetching the video track directly from the native layer using the peer's ID.
|
|
249
|
+
* This allows for real-time access to the peer's video track, which can be used for various video-related functionalities within the application.
|
|
250
|
+
*
|
|
251
|
+
* @returns {HMSVideoTrack | undefined} The video track of the peer if available, otherwise `undefined`.
|
|
252
|
+
* @see https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/render-video/overview
|
|
253
|
+
*/
|
|
108
254
|
get videoTrack() {
|
|
109
255
|
const hmsPeersCache = (0, _HMSPeersCache.getHmsPeersCache)();
|
|
110
256
|
if (hmsPeersCache) {
|
|
@@ -112,6 +258,19 @@ class HMSPeer {
|
|
|
112
258
|
}
|
|
113
259
|
return (0, _HMSPeersCache.getPeerPropertyFromNative)(_HMSConstants.HMSConstants.DEFAULT_SDK_ID, this.peerID, 'videoTrack');
|
|
114
260
|
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Retrieves the auxiliary tracks associated with the peer.
|
|
264
|
+
*
|
|
265
|
+
* This getter method attempts to obtain the auxiliary tracks of the peer, which can include tracks like screen shares or additional media streams.
|
|
266
|
+
* It first tries to get this information from the HMS peers cache. If the auxiliary track information is not available in the cache,
|
|
267
|
+
* it falls back to fetching the auxiliary tracks directly from the native layer using the peer's ID.
|
|
268
|
+
* This allows for real-time access to the peer's auxiliary tracks, which can be used for various functionalities within the application,
|
|
269
|
+
* such as displaying a screen share or additional video feeds.
|
|
270
|
+
*
|
|
271
|
+
* @returns {HMSTrack[] | undefined} The auxiliary tracks of the peer if available, otherwise `undefined`.
|
|
272
|
+
* @see https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/screenshare
|
|
273
|
+
*/
|
|
115
274
|
get auxiliaryTracks() {
|
|
116
275
|
const hmsPeersCache = (0, _HMSPeersCache.getHmsPeersCache)();
|
|
117
276
|
if (hmsPeersCache) {
|
|
@@ -119,6 +278,28 @@ class HMSPeer {
|
|
|
119
278
|
}
|
|
120
279
|
return (0, _HMSPeersCache.getPeerPropertyFromNative)(_HMSConstants.HMSConstants.DEFAULT_SDK_ID, this.peerID, 'auxiliaryTracks');
|
|
121
280
|
}
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Retrieves the type of the peer.
|
|
284
|
+
*
|
|
285
|
+
* This getter method attempts to obtain the type of the peer, which can indicate whether the peer is a regular participant,
|
|
286
|
+
* a screen share, or another type defined within the `HMSPeerType` enum. It first tries to get this information from the HMS peers cache.
|
|
287
|
+
* If the type information is not available in the cache, it falls back to fetching the type directly from the native layer using the peer's ID.
|
|
288
|
+
* This ensures that the application has real-time access to the peer's type, which can be crucial for handling different peer types differently,
|
|
289
|
+
* such as displaying a screen share in a distinct manner. Once a value is retrieved, it updates the local `_type` property to ensure the value is current.
|
|
290
|
+
*
|
|
291
|
+
* @returns {HMSPeerType} The type of the peer, defaulting to the value stored in `_type` if the information is not available.
|
|
292
|
+
*
|
|
293
|
+
* @see https://www.100ms.live/docs/server-side/v2/how-to-guides/Session%20Initiation%20Protocol%20(SIP)/SIP-Interconnect
|
|
294
|
+
*/
|
|
295
|
+
get type() {
|
|
296
|
+
const hmsPeersCache = (0, _HMSPeersCache.getHmsPeersCache)();
|
|
297
|
+
const value = hmsPeersCache ? hmsPeersCache.getProperty(this.peerID, 'type') : (0, _HMSPeersCache.getPeerPropertyFromNative)(_HMSConstants.HMSConstants.DEFAULT_SDK_ID, this.peerID, 'type');
|
|
298
|
+
if (value) {
|
|
299
|
+
this._updateType(value);
|
|
300
|
+
}
|
|
301
|
+
return value ?? this._type;
|
|
302
|
+
}
|
|
122
303
|
}
|
|
123
304
|
exports.HMSPeer = HMSPeer;
|
|
124
305
|
//# sourceMappingURL=HMSPeer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_HMSPeersCache","require","_HMSConstants","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","HMSPeer","_updateIsLocal","_isLocal","_updateIsHandRaised","_isHandRaised","_updateCustomerUserID","_customerUserID","_updateMetadata","_metadata","_updateRole","_role","constructor","params","peerID","name","isLocal","hmsPeersCache","getHmsPeersCache","getProperty","getPeerPropertyFromNative","HMSConstants","DEFAULT_SDK_ID","isHandRaised","networkQuality","customerUserID","metadata","role","audioTrack","videoTrack","auxiliaryTracks","exports"],"sources":["HMSPeer.ts"],"sourcesContent":["import type { HMSAudioTrack } from './HMSAudioTrack';\nimport type { HMSNetworkQuality } from './HMSNetworkQuality';\nimport type { HMSRole } from './HMSRole';\nimport type { HMSTrack } from './HMSTrack';\nimport type { HMSVideoTrack } from './HMSVideoTrack';\nimport { getHmsPeersCache, getPeerPropertyFromNative } from './HMSPeersCache';\nimport { HMSConstants } from './HMSConstants';\n\nexport class HMSPeer {\n peerID: string;\n name: string;\n private _isLocal: boolean | undefined;\n private _customerUserID: string | undefined;\n private _metadata: string | undefined;\n private _role: HMSRole | undefined;\n private _isHandRaised: boolean = false;\n\n private _updateIsLocal(value: boolean) {\n // If `_isLocal` is outdated, update it\n if (this._isLocal !== value) {\n this._isLocal = value;\n }\n }\n\n private _updateIsHandRaised(value: boolean) {\n // If `_isHandRaised` is outdated, update it\n if (this._isHandRaised !== value) {\n this._isHandRaised = value;\n }\n }\n\n private _updateCustomerUserID(value: string) {\n // If `_customerUserID` is outdated, update it\n if (this._customerUserID !== value) {\n this._customerUserID = value;\n }\n }\n\n private _updateMetadata(value: string) {\n // If `_metadata` is outdated, update it\n if (this._metadata !== value) {\n this._metadata = value;\n }\n }\n\n private _updateRole(value: HMSRole) {\n // If `_role` is outdated, update it\n if (this._role !== value) {\n this._role = value;\n }\n }\n\n constructor(params: { peerID: string; name: string }) {\n this.peerID = params.peerID;\n this.name = params.name;\n }\n\n get isLocal(): boolean | undefined {\n const hmsPeersCache = getHmsPeersCache();\n\n const value = hmsPeersCache\n ? hmsPeersCache.getProperty(this.peerID, 'isLocal')\n : getPeerPropertyFromNative(\n HMSConstants.DEFAULT_SDK_ID,\n this.peerID,\n 'isLocal'\n );\n\n if (typeof value === 'boolean') {\n this._updateIsLocal(value);\n }\n return value ?? this._isLocal;\n }\n\n get isHandRaised(): boolean {\n const hmsPeersCache = getHmsPeersCache();\n\n const value = hmsPeersCache\n ? hmsPeersCache.getProperty(this.peerID, 'isHandRaised')\n : getPeerPropertyFromNative(\n HMSConstants.DEFAULT_SDK_ID,\n this.peerID,\n 'isHandRaised'\n );\n\n if (typeof value === 'boolean') {\n this._updateIsHandRaised(value);\n }\n return value ?? this._isHandRaised;\n }\n\n get networkQuality(): HMSNetworkQuality | undefined {\n const hmsPeersCache = getHmsPeersCache();\n\n if (hmsPeersCache) {\n return hmsPeersCache.getProperty(this.peerID, 'networkQuality');\n }\n\n return getPeerPropertyFromNative(\n HMSConstants.DEFAULT_SDK_ID,\n this.peerID,\n 'networkQuality'\n );\n }\n\n get customerUserID(): string | undefined {\n const hmsPeersCache = getHmsPeersCache();\n\n const value = hmsPeersCache\n ? hmsPeersCache.getProperty(this.peerID, 'customerUserID')\n : getPeerPropertyFromNative(\n HMSConstants.DEFAULT_SDK_ID,\n this.peerID,\n 'customerUserID'\n );\n\n if (value) {\n this._updateCustomerUserID(value);\n }\n return value ?? this._customerUserID;\n }\n\n get metadata(): string | undefined {\n const hmsPeersCache = getHmsPeersCache();\n\n const value = hmsPeersCache\n ? hmsPeersCache.getProperty(this.peerID, 'metadata')\n : getPeerPropertyFromNative(\n HMSConstants.DEFAULT_SDK_ID,\n this.peerID,\n 'metadata'\n );\n\n if (value) {\n this._updateMetadata(value);\n }\n return value ?? this._metadata;\n }\n\n get role(): HMSRole | undefined {\n const hmsPeersCache = getHmsPeersCache();\n\n const value = hmsPeersCache\n ? hmsPeersCache.getProperty(this.peerID, 'role')\n : getPeerPropertyFromNative(\n HMSConstants.DEFAULT_SDK_ID,\n this.peerID,\n 'role'\n );\n\n if (value) {\n this._updateRole(value);\n }\n return value ?? this._role;\n }\n\n get audioTrack(): HMSAudioTrack | undefined {\n const hmsPeersCache = getHmsPeersCache();\n\n if (hmsPeersCache) {\n return hmsPeersCache.getProperty(this.peerID, 'audioTrack');\n }\n\n return getPeerPropertyFromNative(\n HMSConstants.DEFAULT_SDK_ID,\n this.peerID,\n 'audioTrack'\n );\n }\n\n get videoTrack(): HMSVideoTrack | undefined {\n const hmsPeersCache = getHmsPeersCache();\n\n if (hmsPeersCache) {\n return hmsPeersCache.getProperty(this.peerID, 'videoTrack');\n }\n\n return getPeerPropertyFromNative(\n HMSConstants.DEFAULT_SDK_ID,\n this.peerID,\n 'videoTrack'\n );\n }\n\n get auxiliaryTracks(): HMSTrack[] | undefined {\n const hmsPeersCache = getHmsPeersCache();\n\n if (hmsPeersCache) {\n return hmsPeersCache.getProperty(this.peerID, 'auxiliaryTracks');\n }\n\n return getPeerPropertyFromNative(\n HMSConstants.DEFAULT_SDK_ID,\n this.peerID,\n 'auxiliaryTracks'\n );\n }\n}\n"],"mappings":";;;;;;AAKA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AAA8C,SAAAE,gBAAAC,GAAA,EAAAC,GAAA,EAAAC,KAAA,IAAAD,GAAA,GAAAE,cAAA,CAAAF,GAAA,OAAAA,GAAA,IAAAD,GAAA,IAAAI,MAAA,CAAAC,cAAA,CAAAL,GAAA,EAAAC,GAAA,IAAAC,KAAA,EAAAA,KAAA,EAAAI,UAAA,QAAAC,YAAA,QAAAC,QAAA,oBAAAR,GAAA,CAAAC,GAAA,IAAAC,KAAA,WAAAF,GAAA;AAAA,SAAAG,eAAAM,GAAA,QAAAR,GAAA,GAAAS,YAAA,CAAAD,GAAA,2BAAAR,GAAA,gBAAAA,GAAA,GAAAU,MAAA,CAAAV,GAAA;AAAA,SAAAS,aAAAE,KAAA,EAAAC,IAAA,eAAAD,KAAA,iBAAAA,KAAA,kBAAAA,KAAA,MAAAE,IAAA,GAAAF,KAAA,CAAAG,MAAA,CAAAC,WAAA,OAAAF,IAAA,KAAAG,SAAA,QAAAC,GAAA,GAAAJ,IAAA,CAAAK,IAAA,CAAAP,KAAA,EAAAC,IAAA,2BAAAK,GAAA,sBAAAA,GAAA,YAAAE,SAAA,4DAAAP,IAAA,gBAAAF,MAAA,GAAAU,MAAA,EAAAT,KAAA;AAEvC,MAAMU,OAAO,CAAC;EASXC,cAAcA,CAACrB,KAAc,EAAE;IACrC;IACA,IAAI,IAAI,CAACsB,QAAQ,K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EAAE;MACjB,OAAOA,aAAa,CAACE,WAAW,CAAC,IAAI,CAACL,MAAM,EAAE,YAAY,CAAC;IAC7D;IAEA,OAAO,IAAAM,wCAAyB,EAC9BC,0BAAY,CAACC,cAAc,EAC3B,IAAI,CAACR,MAAM,EACX,YACF,CAAC;EACH;EAEA,IAAIgB,eAAeA,CAAA,EAA2B;IAC5C,MAAMb,aAAa,GAAG,IAAAC,+BAAgB,EAAC,CAAC;IAExC,IAAID,aAAa,EAAE;MACjB,OAAOA,aAAa,CAACE,WAAW,CAAC,IAAI,CAACL,MAAM,EAAE,iBAAiB,CAAC;IAClE;IAEA,OAAO,IAAAM,wCAAyB,EAC9BC,0BAAY,CAACC,cAAc,EAC3B,IAAI,CAACR,MAAM,EACX,iBACF,CAAC;EACH;AACF;AAACiB,OAAA,CAAA9B,OAAA,GAAAA,OAAA"}
|
|
1
|
+
{"version":3,"names":["_HMSPeersCache","require","_HMSConstants","_HMSPeerType","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","HMSPeer","_updateName","_name","_updateIsLocal","_isLocal","_updateIsHandRaised","_isHandRaised","_updateCustomerUserID","_customerUserID","_updateMetadata","_metadata","_updateRole","_role","_updateType","_type","constructor","params","HMSPeerType","REGULAR","peerID","name","hmsPeersCache","getHmsPeersCache","getProperty","getPeerPropertyFromNative","HMSConstants","DEFAULT_SDK_ID","isLocal","isHandRaised","networkQuality","customerUserID","metadata","role","audioTrack","videoTrack","auxiliaryTracks","type","exports"],"sources":["HMSPeer.ts"],"sourcesContent":["import type { HMSAudioTrack } from './HMSAudioTrack';\nimport type { HMSNetworkQuality } from './HMSNetworkQuality';\nimport type { HMSRole } from './HMSRole';\nimport type { HMSTrack } from './HMSTrack';\nimport type { HMSVideoTrack } from './HMSVideoTrack';\nimport { getHmsPeersCache, getPeerPropertyFromNative } from './HMSPeersCache';\nimport { HMSConstants } from './HMSConstants';\nimport { HMSPeerType } from './HMSPeerType';\n\n/**\n * Represents a peer in the HMS ecosystem.\n *\n * This class encapsulates the properties and state of a peer within a session, including their ID, name, role, and various status flags.\n *\n * @export\n * @class HMSPeer\n * @property {string} peerID - The unique identifier for the peer.\n * @property {string | undefined} _name - The name of the peer. Private access.\n * @property {boolean | undefined} _isLocal - Flag indicating whether the peer is the local user. Private access.\n * @property {string | undefined} _customerUserID - An optional custom user ID set by the application. Private access.\n * @property {string | undefined} _metadata - Optional metadata associated with the peer. Private access.\n * @property {HMSRole | undefined} _role - The role assigned to the peer within the session. Private access.\n * @property {boolean} _isHandRaised - Flag indicating whether the peer has raised their hand. Defaults to false. Private access.\n * @property {HMSPeerType} _type - The type of the peer, e.g., regular, screen share. Defaults to `HMSPeerType.REGULAR`. Private access.\n */\nexport class HMSPeer {\n peerID: string;\n private _name: string | undefined;\n private _isLocal: boolean | undefined;\n private _customerUserID: string | undefined;\n private _metadata: string | undefined;\n private _role: HMSRole | undefined;\n private _isHandRaised: boolean = false;\n private _type: HMSPeerType = HMSPeerType.REGULAR;\n\n private _updateName(value: string) {\n // If `_isLocal` is outdated, update it\n if (this._name !== value) {\n this._name = value;\n }\n }\n\n private _updateIsLocal(value: boolean) {\n // If `_isLocal` is outdated, update it\n if (this._isLocal !== value) {\n this._isLocal = value;\n }\n }\n\n private _updateIsHandRaised(value: boolean) {\n // If `_isHandRaised` is outdated, update it\n if (this._isHandRaised !== value) {\n this._isHandRaised = value;\n }\n }\n\n private _updateCustomerUserID(value: string) {\n // If `_customerUserID` is outdated, update it\n if (this._customerUserID !== value) {\n this._customerUserID = value;\n }\n }\n\n private _updateMetadata(value: string) {\n // If `_metadata` is outdated, update it\n if (this._metadata !== value) {\n this._metadata = value;\n }\n }\n\n private _updateRole(value: HMSRole) {\n // If `_role` is outdated, update it\n if (this._role !== value) {\n this._role = value;\n }\n }\n\n private _updateType(value: HMSPeerType) {\n // If `_type` is outdated, update it\n if (this._type !== value) {\n this._type = value;\n }\n }\n\n constructor(params: { peerID: string; name: string }) {\n this.peerID = params.peerID;\n this._name = params.name;\n }\n\n /**\n * Gets the name of the peer.\n *\n * This getter method retrieves the name of the peer. If the name has already been set locally, it returns that value.\n * Otherwise, it attempts to retrieve the name from the HMS peers cache. If the cache does not contain the name,\n * it falls back to fetching the name directly from the native layer using the peer's ID.\n * Once a value is retrieved, it updates the local `_name` property to ensure consistency.\n *\n * @returns {string | undefined} The name of the peer if available, otherwise `undefined`.\n */\n get name(): string | undefined {\n if (this._name) {\n return this._name;\n }\n const hmsPeersCache = getHmsPeersCache();\n\n const value = hmsPeersCache\n ? hmsPeersCache.getProperty(this.peerID, 'name')\n : getPeerPropertyFromNative(\n HMSConstants.DEFAULT_SDK_ID,\n this.peerID,\n 'name'\n );\n\n if (typeof value === 'string') {\n this._updateName(value);\n }\n return value ?? this._name;\n }\n\n /**\n * Determines if the peer is the local user.\n *\n * This getter method checks if the peer is the local user by first attempting to retrieve the 'isLocal' property value from the HMS peers cache.\n * If the value is not found in the cache, it falls back to fetching the property directly from the native layer using the peer's ID.\n * Once a value is retrieved, it updates the local `_isLocal` property to ensure the value is current.\n *\n * @returns {boolean | undefined} True if the peer is the local user, false otherwise. Returns `undefined` if the information is not available.\n */\n get isLocal(): boolean | undefined {\n const hmsPeersCache = getHmsPeersCache();\n\n const value = hmsPeersCache\n ? hmsPeersCache.getProperty(this.peerID, 'isLocal')\n : getPeerPropertyFromNative(\n HMSConstants.DEFAULT_SDK_ID,\n this.peerID,\n 'isLocal'\n );\n\n if (typeof value === 'boolean') {\n this._updateIsLocal(value);\n }\n return value ?? this._isLocal;\n }\n\n /**\n * Checks if the peer has raised their hand.\n *\n * This getter method determines whether the peer has their hand raised in the session. It first attempts to retrieve the 'isHandRaised' property value\n * from the HMS peers cache. If the value is not found in the cache, it falls back to fetching the property directly from the native layer using the peer's ID.\n * Once a value is retrieved, it updates the local `_isHandRaised` property to ensure the value is current and consistent.\n *\n * @returns {boolean} True if the peer has their hand raised, false otherwise. Defaults to false if the information is not available.\n *\n * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/peer/large-room\n *\n */\n get isHandRaised(): boolean {\n const hmsPeersCache = getHmsPeersCache();\n\n const value = hmsPeersCache\n ? hmsPeersCache.getProperty(this.peerID, 'isHandRaised')\n : getPeerPropertyFromNative(\n HMSConstants.DEFAULT_SDK_ID,\n this.peerID,\n 'isHandRaised'\n );\n\n if (typeof value === 'boolean') {\n this._updateIsHandRaised(value);\n }\n return value ?? this._isHandRaised;\n }\n\n /**\n * Retrieves the network quality of the peer.\n *\n * This getter method attempts to obtain the network quality of the peer, which is an indicator of the current network conditions affecting the peer's connection.\n * It first tries to get this information from the HMS peers cache. If the information is not available in the cache,\n * it falls back to fetching the network quality directly from the native layer using the peer's ID.\n * The network quality is represented by the `HMSNetworkQuality` type, which may include values such as 'good', 'poor', etc., depending on the implementation.\n *\n * @returns {HMSNetworkQuality | undefined} The network quality of the peer if available, otherwise `undefined`.\n *\n * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/measure-network-quality-and-performance/network-quality\n */\n get networkQuality(): HMSNetworkQuality | undefined {\n const hmsPeersCache = getHmsPeersCache();\n\n if (hmsPeersCache) {\n return hmsPeersCache.getProperty(this.peerID, 'networkQuality');\n }\n\n return getPeerPropertyFromNative(\n HMSConstants.DEFAULT_SDK_ID,\n this.peerID,\n 'networkQuality'\n );\n }\n\n /**\n * Retrieves the custom user ID of the peer.\n *\n * This getter method attempts to obtain the custom user ID of the peer, which is an optional identifier that can be set by the application.\n * It first tries to get this information from the HMS peers cache. If the information is not available in the cache,\n * it falls back to fetching the custom user ID directly from the native layer using the peer's ID.\n * Once a value is retrieved, it updates the local `_customerUserID` property to ensure the value is current and consistent.\n *\n * @returns {string | undefined} The custom user ID of the peer if available, otherwise `undefined`.\n */\n get customerUserID(): string | undefined {\n const hmsPeersCache = getHmsPeersCache();\n\n const value = hmsPeersCache\n ? hmsPeersCache.getProperty(this.peerID, 'customerUserID')\n : getPeerPropertyFromNative(\n HMSConstants.DEFAULT_SDK_ID,\n this.peerID,\n 'customerUserID'\n );\n\n if (value) {\n this._updateCustomerUserID(value);\n }\n return value ?? this._customerUserID;\n }\n\n /**\n * Retrieves the metadata associated with the peer.\n *\n * This getter method attempts to obtain the metadata of the peer, which can include any additional information set by the application.\n * It first tries to get this information from the HMS peers cache. If the information is not available in the cache,\n * it falls back to fetching the metadata directly from the native layer using the peer's ID.\n * Once a value is retrieved, it updates the local `_metadata` property to ensure the value is current and consistent.\n *\n * @returns {string | undefined} The metadata of the peer if available, otherwise `undefined`.\n *\n * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/interact-with-room/peer/change-metadata\n */\n get metadata(): string | undefined {\n const hmsPeersCache = getHmsPeersCache();\n\n const value = hmsPeersCache\n ? hmsPeersCache.getProperty(this.peerID, 'metadata')\n : getPeerPropertyFromNative(\n HMSConstants.DEFAULT_SDK_ID,\n this.peerID,\n 'metadata'\n );\n\n if (value) {\n this._updateMetadata(value);\n }\n return value ?? this._metadata;\n }\n\n /**\n * Retrieves the role of the peer.\n *\n * This getter method attempts to obtain the role assigned to the peer within the session. The role can define permissions and capabilities\n * within the session context. It first tries to get this information from the HMS peers cache. If the role information is not available in the cache,\n * it falls back to fetching the role directly from the native layer using the peer's ID. Once a value is retrieved, it updates the local `_role`\n * property to ensure the value is current and consistent.\n *\n * @returns {HMSRole | undefined} The role of the peer if available, otherwise `undefined`.\n *\n * @see https://www.100ms.live/docs/get-started/v2/get-started/concepts/templates-and-roles\n */\n get role(): HMSRole | undefined {\n const hmsPeersCache = getHmsPeersCache();\n\n const value = hmsPeersCache\n ? hmsPeersCache.getProperty(this.peerID, 'role')\n : getPeerPropertyFromNative(\n HMSConstants.DEFAULT_SDK_ID,\n this.peerID,\n 'role'\n );\n\n if (value) {\n this._updateRole(value);\n }\n return value ?? this._role;\n }\n\n /**\n * Retrieves the audio track associated with the peer.\n *\n * This getter method attempts to obtain the audio track of the peer. It first tries to get this information from the HMS peers cache.\n * If the audio track information is not available in the cache, it falls back to fetching the audio track directly from the native layer using the peer's ID.\n * This allows for real-time access to the peer's audio track, which can be used for various audio-related functionalities within the application.\n *\n * @returns {HMSAudioTrack | undefined} The audio track of the peer if available, otherwise `undefined`.\n */\n get audioTrack(): HMSAudioTrack | undefined {\n const hmsPeersCache = getHmsPeersCache();\n\n if (hmsPeersCache) {\n return hmsPeersCache.getProperty(this.peerID, 'audioTrack');\n }\n\n return getPeerPropertyFromNative(\n HMSConstants.DEFAULT_SDK_ID,\n this.peerID,\n 'audioTrack'\n );\n }\n\n /**\n * Retrieves the video track associated with the peer.\n *\n * This getter method attempts to obtain the video track of the peer. It first tries to get this information from the HMS peers cache.\n * If the video track information is not available in the cache, it falls back to fetching the video track directly from the native layer using the peer's ID.\n * This allows for real-time access to the peer's video track, which can be used for various video-related functionalities within the application.\n *\n * @returns {HMSVideoTrack | undefined} The video track of the peer if available, otherwise `undefined`.\n * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/render-video/overview\n */\n get videoTrack(): HMSVideoTrack | undefined {\n const hmsPeersCache = getHmsPeersCache();\n\n if (hmsPeersCache) {\n return hmsPeersCache.getProperty(this.peerID, 'videoTrack');\n }\n\n return getPeerPropertyFromNative(\n HMSConstants.DEFAULT_SDK_ID,\n this.peerID,\n 'videoTrack'\n );\n }\n\n /**\n * Retrieves the auxiliary tracks associated with the peer.\n *\n * This getter method attempts to obtain the auxiliary tracks of the peer, which can include tracks like screen shares or additional media streams.\n * It first tries to get this information from the HMS peers cache. If the auxiliary track information is not available in the cache,\n * it falls back to fetching the auxiliary tracks directly from the native layer using the peer's ID.\n * This allows for real-time access to the peer's auxiliary tracks, which can be used for various functionalities within the application,\n * such as displaying a screen share or additional video feeds.\n *\n * @returns {HMSTrack[] | undefined} The auxiliary tracks of the peer if available, otherwise `undefined`.\n * @see https://www.100ms.live/docs/react-native/v2/how-to-guides/set-up-video-conferencing/screenshare\n */\n get auxiliaryTracks(): HMSTrack[] | undefined {\n const hmsPeersCache = getHmsPeersCache();\n\n if (hmsPeersCache) {\n return hmsPeersCache.getProperty(this.peerID, 'auxiliaryTracks');\n }\n\n return getPeerPropertyFromNative(\n HMSConstants.DEFAULT_SDK_ID,\n this.peerID,\n 'auxiliaryTracks'\n );\n }\n\n /**\n * Retrieves the type of the peer.\n *\n * This getter method attempts to obtain the type of the peer, which can indicate whether the peer is a regular participant,\n * a screen share, or another type defined within the `HMSPeerType` enum. It first tries to get this information from the HMS peers cache.\n * If the type information is not available in the cache, it falls back to fetching the type directly from the native layer using the peer's ID.\n * This ensures that the application has real-time access to the peer's type, which can be crucial for handling different peer types differently,\n * such as displaying a screen share in a distinct manner. Once a value is retrieved, it updates the local `_type` property to ensure the value is current.\n *\n * @returns {HMSPeerType} The type of the peer, defaulting to the value stored in `_type` if the information is not available.\n *\n * @see https://www.100ms.live/docs/server-side/v2/how-to-guides/Session%20Initiation%20Protocol%20(SIP)/SIP-Interconnect\n */\n get type(): HMSPeerType {\n const hmsPeersCache = getHmsPeersCache();\n\n const value = hmsPeersCache\n ? hmsPeersCache.getProperty(this.peerID, 'type')\n : getPeerPropertyFromNative(\n HMSConstants.DEFAULT_SDK_ID,\n this.peerID,\n 'type'\n );\n\n if (value) {\n this._updateType(value);\n }\n return value ?? this._type;\n }\n}\n"],"mappings":";;;;;;AAKA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAA4C,SAAAG,gBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAD,CAAA,GAAAI,MAAA,CAAAC,cAAA,CAAAL,CAAA,EAAAC,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAT,CAAA,CAAAC,CAAA,IAAAC,CAAA,EAAAF,CAAA;AAAA,SAAAG,eAAAD,CAAA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ACE,IAAIiB,IAAIA,CAAA,EAAgB;IACtB,MAAMf,aAAa,GAAG,IAAAC,+BAAgB,EAAC,CAAC;IAExC,MAAMlC,KAAK,GAAGiC,aAAa,GACvBA,aAAa,CAACE,WAAW,CAAC,IAAI,CAACJ,MAAM,EAAE,MAAM,CAAC,GAC9C,IAAAK,wCAAyB,EACvBC,0BAAY,CAACC,cAAc,EAC3B,IAAI,CAACP,MAAM,EACX,MACF,CAAC;IAEL,IAAI/B,KAAK,EAAE;MACT,IAAI,CAACyB,WAAW,CAACzB,KAAK,CAAC;IACzB;IACA,OAAOA,KAAK,IAAI,IAAI,CAAC0B,KAAK;EAC5B;AACF;AAACuB,OAAA,CAAArC,OAAA,GAAAA,OAAA","ignoreList":[]}
|
|
@@ -4,17 +4,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.HMSPeerListIterator = void 0;
|
|
7
|
-
var _HMSManagerModule = _interopRequireDefault(require("
|
|
7
|
+
var _HMSManagerModule = _interopRequireDefault(require("../modules/HMSManagerModule"));
|
|
8
8
|
var _reactNativeHms = require("@100mslive/react-native-hms");
|
|
9
9
|
var _HMSConstants = require("./HMSConstants");
|
|
10
|
-
|
|
11
|
-
function
|
|
12
|
-
function
|
|
13
|
-
function
|
|
10
|
+
var _HMSPeersCache = require("./HMSPeersCache");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
14
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } // import type { HMSException } from "./HMSException";
|
|
14
15
|
class HMSPeerListIterator {
|
|
15
|
-
|
|
16
|
+
get totalCount() {
|
|
17
|
+
return this._totalCount;
|
|
18
|
+
}
|
|
19
|
+
constructor(uniqueId, totalCount) {
|
|
16
20
|
_defineProperty(this, "uniqueId", void 0);
|
|
21
|
+
_defineProperty(this, "_totalCount", 0);
|
|
17
22
|
this.uniqueId = uniqueId;
|
|
23
|
+
this._totalCount = totalCount;
|
|
18
24
|
}
|
|
19
25
|
async hasNext() {
|
|
20
26
|
_reactNativeHms.logger === null || _reactNativeHms.logger === void 0 || _reactNativeHms.logger.verbose('#Function HMSPeerListIterator#hasNext', this.uniqueId);
|
|
@@ -31,10 +37,22 @@ class HMSPeerListIterator {
|
|
|
31
37
|
async next() {
|
|
32
38
|
_reactNativeHms.logger === null || _reactNativeHms.logger === void 0 || _reactNativeHms.logger.verbose('#Function HMSPeerListIterator#next', this.uniqueId);
|
|
33
39
|
try {
|
|
34
|
-
const
|
|
40
|
+
const {
|
|
41
|
+
totalCount,
|
|
42
|
+
peers
|
|
43
|
+
} = await _HMSManagerModule.default.peerListIteratorNext({
|
|
35
44
|
id: _HMSConstants.HMSConstants.DEFAULT_SDK_ID,
|
|
36
45
|
uniqueId: this.uniqueId
|
|
37
46
|
});
|
|
47
|
+
this._totalCount = totalCount;
|
|
48
|
+
if (Array.isArray(peers) && peers.length > 0) {
|
|
49
|
+
const hmsPeersCache = (0, _HMSPeersCache.getHmsPeersCache)();
|
|
50
|
+
if (hmsPeersCache) {
|
|
51
|
+
peers.forEach(peer => {
|
|
52
|
+
hmsPeersCache.updatePeerCache(peer.peerID, peer);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
38
56
|
return _reactNativeHms.HMSEncoder.encodeHmsPeers(peers);
|
|
39
57
|
} catch (e) {
|
|
40
58
|
_reactNativeHms.logger === null || _reactNativeHms.logger === void 0 || _reactNativeHms.logger.error('#Error in #Function HMSPeerListIterator#next ', e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_HMSManagerModule","_interopRequireDefault","require","_reactNativeHms","_HMSConstants","
|
|
1
|
+
{"version":3,"names":["_HMSManagerModule","_interopRequireDefault","require","_reactNativeHms","_HMSConstants","_HMSPeersCache","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","HMSPeerListIterator","totalCount","_totalCount","constructor","uniqueId","hasNext","logger","verbose","HMSManagerModule","peerListIteratorHasNext","id","HMSConstants","DEFAULT_SDK_ID","error","Promise","reject","next","peers","peerListIteratorNext","Array","isArray","length","hmsPeersCache","getHmsPeersCache","forEach","peer","updatePeerCache","peerID","HMSEncoder","encodeHmsPeers","exports"],"sources":["HMSPeerListIterator.ts"],"sourcesContent":["// import type { HMSException } from \"./HMSException\";\nimport type { HMSPeer } from './HMSPeer';\nimport HMSManagerModule from '../modules/HMSManagerModule';\nimport { HMSEncoder, logger } from '@100mslive/react-native-hms';\nimport { HMSConstants } from './HMSConstants';\nimport { getHmsPeersCache } from './HMSPeersCache';\n\nexport class HMSPeerListIterator {\n private readonly uniqueId: string;\n private _totalCount: number = 0;\n\n get totalCount() {\n return this._totalCount;\n }\n\n constructor(uniqueId: string, totalCount: number) {\n this.uniqueId = uniqueId;\n this._totalCount = totalCount;\n }\n\n async hasNext(): Promise<boolean> {\n logger?.verbose('#Function HMSPeerListIterator#hasNext', this.uniqueId);\n try {\n return HMSManagerModule.peerListIteratorHasNext({\n id: HMSConstants.DEFAULT_SDK_ID,\n uniqueId: this.uniqueId,\n });\n } catch (e) {\n logger?.error('#Error in #Function HMSPeerListIterator#hasNext ', e);\n return Promise.reject(e);\n }\n }\n\n async next(): Promise<HMSPeer[]> {\n logger?.verbose('#Function HMSPeerListIterator#next', this.uniqueId);\n try {\n const { totalCount, peers } = await HMSManagerModule.peerListIteratorNext(\n {\n id: HMSConstants.DEFAULT_SDK_ID,\n uniqueId: this.uniqueId,\n }\n );\n\n this._totalCount = totalCount;\n\n if (Array.isArray(peers) && peers.length > 0) {\n const hmsPeersCache = getHmsPeersCache();\n\n if (hmsPeersCache) {\n peers.forEach((peer) => {\n hmsPeersCache.updatePeerCache(peer.peerID, peer);\n });\n }\n }\n\n return HMSEncoder.encodeHmsPeers(peers);\n } catch (e) {\n logger?.error('#Error in #Function HMSPeerListIterator#next ', e);\n return Promise.reject(e);\n }\n }\n}\n"],"mappings":";;;;;;AAEA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAAmD,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,gBAAAH,CAAA,EAAAI,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAJ,CAAA,GAAAO,MAAA,CAAAC,cAAA,CAAAR,CAAA,EAAAI,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAZ,CAAA,CAAAI,CAAA,IAAAC,CAAA,EAAAL,CAAA;AAAA,SAAAM,eAAAD,CAAA,QAAAQ,CAAA,GAAAC,YAAA,CAAAT,CAAA,uCAAAQ,CAAA,GAAAA,CAAA,GAAAA,CAAA;AAAA,SAAAC,aAAAT,CAAA,EAAAD,CAAA,2BAAAC,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAL,CAAA,GAAAK,CAAA,CAAAU,MAAA,CAAAC,WAAA,kBAAAhB,CAAA,QAAAa,CAAA,GAAAb,CAAA,CAAAiB,IAAA,CAAAZ,CAAA,EAAAD,CAAA,uCAAAS,CAAA,SAAAA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,IAAIA,KAAK,CAACI,MAAM,GAAG,CAAC,EAAE;QAC5C,MAAMC,aAAa,GAAG,IAAAC,+BAAgB,EAAC,CAAC;QAExC,IAAID,aAAa,EAAE;UACjBL,KAAK,CAACO,OAAO,CAAEC,IAAI,IAAK;YACtBH,aAAa,CAACI,eAAe,CAACD,IAAI,CAACE,MAAM,EAAEF,IAAI,CAAC;UAClD,CAAC,CAAC;QACJ;MACF;MAEA,OAAOG,0BAAU,CAACC,cAAc,CAACZ,KAAK,CAAC;IACzC,CAAC,CAAC,OAAOtC,CAAC,EAAE;MACV2B,sBAAM,aAANA,sBAAM,eAANA,sBAAM,CAAEO,KAAK,CAAC,+CAA+C,EAAElC,CAAC,CAAC;MACjE,OAAOmC,OAAO,CAACC,MAAM,CAACpC,CAAC,CAAC;IAC1B;EACF;AACF;AAACmD,OAAA,CAAA9B,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["HMSPeerListIteratorOptions.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"names":[],"sources":["HMSPeerListIteratorOptions.ts"],"sourcesContent":["/**\n * options for creating `HMSPeerListIterator` instance\n *\n * ```\n * const peerListIterator = hmsInstance.getPeerListIterator({\n * limit: 10,\n * byRoleName: 'viewer-realtime',\n * });\n * ```\n */\nexport interface HMSPeerListIteratorOptions {\n /**\n * filter by role of the peers\n */\n byRoleName?: string;\n\n /**\n * `peerID`s of the peers you want to fetch with iterator.\n */\n byPeerIds?: string[];\n\n /**\n * number of peers fetched by the iterator in `next` method call. Default value is `10`\n */\n limit?: number;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.HMSPeerTypeOrdinals = exports.HMSPeerType = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* Enum for HMSPeerType.
|
|
9
|
+
*
|
|
10
|
+
* Defines the types of peers within the HMS (100ms) system. This enumeration is used to distinguish between different
|
|
11
|
+
* kinds of peers, such as SIP (Session Initiation Protocol) peers and regular peers. Each peer type has specific
|
|
12
|
+
* characteristics and roles within the video conferencing or communication context.
|
|
13
|
+
*
|
|
14
|
+
* @enum {string}
|
|
15
|
+
*
|
|
16
|
+
* @see https://www.100ms.live/docs/server-side/v2/how-to-guides/Session%20Initiation%20Protocol%20(SIP)/SIP-Interconnect
|
|
17
|
+
*/
|
|
18
|
+
let HMSPeerType = exports.HMSPeerType = /*#__PURE__*/function (HMSPeerType) {
|
|
19
|
+
HMSPeerType["SIP"] = "SIP";
|
|
20
|
+
HMSPeerType["REGULAR"] = "REGULAR";
|
|
21
|
+
return HMSPeerType;
|
|
22
|
+
}({});
|
|
23
|
+
const HMSPeerTypeOrdinals = exports.HMSPeerTypeOrdinals = new Map([['0', HMSPeerType.SIP], ['1', HMSPeerType.REGULAR]]);
|
|
24
|
+
//# sourceMappingURL=HMSPeerType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["HMSPeerType","exports","HMSPeerTypeOrdinals","Map","SIP","REGULAR"],"sources":["HMSPeerType.ts"],"sourcesContent":["/**\n * Enum for HMSPeerType.\n *\n * Defines the types of peers within the HMS (100ms) system. This enumeration is used to distinguish between different\n * kinds of peers, such as SIP (Session Initiation Protocol) peers and regular peers. Each peer type has specific\n * characteristics and roles within the video conferencing or communication context.\n *\n * @enum {string}\n *\n * @see https://www.100ms.live/docs/server-side/v2/how-to-guides/Session%20Initiation%20Protocol%20(SIP)/SIP-Interconnect\n */\nexport enum HMSPeerType {\n SIP = 'SIP', // Represents a SIP peer, typically used for integrating with traditional telephony systems.\n REGULAR = 'REGULAR', // Represents a regular peer, such as a standard user in a video call.\n}\n\nexport const HMSPeerTypeOrdinals = new Map([\n ['0', HMSPeerType.SIP],\n ['1', HMSPeerType.REGULAR],\n]);\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,IAWYA,WAAW,GAAAC,OAAA,CAAAD,WAAA,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAKhB,MAAME,mBAAmB,GAAAD,OAAA,CAAAC,mBAAA,GAAG,IAAIC,GAAG,CAAC,CACzC,CAAC,GAAG,EAAEH,WAAW,CAACI,GAAG,CAAC,EACtB,CAAC,GAAG,EAAEJ,WAAW,CAACK,OAAO,CAAC,CAC3B,CAAC","ignoreList":[]}
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.HMSPeerUpdateOrdinals = exports.HMSPeerUpdate = void 0;
|
|
7
|
-
let HMSPeerUpdate = /*#__PURE__*/function (HMSPeerUpdate) {
|
|
7
|
+
let HMSPeerUpdate = exports.HMSPeerUpdate = /*#__PURE__*/function (HMSPeerUpdate) {
|
|
8
8
|
HMSPeerUpdate["PEER_JOINED"] = "PEER_JOINED";
|
|
9
9
|
HMSPeerUpdate["PEER_LEFT"] = "PEER_LEFT";
|
|
10
10
|
HMSPeerUpdate["METADATA_CHANGED"] = "METADATA_CHANGED";
|
|
@@ -14,7 +14,5 @@ let HMSPeerUpdate = /*#__PURE__*/function (HMSPeerUpdate) {
|
|
|
14
14
|
HMSPeerUpdate["HAND_RAISED_CHANGED"] = "HAND_RAISED_CHANGED";
|
|
15
15
|
return HMSPeerUpdate;
|
|
16
16
|
}({});
|
|
17
|
-
exports.
|
|
18
|
-
const HMSPeerUpdateOrdinals = new Map([['0', HMSPeerUpdate.PEER_JOINED], ['1', HMSPeerUpdate.PEER_LEFT], ['4', HMSPeerUpdate.ROLE_CHANGED], ['5', HMSPeerUpdate.NAME_CHANGED], ['6', HMSPeerUpdate.METADATA_CHANGED], ['7', HMSPeerUpdate.NETWORK_QUALITY_UPDATED], ['8', HMSPeerUpdate.HAND_RAISED_CHANGED]]);
|
|
19
|
-
exports.HMSPeerUpdateOrdinals = HMSPeerUpdateOrdinals;
|
|
17
|
+
const HMSPeerUpdateOrdinals = exports.HMSPeerUpdateOrdinals = new Map([['0', HMSPeerUpdate.PEER_JOINED], ['1', HMSPeerUpdate.PEER_LEFT], ['4', HMSPeerUpdate.ROLE_CHANGED], ['5', HMSPeerUpdate.NAME_CHANGED], ['6', HMSPeerUpdate.METADATA_CHANGED], ['7', HMSPeerUpdate.NETWORK_QUALITY_UPDATED], ['8', HMSPeerUpdate.HAND_RAISED_CHANGED]]);
|
|
20
18
|
//# sourceMappingURL=HMSPeerUpdate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["HMSPeerUpdate","exports","HMSPeerUpdateOrdinals","Map","PEER_JOINED","PEER_LEFT","ROLE_CHANGED","NAME_CHANGED","METADATA_CHANGED","NETWORK_QUALITY_UPDATED","HAND_RAISED_CHANGED"],"sources":["HMSPeerUpdate.ts"],"sourcesContent":["export enum HMSPeerUpdate {\n PEER_JOINED = 'PEER_JOINED',\n PEER_LEFT = 'PEER_LEFT',\n METADATA_CHANGED = 'METADATA_CHANGED',\n ROLE_CHANGED = 'ROLE_CHANGED',\n NAME_CHANGED = 'NAME_CHANGED',\n NETWORK_QUALITY_UPDATED = 'NETWORK_QUALITY_UPDATED',\n HAND_RAISED_CHANGED = 'HAND_RAISED_CHANGED',\n}\n\nexport const HMSPeerUpdateOrdinals = new Map([\n ['0', HMSPeerUpdate.PEER_JOINED],\n ['1', HMSPeerUpdate.PEER_LEFT],\n ['4', HMSPeerUpdate.ROLE_CHANGED],\n ['5', HMSPeerUpdate.NAME_CHANGED],\n ['6', HMSPeerUpdate.METADATA_CHANGED],\n ['7', HMSPeerUpdate.NETWORK_QUALITY_UPDATED],\n ['8', HMSPeerUpdate.HAND_RAISED_CHANGED],\n]);\n"],"mappings":";;;;;;IAAYA,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;
|
|
1
|
+
{"version":3,"names":["HMSPeerUpdate","exports","HMSPeerUpdateOrdinals","Map","PEER_JOINED","PEER_LEFT","ROLE_CHANGED","NAME_CHANGED","METADATA_CHANGED","NETWORK_QUALITY_UPDATED","HAND_RAISED_CHANGED"],"sources":["HMSPeerUpdate.ts"],"sourcesContent":["export enum HMSPeerUpdate {\n PEER_JOINED = 'PEER_JOINED',\n PEER_LEFT = 'PEER_LEFT',\n METADATA_CHANGED = 'METADATA_CHANGED',\n ROLE_CHANGED = 'ROLE_CHANGED',\n NAME_CHANGED = 'NAME_CHANGED',\n NETWORK_QUALITY_UPDATED = 'NETWORK_QUALITY_UPDATED',\n HAND_RAISED_CHANGED = 'HAND_RAISED_CHANGED',\n}\n\nexport const HMSPeerUpdateOrdinals = new Map([\n ['0', HMSPeerUpdate.PEER_JOINED],\n ['1', HMSPeerUpdate.PEER_LEFT],\n ['4', HMSPeerUpdate.ROLE_CHANGED],\n ['5', HMSPeerUpdate.NAME_CHANGED],\n ['6', HMSPeerUpdate.METADATA_CHANGED],\n ['7', HMSPeerUpdate.NETWORK_QUALITY_UPDATED],\n ['8', HMSPeerUpdate.HAND_RAISED_CHANGED],\n]);\n"],"mappings":";;;;;;IAAYA,aAAa,GAAAC,OAAA,CAAAD,aAAA,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAUlB,MAAME,qBAAqB,GAAAD,OAAA,CAAAC,qBAAA,GAAG,IAAIC,GAAG,CAAC,CAC3C,CAAC,GAAG,EAAEH,aAAa,CAACI,WAAW,CAAC,EAChC,CAAC,GAAG,EAAEJ,aAAa,CAACK,SAAS,CAAC,EAC9B,CAAC,GAAG,EAAEL,aAAa,CAACM,YAAY,CAAC,EACjC,CAAC,GAAG,EAAEN,aAAa,CAACO,YAAY,CAAC,EACjC,CAAC,GAAG,EAAEP,aAAa,CAACQ,gBAAgB,CAAC,EACrC,CAAC,GAAG,EAAER,aAAa,CAACS,uBAAuB,CAAC,EAC5C,CAAC,GAAG,EAAET,aAAa,CAACU,mBAAmB,CAAC,CACzC,CAAC","ignoreList":[]}
|
|
@@ -6,18 +6,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getHmsPeersCache = exports.clearHmsPeersCache = exports.HMSPeersCache = void 0;
|
|
7
7
|
exports.getPeerPropertyFromNative = getPeerPropertyFromNative;
|
|
8
8
|
exports.setHmsPeersCache = exports.hmsPeersCache = void 0;
|
|
9
|
-
var _HMSManagerModule = _interopRequireDefault(require("
|
|
9
|
+
var _HMSManagerModule = _interopRequireDefault(require("../modules/HMSManagerModule"));
|
|
10
10
|
var _HMSEncoder = require("./HMSEncoder");
|
|
11
11
|
var _HMSPeerUpdate = require("./HMSPeerUpdate");
|
|
12
12
|
var _HMSTrackUpdate = require("./HMSTrackUpdate");
|
|
13
13
|
var _HMSTrackType = require("./HMSTrackType");
|
|
14
14
|
var _HMSTrackSource = require("./HMSTrackSource");
|
|
15
|
-
function _interopRequireDefault(
|
|
16
|
-
function _defineProperty(
|
|
17
|
-
function _toPropertyKey(
|
|
18
|
-
function _toPrimitive(
|
|
19
|
-
let hmsPeersCache;
|
|
20
|
-
exports.hmsPeersCache = hmsPeersCache;
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
17
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
18
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
19
|
+
let hmsPeersCache = exports.hmsPeersCache = void 0;
|
|
21
20
|
const getHmsPeersCache = () => {
|
|
22
21
|
return hmsPeersCache;
|
|
23
22
|
};
|