@100mslive/react-native-hms 1.9.4 → 1.9.6
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 +1 -1
- package/android/build.gradle +3 -3
- package/android/local.properties +8 -1
- package/android/src/main/java/com/reactnativehmssdk/HMSAudioshareActivity.kt +0 -2
- package/android/src/main/java/com/reactnativehmssdk/HMSDecoder.kt +14 -2
- package/android/src/main/java/com/reactnativehmssdk/HMSHLSPlayer.kt +2 -1
- package/android/src/main/java/com/reactnativehmssdk/HMSManager.kt +21 -4
- package/android/src/main/java/com/reactnativehmssdk/HMSRNSDK.kt +1 -0
- package/android/src/main/java/com/reactnativehmssdk/HmsScreenshareActivity.kt +2 -2
- package/ios/HMSDecoder.swift +41 -13
- package/ios/HMSHLSPlayerManager.swift +1 -1
- package/ios/HMSRNSDK.swift +3 -3
- package/ios/Hmssdk.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/ios/Hmssdk.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/Hmssdk.xcodeproj/project.xcworkspace/xcuserdata/jatinnagar.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/Hmssdk.xcodeproj/xcuserdata/jatinnagar.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
- package/lib/commonjs/classes/HMSAudioMixerSource.js +2 -2
- package/lib/commonjs/classes/HMSAudioNode.js +2 -2
- package/lib/commonjs/classes/HMSAudioNode.js.map +1 -1
- package/lib/commonjs/classes/HMSAudioSettings.js +2 -2
- package/lib/commonjs/classes/HMSAudioTrackSettings.js +2 -2
- package/lib/commonjs/classes/HMSBrowserRecordingState.js +4 -2
- package/lib/commonjs/classes/HMSBrowserRecordingState.js.map +1 -1
- package/lib/commonjs/classes/HMSChangeTrackStateRequest.js +2 -2
- package/lib/commonjs/classes/HMSConfig.js +2 -2
- package/lib/commonjs/classes/HMSEncoder.js +13 -10
- package/lib/commonjs/classes/HMSEncoder.js.map +1 -1
- package/lib/commonjs/classes/HMSException.js +2 -2
- package/lib/commonjs/classes/HMSHLSConfig.js +2 -2
- package/lib/commonjs/classes/HMSHLSMeetingURLVariant.js +2 -2
- package/lib/commonjs/classes/HMSHLSRecordingConfig.js +2 -2
- package/lib/commonjs/classes/HMSHLSRecordingState.js +6 -6
- package/lib/commonjs/classes/HMSHLSRecordingState.js.map +1 -1
- package/lib/commonjs/classes/HMSHLSStreamingState.js +8 -2
- package/lib/commonjs/classes/HMSHLSStreamingState.js.map +1 -1
- package/lib/commonjs/classes/HMSHLSVariant.js +2 -2
- package/lib/commonjs/classes/HMSLocalAudioStats.js +2 -2
- package/lib/commonjs/classes/HMSLocalAudioTrack.js +2 -2
- package/lib/commonjs/classes/HMSLocalAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalPeer.js +2 -2
- package/lib/commonjs/classes/HMSLocalPeer.js.map +1 -1
- package/lib/commonjs/classes/HMSLocalVideoStats.js +2 -2
- package/lib/commonjs/classes/HMSLocalVideoTrack.js +2 -2
- package/lib/commonjs/classes/HMSLocalVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSLogSettings.js +2 -2
- package/lib/commonjs/classes/HMSLogger.js +2 -2
- package/lib/commonjs/classes/HMSLogger.js.map +1 -1
- package/lib/commonjs/classes/HMSMessage.js +2 -2
- package/lib/commonjs/classes/HMSMessageRecipient.js +2 -2
- package/lib/commonjs/classes/HMSNativeEventEmitter.js +2 -2
- package/lib/commonjs/classes/HMSNativeEventEmitter.js.map +1 -1
- package/lib/commonjs/classes/HMSNetworkQuality.js +2 -2
- package/lib/commonjs/classes/HMSPeer.js +2 -2
- package/lib/commonjs/classes/HMSPeer.js.map +1 -1
- package/lib/commonjs/classes/HMSPeerListIterator.js +2 -2
- package/lib/commonjs/classes/HMSPeerListIterator.js.map +1 -1
- package/lib/commonjs/classes/HMSPeersCache.js +2 -2
- package/lib/commonjs/classes/HMSPeersCache.js.map +1 -1
- package/lib/commonjs/classes/HMSPermissions.js +2 -2
- package/lib/commonjs/classes/HMSPublishSettings.js +2 -2
- package/lib/commonjs/classes/HMSQualityLimitationReasons.js +2 -2
- package/lib/commonjs/classes/HMSRTCStats.js +2 -2
- package/lib/commonjs/classes/HMSRTCStatsReport.js +2 -2
- package/lib/commonjs/classes/HMSRTMPConfig.js +2 -2
- package/lib/commonjs/classes/HMSRecordingState.js +17 -0
- package/lib/commonjs/classes/HMSRecordingState.js.map +1 -0
- package/lib/commonjs/classes/HMSRemoteAudioStats.js +2 -2
- package/lib/commonjs/classes/HMSRemoteAudioTrack.js +2 -2
- package/lib/commonjs/classes/HMSRemoteAudioTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSRemotePeer.js +2 -2
- package/lib/commonjs/classes/HMSRemotePeer.js.map +1 -1
- package/lib/commonjs/classes/HMSRemoteVideoStats.js +2 -2
- package/lib/commonjs/classes/HMSRemoteVideoTrack.js +2 -2
- package/lib/commonjs/classes/HMSRemoteVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSRole.js +2 -2
- package/lib/commonjs/classes/HMSRoleChangeRequest.js +2 -2
- package/lib/commonjs/classes/HMSRoom.js +2 -3
- package/lib/commonjs/classes/HMSRoom.js.map +1 -1
- package/lib/commonjs/classes/HMSRoomCache.js +2 -2
- package/lib/commonjs/classes/HMSRoomCache.js.map +1 -1
- package/lib/commonjs/classes/HMSRtmpStreamingState.js +4 -4
- package/lib/commonjs/classes/HMSRtmpStreamingState.js.map +1 -1
- package/lib/commonjs/classes/HMSRtmpVideoResolution.js +2 -2
- package/lib/commonjs/classes/HMSSDK.js +2 -2
- package/lib/commonjs/classes/HMSSDK.js.map +1 -1
- package/lib/commonjs/classes/HMSServerRecordingState.js +4 -2
- package/lib/commonjs/classes/HMSServerRecordingState.js.map +1 -1
- package/lib/commonjs/classes/HMSSessionStore.js +2 -2
- package/lib/commonjs/classes/HMSSessionStore.js.map +1 -1
- package/lib/commonjs/classes/HMSSimulcastLayerDefinition.js +2 -2
- package/lib/commonjs/classes/HMSSimulcastLayerSettings.js +2 -2
- package/lib/commonjs/classes/HMSSimulcastLayerSettingsPolicy.js +2 -2
- package/lib/commonjs/classes/HMSSimulcastSettings.js +2 -2
- package/lib/commonjs/classes/HMSSimulcastSettingsPolicy.js +2 -2
- package/lib/commonjs/classes/HMSSpeaker.js +2 -2
- package/lib/commonjs/classes/HMSStreamingState.js +15 -0
- package/lib/commonjs/classes/HMSStreamingState.js.map +1 -0
- package/lib/commonjs/classes/HMSSubscribeDegradationPolicy.js +2 -2
- package/lib/commonjs/classes/HMSSubscribeSettings.js +2 -2
- package/lib/commonjs/classes/HMSTrack.js +2 -2
- package/lib/commonjs/classes/HMSTrackSettings.js +2 -2
- package/lib/commonjs/classes/HMSVideoResolution.js +2 -2
- package/lib/commonjs/classes/HMSVideoSettings.js +2 -2
- package/lib/commonjs/classes/HMSVideoTrack.js +2 -2
- package/lib/commonjs/classes/HMSVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoTrackSettings.js +2 -2
- package/lib/commonjs/index.js +44 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/utils/emitter/EventEmitter.js +2 -2
- package/lib/commonjs/utils/emitter/EventEmitter.js.map +1 -1
- package/lib/commonjs/utils/emitter/_EmitterSubscription.js +2 -2
- package/lib/commonjs/utils/emitter/_EmitterSubscription.js.map +1 -1
- package/lib/commonjs/utils/emitter/_EventSubscription.js +2 -2
- package/lib/commonjs/utils/emitter/_EventSubscriptionVendor.js +2 -3
- package/lib/commonjs/utils/emitter/_EventSubscriptionVendor.js.map +1 -1
- package/lib/commonjs/utils/keyboard.js +46 -0
- package/lib/commonjs/utils/keyboard.js.map +1 -0
- package/lib/module/classes/HMSAudioMixerSource.js +2 -2
- package/lib/module/classes/HMSAudioNode.js +2 -2
- package/lib/module/classes/HMSAudioSettings.js +2 -2
- package/lib/module/classes/HMSAudioTrackSettings.js +2 -2
- package/lib/module/classes/HMSBrowserRecordingState.js +4 -2
- package/lib/module/classes/HMSBrowserRecordingState.js.map +1 -1
- package/lib/module/classes/HMSChangeTrackStateRequest.js +2 -2
- package/lib/module/classes/HMSConfig.js +2 -2
- package/lib/module/classes/HMSEncoder.js +13 -10
- package/lib/module/classes/HMSEncoder.js.map +1 -1
- package/lib/module/classes/HMSException.js +2 -2
- package/lib/module/classes/HMSHLSConfig.js +2 -2
- package/lib/module/classes/HMSHLSMeetingURLVariant.js +2 -2
- package/lib/module/classes/HMSHLSRecordingConfig.js +2 -2
- package/lib/module/classes/HMSHLSRecordingState.js +6 -6
- package/lib/module/classes/HMSHLSRecordingState.js.map +1 -1
- package/lib/module/classes/HMSHLSStreamingState.js +8 -2
- package/lib/module/classes/HMSHLSStreamingState.js.map +1 -1
- package/lib/module/classes/HMSHLSVariant.js +2 -2
- package/lib/module/classes/HMSLocalAudioStats.js +2 -2
- package/lib/module/classes/HMSLocalAudioTrack.js +2 -2
- package/lib/module/classes/HMSLocalPeer.js +2 -2
- package/lib/module/classes/HMSLocalVideoStats.js +2 -2
- package/lib/module/classes/HMSLocalVideoTrack.js +2 -2
- package/lib/module/classes/HMSLogSettings.js +2 -2
- package/lib/module/classes/HMSLogger.js +2 -2
- package/lib/module/classes/HMSMessage.js +2 -2
- package/lib/module/classes/HMSMessageRecipient.js +2 -2
- package/lib/module/classes/HMSNativeEventEmitter.js +2 -2
- package/lib/module/classes/HMSNetworkQuality.js +2 -2
- package/lib/module/classes/HMSPeer.js +2 -2
- package/lib/module/classes/HMSPeerListIterator.js +2 -2
- package/lib/module/classes/HMSPeersCache.js +2 -2
- package/lib/module/classes/HMSPermissions.js +2 -2
- package/lib/module/classes/HMSPublishSettings.js +2 -2
- package/lib/module/classes/HMSQualityLimitationReasons.js +2 -2
- package/lib/module/classes/HMSRTCStats.js +2 -2
- package/lib/module/classes/HMSRTCStatsReport.js +2 -2
- package/lib/module/classes/HMSRTMPConfig.js +2 -2
- package/lib/module/classes/HMSRecordingState.js +11 -0
- package/lib/module/classes/HMSRecordingState.js.map +1 -0
- package/lib/module/classes/HMSRemoteAudioStats.js +2 -2
- package/lib/module/classes/HMSRemoteAudioTrack.js +2 -2
- package/lib/module/classes/HMSRemotePeer.js +2 -2
- package/lib/module/classes/HMSRemoteVideoStats.js +2 -2
- package/lib/module/classes/HMSRemoteVideoTrack.js +2 -2
- package/lib/module/classes/HMSRole.js +2 -2
- package/lib/module/classes/HMSRoleChangeRequest.js +2 -2
- package/lib/module/classes/HMSRoom.js +2 -3
- package/lib/module/classes/HMSRoom.js.map +1 -1
- package/lib/module/classes/HMSRoomCache.js +2 -2
- package/lib/module/classes/HMSRtmpStreamingState.js +4 -4
- package/lib/module/classes/HMSRtmpStreamingState.js.map +1 -1
- package/lib/module/classes/HMSRtmpVideoResolution.js +2 -2
- package/lib/module/classes/HMSSDK.js +2 -2
- package/lib/module/classes/HMSServerRecordingState.js +4 -2
- package/lib/module/classes/HMSServerRecordingState.js.map +1 -1
- package/lib/module/classes/HMSSessionStore.js +2 -2
- package/lib/module/classes/HMSSimulcastLayerDefinition.js +2 -2
- package/lib/module/classes/HMSSimulcastLayerSettings.js +2 -2
- package/lib/module/classes/HMSSimulcastLayerSettingsPolicy.js +2 -2
- package/lib/module/classes/HMSSimulcastSettings.js +2 -2
- package/lib/module/classes/HMSSimulcastSettingsPolicy.js +2 -2
- package/lib/module/classes/HMSSpeaker.js +2 -2
- package/lib/module/classes/HMSStreamingState.js +9 -0
- package/lib/module/classes/HMSStreamingState.js.map +1 -0
- package/lib/module/classes/HMSSubscribeDegradationPolicy.js +2 -2
- package/lib/module/classes/HMSSubscribeSettings.js +2 -2
- package/lib/module/classes/HMSTrack.js +2 -2
- package/lib/module/classes/HMSTrackSettings.js +2 -2
- package/lib/module/classes/HMSVideoResolution.js +2 -2
- package/lib/module/classes/HMSVideoSettings.js +2 -2
- package/lib/module/classes/HMSVideoTrack.js +2 -2
- package/lib/module/classes/HMSVideoTrackSettings.js +2 -2
- package/lib/module/index.js +5 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/emitter/EventEmitter.js +2 -2
- package/lib/module/utils/emitter/_EmitterSubscription.js +2 -2
- package/lib/module/utils/emitter/_EventSubscription.js +2 -2
- package/lib/module/utils/emitter/_EventSubscriptionVendor.js +2 -3
- package/lib/module/utils/emitter/_EventSubscriptionVendor.js.map +1 -1
- package/lib/module/utils/keyboard.js +38 -0
- package/lib/module/utils/keyboard.js.map +1 -0
- package/lib/typescript/classes/HMSBrowserRecordingState.d.ts +3 -0
- package/lib/typescript/classes/HMSHLSRecordingState.d.ts +6 -4
- package/lib/typescript/classes/HMSHLSStreamingState.d.ts +8 -0
- package/lib/typescript/classes/HMSRecordingState.d.ts +9 -0
- package/lib/typescript/classes/HMSRtmpStreamingState.d.ts +3 -2
- package/lib/typescript/classes/HMSServerRecordingState.d.ts +3 -0
- package/lib/typescript/classes/HMSStreamingState.d.ts +7 -0
- package/lib/typescript/index.d.ts +4 -0
- package/lib/typescript/utils/keyboard.d.ts +16 -0
- package/package.json +1 -1
- package/sdk-versions.json +2 -2
- package/src/classes/HMSBrowserRecordingState.ts +4 -0
- package/src/classes/HMSEncoder.ts +8 -3
- package/src/classes/HMSHLSRecordingState.ts +9 -7
- package/src/classes/HMSHLSStreamingState.ts +15 -1
- package/src/classes/HMSRecordingState.ts +9 -0
- package/src/classes/HMSRtmpStreamingState.ts +4 -3
- package/src/classes/HMSServerRecordingState.ts +4 -0
- package/src/classes/HMSStreamingState.ts +7 -0
- package/src/index.ts +6 -1
- package/src/utils/keyboard.ts +37 -0
package/README.md
CHANGED
|
@@ -182,7 +182,7 @@ To test audio/video functionality, you need to connect to a 100ms Room. Please c
|
|
|
182
182
|
2. Use the `Video Conferencing Starter Kit` to create a room with a default template assigned to it to test this app quickly.
|
|
183
183
|
3. Go to the [Rooms page](https://dashboard.100ms.live/rooms) in your dashboard, click on the `Room Id` of the room you created above, and click on the `Join Room` button on the top right.
|
|
184
184
|
4. You will see 100ms demo URLs for the roles created when you deployed the starter kit; you can click on the 'key' icon to copy the token and update the `AUTH_TOKEN` variable in "App.js" file.
|
|
185
|
-
> Token from 100ms dashboard is for testing purposes only, For production applications you must generate tokens on your own server. Refer to the [Management Token section](/
|
|
185
|
+
> Token from 100ms dashboard is for testing purposes only, For production applications you must generate tokens on your own server. Refer to the [Management Token section](https://www.100ms.live/docs/get-started/v2/get-started/security-and-tokens#management-token-for-rest-api) in Authentication and Tokens guide for more information.
|
|
186
186
|
|
|
187
187
|
## [Add Event Listeners](https://www.100ms.live/docs/react-native/v2/features/event-listeners)
|
|
188
188
|
|
package/android/build.gradle
CHANGED
|
@@ -86,7 +86,7 @@ dependencies {
|
|
|
86
86
|
implementation "androidx.constraintlayout:constraintlayout:2.1.3"
|
|
87
87
|
implementation "androidx.appcompat:appcompat:1.3.1"
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
implementation "live.100ms:android-sdk:${sdkVersions["android"]}"
|
|
90
|
+
implementation "live.100ms:video-view:${sdkVersions["android"]}"
|
|
91
|
+
implementation "live.100ms:hls-player:${sdkVersions["android"]}"
|
|
92
92
|
}
|
package/android/local.properties
CHANGED
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
## This file must *NOT* be checked into Version Control Systems,
|
|
2
|
+
# as it contains information specific to your local configuration.
|
|
3
|
+
#
|
|
4
|
+
# Location of the SDK. This is only used by Gradle.
|
|
5
|
+
# For customization when using a Version Control System, please read the
|
|
6
|
+
# header note.
|
|
7
|
+
#Mon Nov 14 20:51:00 IST 2022
|
|
8
|
+
sdk.dir=/Users/jatinnagar/Library/Android/sdk
|
|
@@ -23,7 +23,6 @@ class HMSAudioshareActivity : ComponentActivity() {
|
|
|
23
23
|
override fun onError(error: HMSException) {
|
|
24
24
|
finish()
|
|
25
25
|
HMSManager.hmsCollection[id]?.audioshareCallback?.reject(error)
|
|
26
|
-
HMSManager.hmsCollection[id]?.emitHMSError(error)
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
override fun onSuccess() {
|
|
@@ -48,7 +47,6 @@ class HMSAudioshareActivity : ComponentActivity() {
|
|
|
48
47
|
"RESULT_CANCELED",
|
|
49
48
|
)
|
|
50
49
|
HMSManager.hmsCollection[id]?.audioshareCallback?.reject(error)
|
|
51
|
-
HMSManager.hmsCollection[id]?.emitHMSError(error)
|
|
52
50
|
finish()
|
|
53
51
|
}
|
|
54
52
|
}
|
|
@@ -650,6 +650,8 @@ object HMSDecoder {
|
|
|
650
650
|
data.error?.let {
|
|
651
651
|
input.putMap("error", this.getError(it))
|
|
652
652
|
}
|
|
653
|
+
|
|
654
|
+
input.putString("state", data.state.name)
|
|
653
655
|
}
|
|
654
656
|
return input
|
|
655
657
|
}
|
|
@@ -670,6 +672,8 @@ object HMSDecoder {
|
|
|
670
672
|
data.error?.let {
|
|
671
673
|
input.putMap("error", this.getError(it))
|
|
672
674
|
}
|
|
675
|
+
|
|
676
|
+
input.putString("state", data.state.name)
|
|
673
677
|
}
|
|
674
678
|
return input
|
|
675
679
|
}
|
|
@@ -686,6 +690,8 @@ object HMSDecoder {
|
|
|
686
690
|
data.error?.let {
|
|
687
691
|
input.putMap("error", this.getError(it))
|
|
688
692
|
}
|
|
693
|
+
|
|
694
|
+
input.putString("state", data.state.name)
|
|
689
695
|
}
|
|
690
696
|
return input
|
|
691
697
|
}
|
|
@@ -694,6 +700,13 @@ object HMSDecoder {
|
|
|
694
700
|
val input = Arguments.createMap()
|
|
695
701
|
if (data !== null) {
|
|
696
702
|
input.putBoolean("running", data.running)
|
|
703
|
+
|
|
704
|
+
data.error?.let {
|
|
705
|
+
input.putMap("error", this.getError(it))
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
input.putString("state", data.state.name)
|
|
709
|
+
|
|
697
710
|
data.variants?.let {
|
|
698
711
|
input.putArray("variants", this.getHMSHLSVariant(it))
|
|
699
712
|
}
|
|
@@ -710,8 +723,7 @@ object HMSDecoder {
|
|
|
710
723
|
input.putString("startedAt", it.toString())
|
|
711
724
|
}
|
|
712
725
|
|
|
713
|
-
|
|
714
|
-
data.hlsRecordingConfig?.let { input.putBoolean("videoOnDemand", it.videoOnDemand) }
|
|
726
|
+
input.putString("state", data.state.name)
|
|
715
727
|
}
|
|
716
728
|
return input
|
|
717
729
|
}
|
|
@@ -18,6 +18,7 @@ import live.hms.stats.PlayerStatsListener
|
|
|
18
18
|
import live.hms.stats.model.PlayerStatsModel
|
|
19
19
|
import live.hms.video.error.HMSException
|
|
20
20
|
import live.hms.video.sdk.HMSSDK
|
|
21
|
+
import live.hms.video.sdk.models.enums.HMSStreamingState
|
|
21
22
|
import java.util.concurrent.TimeUnit
|
|
22
23
|
|
|
23
24
|
@SuppressLint("ViewConstructor")
|
|
@@ -178,7 +179,7 @@ class HMSHLSPlayer(context: ReactContext) : FrameLayout(context) {
|
|
|
178
179
|
|
|
179
180
|
val defaultURL: String? =
|
|
180
181
|
hlsStreamingState?.let {
|
|
181
|
-
if (it.
|
|
182
|
+
if (it.state == HMSStreamingState.STARTED) {
|
|
182
183
|
it.variants?.get(0)?.hlsStreamUrl
|
|
183
184
|
} else {
|
|
184
185
|
null
|
|
@@ -26,6 +26,7 @@ class HMSManager(reactContext: ReactApplicationContext) :
|
|
|
26
26
|
const val REACT_CLASS = "HMSManager"
|
|
27
27
|
var hmsCollection = mutableMapOf<String, HMSRNSDK>()
|
|
28
28
|
|
|
29
|
+
var startingScreenShare = false
|
|
29
30
|
private var isInPIPMode = false
|
|
30
31
|
var reactAppContext: ReactApplicationContext? = null
|
|
31
32
|
var pipParamConfig: PipParamConfig? = null
|
|
@@ -61,6 +62,7 @@ class HMSManager(reactContext: ReactApplicationContext) :
|
|
|
61
62
|
fun onUserLeaveHint() {
|
|
62
63
|
val pipParams = pipParamsUntyped
|
|
63
64
|
if (
|
|
65
|
+
!startingScreenShare &&
|
|
64
66
|
Build.VERSION.SDK_INT >= Build.VERSION_CODES.O &&
|
|
65
67
|
pipParamConfig?.autoEnterPipMode == true &&
|
|
66
68
|
pipParams is android.app.PictureInPictureParams
|
|
@@ -1264,13 +1266,13 @@ class HMSManager(reactContext: ReactApplicationContext) :
|
|
|
1264
1266
|
|
|
1265
1267
|
@ReactMethod
|
|
1266
1268
|
fun checkNotifications(promise: Promise?) {
|
|
1267
|
-
val
|
|
1269
|
+
val reactApplicationContext = reactApplicationContext
|
|
1268
1270
|
|
|
1269
|
-
if (
|
|
1270
|
-
promise?.reject(Throwable("`
|
|
1271
|
+
if (reactApplicationContext == null) {
|
|
1272
|
+
promise?.reject(Throwable("`reactApplicationContext` is not available!"))
|
|
1271
1273
|
return
|
|
1272
1274
|
}
|
|
1273
|
-
val enabled = NotificationManagerCompat.from(
|
|
1275
|
+
val enabled = NotificationManagerCompat.from(reactApplicationContext).areNotificationsEnabled()
|
|
1274
1276
|
val data: WritableMap = Arguments.createMap()
|
|
1275
1277
|
|
|
1276
1278
|
data.putString("status", if (enabled) "granted" else "blocked")
|
|
@@ -1280,6 +1282,21 @@ class HMSManager(reactContext: ReactApplicationContext) :
|
|
|
1280
1282
|
promise?.resolve(data)
|
|
1281
1283
|
}
|
|
1282
1284
|
|
|
1285
|
+
@ReactMethod(isBlockingSynchronousMethod = true)
|
|
1286
|
+
fun setSoftInputMode(inputMode: Int): Int {
|
|
1287
|
+
val window = reactApplicationContext?.currentActivity?.window ?: return -1
|
|
1288
|
+
UiThreadUtil.runOnUiThread {
|
|
1289
|
+
window.setSoftInputMode(inputMode)
|
|
1290
|
+
}
|
|
1291
|
+
return 0
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
@ReactMethod(isBlockingSynchronousMethod = true)
|
|
1295
|
+
fun getSoftInputMode(): Int {
|
|
1296
|
+
val attributes = reactApplicationContext?.currentActivity?.window?.attributes ?: return -1
|
|
1297
|
+
return attributes.softInputMode
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1283
1300
|
fun emitEvent(
|
|
1284
1301
|
event: String,
|
|
1285
1302
|
data: WritableMap,
|
|
@@ -1545,6 +1545,7 @@ class HMSRNSDK(
|
|
|
1545
1545
|
|
|
1546
1546
|
fun startScreenshare(callback: Promise?) {
|
|
1547
1547
|
screenshareCallback = callback
|
|
1548
|
+
HMSManager.startingScreenShare = true
|
|
1548
1549
|
runOnUiThread {
|
|
1549
1550
|
val intent = Intent(context, HmsScreenshareActivity::class.java)
|
|
1550
1551
|
intent.flags = FLAG_ACTIVITY_NEW_TASK
|
|
@@ -22,7 +22,6 @@ class HmsScreenshareActivity : ComponentActivity() {
|
|
|
22
22
|
override fun onError(error: HMSException) {
|
|
23
23
|
finish()
|
|
24
24
|
HMSManager.hmsCollection[id]?.screenshareCallback?.reject(error)
|
|
25
|
-
HMSManager.hmsCollection[id]?.emitHMSError(error)
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
override fun onSuccess() {
|
|
@@ -45,7 +44,6 @@ class HmsScreenshareActivity : ComponentActivity() {
|
|
|
45
44
|
"RESULT_CANCELED",
|
|
46
45
|
)
|
|
47
46
|
HMSManager.hmsCollection[id]?.screenshareCallback?.reject(error)
|
|
48
|
-
HMSManager.hmsCollection[id]?.emitHMSError(error)
|
|
49
47
|
finish()
|
|
50
48
|
}
|
|
51
49
|
}
|
|
@@ -66,7 +64,9 @@ class HmsScreenshareActivity : ComponentActivity() {
|
|
|
66
64
|
} catch (e: Exception) {
|
|
67
65
|
println(e)
|
|
68
66
|
}
|
|
67
|
+
HMSManager.startingScreenShare = false
|
|
69
68
|
} else {
|
|
69
|
+
HMSManager.startingScreenShare = false
|
|
70
70
|
HMSManager.hmsCollection[id]?.emitHMSError(
|
|
71
71
|
HMSException(
|
|
72
72
|
103,
|
package/ios/HMSDecoder.swift
CHANGED
|
@@ -29,7 +29,7 @@ class HMSDecoder: NSObject {
|
|
|
29
29
|
data["hlsRecordingState"] = hlsRecordingState
|
|
30
30
|
return data
|
|
31
31
|
case .browserRecordingStateUpdated:
|
|
32
|
-
let browserRecordingState = HMSDecoder.
|
|
32
|
+
let browserRecordingState = HMSDecoder.getBrowserRecordingState(hmsRoom?.browserRecordingState)
|
|
33
33
|
data["browserRecordingState"] = browserRecordingState
|
|
34
34
|
return data
|
|
35
35
|
case .hlsStreamingStateUpdated:
|
|
@@ -37,11 +37,11 @@ class HMSDecoder: NSObject {
|
|
|
37
37
|
data["hlsStreamingState"] = hlsStreamingState
|
|
38
38
|
return data
|
|
39
39
|
case .rtmpStreamingStateUpdated:
|
|
40
|
-
let rtmpStreamingState = HMSDecoder.
|
|
40
|
+
let rtmpStreamingState = HMSDecoder.getRtmpStreamingState(hmsRoom?.rtmpStreamingState)
|
|
41
41
|
data["rtmpHMSRtmpStreamingState"] = rtmpStreamingState
|
|
42
42
|
return data
|
|
43
43
|
case .serverRecordingStateUpdated:
|
|
44
|
-
let serverRecordingState = HMSDecoder.
|
|
44
|
+
let serverRecordingState = HMSDecoder.getServerRecordingState(hmsRoom?.serverRecordingState)
|
|
45
45
|
data["serverRecordingState"] = serverRecordingState
|
|
46
46
|
return data
|
|
47
47
|
default:
|
|
@@ -66,9 +66,9 @@ class HMSDecoder: NSObject {
|
|
|
66
66
|
// if let startedAt = room.sessionStartedAt?.timeIntervalSince1970 {
|
|
67
67
|
// data["startedAt"] = startedAt * 1000
|
|
68
68
|
// }
|
|
69
|
-
data["browserRecordingState"] = HMSDecoder.
|
|
70
|
-
data["rtmpHMSRtmpStreamingState"] = HMSDecoder.
|
|
71
|
-
data["serverRecordingState"] = HMSDecoder.
|
|
69
|
+
data["browserRecordingState"] = HMSDecoder.getBrowserRecordingState(hmsRoom?.browserRecordingState)
|
|
70
|
+
data["rtmpHMSRtmpStreamingState"] = HMSDecoder.getRtmpStreamingState(hmsRoom?.rtmpStreamingState)
|
|
71
|
+
data["serverRecordingState"] = HMSDecoder.getServerRecordingState(hmsRoom?.serverRecordingState)
|
|
72
72
|
data["hlsStreamingState"] = HMSDecoder.getHlsStreamingState(hmsRoom?.hlsStreamingState)
|
|
73
73
|
data["hlsRecordingState"] = HMSDecoder.getHlsRecordingState(hmsRoom?.hlsRecordingState)
|
|
74
74
|
var peers = [[String: Any]]()
|
|
@@ -667,7 +667,7 @@ class HMSDecoder: NSObject {
|
|
|
667
667
|
return ["code": error.errorCode, "description": error.localizedDescription, "isTerminal": isTerminal, "canRetry": canRetry]
|
|
668
668
|
}
|
|
669
669
|
|
|
670
|
-
static func
|
|
670
|
+
static func getBrowserRecordingState(_ data: HMSBrowserRecordingState?) -> [String: Any] {
|
|
671
671
|
|
|
672
672
|
if let recordingState = data {
|
|
673
673
|
|
|
@@ -685,13 +685,15 @@ class HMSDecoder: NSObject {
|
|
|
685
685
|
state["error"] = HMSDecoder.getError(error)
|
|
686
686
|
}
|
|
687
687
|
|
|
688
|
+
state["state"] = recordingState.state.displayString().uppercased()
|
|
689
|
+
|
|
688
690
|
return state
|
|
689
691
|
} else {
|
|
690
692
|
return [String: Any]()
|
|
691
693
|
}
|
|
692
694
|
}
|
|
693
695
|
|
|
694
|
-
static func
|
|
696
|
+
static func getRtmpStreamingState(_ data: HMSRTMPStreamingState?) -> [String: Any] {
|
|
695
697
|
if let streamingState = data {
|
|
696
698
|
|
|
697
699
|
var state = [String: Any]()
|
|
@@ -706,13 +708,15 @@ class HMSDecoder: NSObject {
|
|
|
706
708
|
state["error"] = HMSDecoder.getError(error)
|
|
707
709
|
}
|
|
708
710
|
|
|
711
|
+
state["state"] = streamingState.state.displayString().uppercased()
|
|
712
|
+
|
|
709
713
|
return state
|
|
710
714
|
} else {
|
|
711
715
|
return [String: Any]()
|
|
712
716
|
}
|
|
713
717
|
}
|
|
714
718
|
|
|
715
|
-
static func
|
|
719
|
+
static func getServerRecordingState(_ data: HMSServerRecordingState?) -> [String: Any] {
|
|
716
720
|
if let recordingState = data {
|
|
717
721
|
|
|
718
722
|
var state = [String: Any]()
|
|
@@ -727,6 +731,8 @@ class HMSDecoder: NSObject {
|
|
|
727
731
|
state["error"] = HMSDecoder.getError(error)
|
|
728
732
|
}
|
|
729
733
|
|
|
734
|
+
state["state"] = recordingState.state.displayString().uppercased()
|
|
735
|
+
|
|
730
736
|
return state
|
|
731
737
|
} else {
|
|
732
738
|
return [String: Any]()
|
|
@@ -735,10 +741,24 @@ class HMSDecoder: NSObject {
|
|
|
735
741
|
|
|
736
742
|
static func getHlsStreamingState(_ data: HMSHLSStreamingState?) -> [String: Any] {
|
|
737
743
|
if let streamingState = data {
|
|
738
|
-
let running = streamingState.running
|
|
739
|
-
let variants = HMSDecoder.getHMSHlsVariant(streamingState.variants)
|
|
740
744
|
|
|
741
|
-
|
|
745
|
+
var state = [String: Any]()
|
|
746
|
+
|
|
747
|
+
state["running"] = streamingState.running
|
|
748
|
+
|
|
749
|
+
if let startedAt = streamingState.startedAt?.timeIntervalSince1970 {
|
|
750
|
+
state["startedAt"] = startedAt * 1000
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
if let error = streamingState.error {
|
|
754
|
+
state["error"] = HMSDecoder.getError(error)
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
state["state"] = streamingState.state.displayString().uppercased()
|
|
758
|
+
|
|
759
|
+
state["variants"] = HMSDecoder.getHlsVariant(streamingState.variants)
|
|
760
|
+
|
|
761
|
+
return state
|
|
742
762
|
} else {
|
|
743
763
|
return [String: Any]()
|
|
744
764
|
}
|
|
@@ -748,15 +768,23 @@ class HMSDecoder: NSObject {
|
|
|
748
768
|
var state = [String: Any]()
|
|
749
769
|
|
|
750
770
|
if let recordingState = data {
|
|
771
|
+
|
|
751
772
|
state["running"] = recordingState.running
|
|
773
|
+
|
|
752
774
|
if let startedAt = recordingState.startedAt?.timeIntervalSince1970 {
|
|
753
775
|
state["startedAt"] = startedAt * 1000
|
|
754
776
|
}
|
|
777
|
+
|
|
778
|
+
if let error = recordingState.error {
|
|
779
|
+
state["error"] = HMSDecoder.getError(error)
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
state["state"] = recordingState.state.displayString().uppercased()
|
|
755
783
|
}
|
|
756
784
|
return state
|
|
757
785
|
}
|
|
758
786
|
|
|
759
|
-
static func
|
|
787
|
+
static func getHlsVariant(_ data: [HMSHLSVariant]?) -> [[String: Any]] {
|
|
760
788
|
var variants = [[String: Any]]()
|
|
761
789
|
|
|
762
790
|
if let hlsVariant = data {
|
|
@@ -149,7 +149,7 @@ class HMSHLSPlayer: UIView {
|
|
|
149
149
|
return
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
if hlsStreamingState.
|
|
152
|
+
if hlsStreamingState.state == .started && !hlsStreamingState.variants.isEmpty {
|
|
153
153
|
hmsHLSPlayer.play(hlsStreamingState.variants[0].meetingURL)
|
|
154
154
|
}
|
|
155
155
|
}
|
package/ios/HMSRNSDK.swift
CHANGED
|
@@ -1267,13 +1267,13 @@ class HMSRNSDK: HMSUpdateListener, HMSPreviewListener {
|
|
|
1267
1267
|
return ["localPeer": HMSDecoder.getHmsLocalPeer(hms?.localPeer)]
|
|
1268
1268
|
|
|
1269
1269
|
case "browserRecordingState":
|
|
1270
|
-
return ["browserRecordingState": HMSDecoder.
|
|
1270
|
+
return ["browserRecordingState": HMSDecoder.getBrowserRecordingState(hmsRoom.browserRecordingState)]
|
|
1271
1271
|
|
|
1272
1272
|
case "rtmpHMSRtmpStreamingState":
|
|
1273
|
-
return ["rtmpHMSRtmpStreamingState": HMSDecoder.
|
|
1273
|
+
return ["rtmpHMSRtmpStreamingState": HMSDecoder.getRtmpStreamingState(hmsRoom.rtmpStreamingState)]
|
|
1274
1274
|
|
|
1275
1275
|
case "serverRecordingState":
|
|
1276
|
-
return ["serverRecordingState": HMSDecoder.
|
|
1276
|
+
return ["serverRecordingState": HMSDecoder.getServerRecordingState(hmsRoom.serverRecordingState)]
|
|
1277
1277
|
|
|
1278
1278
|
case "hlsStreamingState":
|
|
1279
1279
|
return ["hlsStreamingState": HMSDecoder.getHlsStreamingState(hmsRoom.hlsStreamingState)]
|
|
Binary file
|
package/ios/Hmssdk.xcodeproj/xcuserdata/jatinnagar.xcuserdatad/xcschemes/xcschememanagement.plist
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>SchemeUserState</key>
|
|
6
|
+
<dict>
|
|
7
|
+
<key>Hmssdk.xcscheme_^#shared#^_</key>
|
|
8
|
+
<dict>
|
|
9
|
+
<key>orderHint</key>
|
|
10
|
+
<integer>0</integer>
|
|
11
|
+
</dict>
|
|
12
|
+
</dict>
|
|
13
|
+
</dict>
|
|
14
|
+
</plist>
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.HMSAudioMixerSource = void 0;
|
|
7
7
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
-
function _toPropertyKey(
|
|
9
|
-
function _toPrimitive(
|
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
9
|
+
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); }
|
|
10
10
|
class HMSAudioMixerSource {
|
|
11
11
|
constructor(params) {
|
|
12
12
|
_defineProperty(this, "node", void 0);
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.HMSAudioNode = void 0;
|
|
7
7
|
var _HMSConstants = require("./HMSConstants");
|
|
8
8
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
-
function _toPropertyKey(
|
|
10
|
-
function _toPrimitive(
|
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
10
|
+
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); }
|
|
11
11
|
class HMSAudioNode {
|
|
12
12
|
constructor(name) {
|
|
13
13
|
_defineProperty(this, "name", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_HMSConstants","require","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","
|
|
1
|
+
{"version":3,"names":["_HMSConstants","require","_defineProperty","obj","key","value","_toPropertyKey","Object","defineProperty","enumerable","configurable","writable","t","i","_toPrimitive","String","r","e","Symbol","toPrimitive","call","TypeError","Number","HMSAudioNode","constructor","name","HMSConstants","DEFAULT_SDK_ID","toString","exports"],"sources":["HMSAudioNode.ts"],"sourcesContent":["import { HMSConstants } from './HMSConstants';\n\nexport class HMSAudioNode {\n name: string;\n sdkId: string = HMSConstants.DEFAULT_SDK_ID;\n\n constructor(name: string) {\n this.name = name;\n }\n\n toString(): string {\n return this.name;\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAA8C,SAAAC,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,CAAA,QAAAC,CAAA,GAAAC,YAAA,CAAAF,CAAA,uCAAAC,CAAA,GAAAA,CAAA,GAAAE,MAAA,CAAAF,CAAA;AAAA,SAAAC,aAAAF,CAAA,EAAAI,CAAA,2BAAAJ,CAAA,KAAAA,CAAA,SAAAA,CAAA,MAAAK,CAAA,GAAAL,CAAA,CAAAM,MAAA,CAAAC,WAAA,kBAAAF,CAAA,QAAAJ,CAAA,GAAAI,CAAA,CAAAG,IAAA,CAAAR,CAAA,EAAAI,CAAA,uCAAAH,CAAA,SAAAA,CAAA,YAAAQ,SAAA,yEAAAL,CAAA,GAAAD,MAAA,GAAAO,MAAA,EAAAV,CAAA;AAEvC,MAAMW,YAAY,CAAC;EAIxBC,WAAWA,CAACC,IAAY,EAAE;IAAAvB,eAAA;IAAAA,eAAA,gBAFVwB,0BAAY,CAACC,cAAc;IAGzC,IAAI,CAACF,IAAI,GAAGA,IAAI;EAClB;EAEAG,QAAQA,CAAA,EAAW;IACjB,OAAO,IAAI,CAACH,IAAI;EAClB;AACF;AAACI,OAAA,CAAAN,YAAA,GAAAA,YAAA"}
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.HMSAudioSettings = void 0;
|
|
7
7
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
-
function _toPropertyKey(
|
|
9
|
-
function _toPrimitive(
|
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
9
|
+
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); }
|
|
10
10
|
class HMSAudioSettings {
|
|
11
11
|
constructor(params) {
|
|
12
12
|
_defineProperty(this, "bitRate", void 0);
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.HMSAudioTrackSettings = void 0;
|
|
7
7
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
-
function _toPropertyKey(
|
|
9
|
-
function _toPrimitive(
|
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
9
|
+
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); }
|
|
10
10
|
/**
|
|
11
11
|
* Customize local peer's Audio track settings before Joining the Room.
|
|
12
12
|
*
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.HMSBrowserRecordingState = void 0;
|
|
7
7
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
-
function _toPropertyKey(
|
|
9
|
-
function _toPrimitive(
|
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
9
|
+
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); }
|
|
10
10
|
class HMSBrowserRecordingState {
|
|
11
11
|
constructor(params) {
|
|
12
12
|
_defineProperty(this, "initialising", void 0);
|
|
@@ -14,11 +14,13 @@ class HMSBrowserRecordingState {
|
|
|
14
14
|
_defineProperty(this, "error", void 0);
|
|
15
15
|
_defineProperty(this, "startedAt", void 0);
|
|
16
16
|
_defineProperty(this, "stoppedAt", void 0);
|
|
17
|
+
_defineProperty(this, "state", void 0);
|
|
17
18
|
this.initialising = params.initialising;
|
|
18
19
|
this.running = params.running;
|
|
19
20
|
this.error = params.error;
|
|
20
21
|
this.startedAt = params.startedAt;
|
|
21
22
|
this.stoppedAt = params.stoppedAt;
|
|
23
|
+
this.state = params.state;
|
|
22
24
|
}
|
|
23
25
|
}
|
|
24
26
|
exports.HMSBrowserRecordingState = HMSBrowserRecordingState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["HMSBrowserRecordingState","constructor","params","_defineProperty","initialising","running","error","startedAt","stoppedAt","exports"],"sources":["HMSBrowserRecordingState.ts"],"sourcesContent":["import type { HMSException } from './HMSException';\n\nexport class HMSBrowserRecordingState {\n initialising: boolean;\n running: boolean;\n error?: HMSException;\n startedAt?: Date;\n stoppedAt?: Date;\n\n constructor(params: {\n initialising: boolean;\n running: boolean;\n error?: HMSException;\n startedAt?: Date;\n stoppedAt?: Date;\n }) {\n this.initialising = params.initialising;\n this.running = params.running;\n this.error = params.error;\n this.startedAt = params.startedAt;\n this.stoppedAt = params.stoppedAt;\n }\n}\n"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"names":["HMSBrowserRecordingState","constructor","params","_defineProperty","initialising","running","error","startedAt","stoppedAt","state","exports"],"sources":["HMSBrowserRecordingState.ts"],"sourcesContent":["import type { HMSException } from './HMSException';\nimport type { HMSRecordingState } from './HMSRecordingState';\n\nexport class HMSBrowserRecordingState {\n initialising: boolean;\n running: boolean;\n error?: HMSException;\n startedAt?: Date;\n stoppedAt?: Date;\n state: HMSRecordingState;\n\n constructor(params: {\n initialising: boolean;\n running: boolean;\n error?: HMSException;\n startedAt?: Date;\n stoppedAt?: Date;\n state: HMSRecordingState;\n }) {\n this.initialising = params.initialising;\n this.running = params.running;\n this.error = params.error;\n this.startedAt = params.startedAt;\n this.stoppedAt = params.stoppedAt;\n this.state = params.state;\n }\n}\n"],"mappings":";;;;;;;;;AAGO,MAAMA,wBAAwB,CAAC;EAQpCC,WAAWA,CAACC,MAOX,EAAE;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IACD,IAAI,CAACC,YAAY,GAAGF,MAAM,CAACE,YAAY;IACvC,IAAI,CAACC,OAAO,GAAGH,MAAM,CAACG,OAAO;IAC7B,IAAI,CAACC,KAAK,GAAGJ,MAAM,CAACI,KAAK;IACzB,IAAI,CAACC,SAAS,GAAGL,MAAM,CAACK,SAAS;IACjC,IAAI,CAACC,SAAS,GAAGN,MAAM,CAACM,SAAS;IACjC,IAAI,CAACC,KAAK,GAAGP,MAAM,CAACO,KAAK;EAC3B;AACF;AAACC,OAAA,CAAAV,wBAAA,GAAAA,wBAAA"}
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.HMSChangeTrackStateRequest = void 0;
|
|
7
7
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
-
function _toPropertyKey(
|
|
9
|
-
function _toPrimitive(
|
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
9
|
+
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); }
|
|
10
10
|
class HMSChangeTrackStateRequest {
|
|
11
11
|
constructor(params) {
|
|
12
12
|
_defineProperty(this, "requestedBy", void 0);
|
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.HMSConfig = void 0;
|
|
7
7
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
-
function _toPropertyKey(
|
|
9
|
-
function _toPrimitive(
|
|
8
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
9
|
+
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); }
|
|
10
10
|
class HMSConfig {
|
|
11
11
|
constructor(params) {
|
|
12
12
|
_defineProperty(this, "username", void 0);
|
|
@@ -47,8 +47,8 @@ var _HMSQualityLimitationReasons = require("./HMSQualityLimitationReasons");
|
|
|
47
47
|
var _HMSTrackType = require("./HMSTrackType");
|
|
48
48
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
49
49
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
50
|
-
function _toPropertyKey(
|
|
51
|
-
function _toPrimitive(
|
|
50
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
|
|
51
|
+
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); }
|
|
52
52
|
class HMSEncoder {
|
|
53
53
|
static clearData() {
|
|
54
54
|
this.data = {
|
|
@@ -71,7 +71,6 @@ class HMSEncoder {
|
|
|
71
71
|
localPeer: HMSEncoder.encodeHmsLocalPeer(room === null || room === void 0 ? void 0 : room.localPeer, id)
|
|
72
72
|
// startedAt: HMSEncoder.encodeDate(room?.startedAt),
|
|
73
73
|
};
|
|
74
|
-
|
|
75
74
|
return new _HMSRoom.HMSRoom(encodedObj);
|
|
76
75
|
}
|
|
77
76
|
static encodeHmsPeers(peers) {
|
|
@@ -363,22 +362,24 @@ class HMSEncoder {
|
|
|
363
362
|
running: (data === null || data === void 0 ? void 0 : data.running) || false,
|
|
364
363
|
startedAt: HMSEncoder.encodeDate(data === null || data === void 0 ? void 0 : data.startedAt),
|
|
365
364
|
stoppedAt: HMSEncoder.encodeDate(data === null || data === void 0 ? void 0 : data.stoppedAt),
|
|
366
|
-
error: (data === null || data === void 0 ? void 0 : data.error) || undefined
|
|
365
|
+
error: (data === null || data === void 0 ? void 0 : data.error) || undefined,
|
|
366
|
+
state: data === null || data === void 0 ? void 0 : data.state
|
|
367
367
|
});
|
|
368
368
|
}
|
|
369
369
|
static encodeServerRecordingState(data) {
|
|
370
370
|
return new _HMSServerRecordingState.HMSServerRecordingState({
|
|
371
371
|
running: (data === null || data === void 0 ? void 0 : data.running) || false,
|
|
372
372
|
error: (data === null || data === void 0 ? void 0 : data.error) || undefined,
|
|
373
|
-
startedAt: HMSEncoder.encodeDate(data === null || data === void 0 ? void 0 : data.startedAt)
|
|
373
|
+
startedAt: HMSEncoder.encodeDate(data === null || data === void 0 ? void 0 : data.startedAt),
|
|
374
|
+
state: data === null || data === void 0 ? void 0 : data.state
|
|
374
375
|
});
|
|
375
376
|
}
|
|
376
377
|
static encodeRTMPStreamingState(data) {
|
|
377
378
|
return new _HMSRtmpStreamingState.HMSRtmpStreamingState({
|
|
378
379
|
running: (data === null || data === void 0 ? void 0 : data.running) || false,
|
|
379
380
|
startedAt: HMSEncoder.encodeDate(data === null || data === void 0 ? void 0 : data.startedAt),
|
|
380
|
-
|
|
381
|
-
|
|
381
|
+
error: (data === null || data === void 0 ? void 0 : data.error) || undefined,
|
|
382
|
+
state: data === null || data === void 0 ? void 0 : data.state
|
|
382
383
|
});
|
|
383
384
|
}
|
|
384
385
|
static encodeDate(dateData) {
|
|
@@ -394,6 +395,9 @@ class HMSEncoder {
|
|
|
394
395
|
static encodeHLSStreamingState(data) {
|
|
395
396
|
return new _HMSHLSStreamingState.HMSHLSStreamingState({
|
|
396
397
|
running: (data === null || data === void 0 ? void 0 : data.running) || false,
|
|
398
|
+
startedAt: HMSEncoder.encodeDate(data === null || data === void 0 ? void 0 : data.startedAt),
|
|
399
|
+
error: (data === null || data === void 0 ? void 0 : data.error) || undefined,
|
|
400
|
+
state: data === null || data === void 0 ? void 0 : data.state,
|
|
397
401
|
variants: Array.isArray(data === null || data === void 0 ? void 0 : data.variants) ? this.encodeHLSVariants(data === null || data === void 0 ? void 0 : data.variants) : undefined
|
|
398
402
|
});
|
|
399
403
|
}
|
|
@@ -402,8 +406,8 @@ class HMSEncoder {
|
|
|
402
406
|
return new _HMSHLSRecordingState.HMSHLSRecordingState({
|
|
403
407
|
running: (data === null || data === void 0 ? void 0 : data.running) || false,
|
|
404
408
|
startedAt: HMSEncoder.encodeDate(data === null || data === void 0 ? void 0 : data.startedAt),
|
|
405
|
-
|
|
406
|
-
|
|
409
|
+
error: (data === null || data === void 0 ? void 0 : data.error) || undefined,
|
|
410
|
+
state: data === null || data === void 0 ? void 0 : data.state
|
|
407
411
|
});
|
|
408
412
|
} else {
|
|
409
413
|
return undefined;
|
|
@@ -515,7 +519,6 @@ class HMSEncoder {
|
|
|
515
519
|
} : undefined // resolution: [width, height]
|
|
516
520
|
});
|
|
517
521
|
}
|
|
518
|
-
|
|
519
522
|
static encodeHMSSimulcastLayerDefinition(data) {
|
|
520
523
|
return data.map(sld => {
|
|
521
524
|
return new _HMSSimulcastLayerDefinition.HMSSimulcastLayerDefinition({
|