@100mslive/react-native-hms 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +3 -2
- package/android/src/main/java/com/reactnativehmssdk/HMSDecoder.kt +189 -55
- package/android/src/main/java/com/reactnativehmssdk/HMSHelper.kt +1 -0
- package/android/src/main/java/com/reactnativehmssdk/HMSManager.kt +94 -38
- package/android/src/main/java/com/reactnativehmssdk/HMSRNSDK.kt +446 -107
- package/android/src/main/java/com/reactnativehmssdk/HMSSDKViewManager.kt +5 -0
- package/android/src/main/java/com/reactnativehmssdk/HMSView.kt +42 -25
- package/android/src/main/res/layout/hms_view.xml +2 -2
- package/ios/HMSConstants.swift +33 -0
- package/ios/HMSDecoder.swift +372 -157
- package/ios/HMSHelper.swift +44 -7
- package/ios/HMSManager.m +17 -2
- package/ios/HMSManager.swift +177 -75
- package/ios/HMSRNSDK.swift +641 -199
- package/ios/HMSView.m +1 -0
- package/ios/HMSView.swift +21 -19
- package/lib/commonjs/classes/HMSAudioTrackSettings.js +14 -0
- package/lib/commonjs/classes/HMSAudioTrackSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSCameraControl.js +28 -0
- package/lib/commonjs/classes/HMSCameraControl.js.map +1 -0
- package/lib/commonjs/classes/HMSEncoder.js +97 -14
- package/lib/commonjs/classes/HMSEncoder.js.map +1 -1
- package/lib/commonjs/classes/HMSIOSAudioMode.js +13 -0
- package/lib/commonjs/classes/HMSIOSAudioMode.js.map +1 -0
- package/lib/commonjs/classes/HMSLayer.js +14 -0
- package/lib/commonjs/classes/HMSLayer.js.map +1 -0
- package/lib/commonjs/classes/HMSLocalVideoStats.js +11 -0
- package/lib/commonjs/classes/HMSLocalVideoStats.js.map +1 -1
- package/lib/commonjs/classes/HMSPeer.js +1 -1
- package/lib/commonjs/classes/HMSPeer.js.map +1 -1
- package/lib/commonjs/classes/HMSPublishSettings.js +2 -0
- package/lib/commonjs/classes/HMSPublishSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSQualityLimitationReason.js +16 -0
- package/lib/commonjs/classes/HMSQualityLimitationReason.js.map +1 -0
- package/lib/commonjs/classes/HMSQualityLimitationReasons.js +27 -0
- package/lib/commonjs/classes/HMSQualityLimitationReasons.js.map +1 -0
- package/lib/commonjs/classes/HMSRemotePeer.js.map +1 -1
- package/lib/commonjs/classes/HMSRemoteVideoTrack.js +39 -3
- package/lib/commonjs/classes/HMSRemoteVideoTrack.js.map +1 -1
- package/lib/commonjs/classes/HMSRoom.js +4 -0
- package/lib/commonjs/classes/HMSRoom.js.map +1 -1
- package/lib/commonjs/classes/HMSRoomUpdate.js +1 -0
- package/lib/commonjs/classes/HMSRoomUpdate.js.map +1 -1
- package/lib/commonjs/classes/HMSSDK.js +82 -45
- package/lib/commonjs/classes/HMSSDK.js.map +1 -1
- package/lib/commonjs/classes/HMSSessionStore.js +173 -0
- package/lib/commonjs/classes/HMSSessionStore.js.map +1 -0
- package/lib/commonjs/classes/HMSSimulcastLayerDefinition.js +19 -0
- package/lib/commonjs/classes/HMSSimulcastLayerDefinition.js.map +1 -0
- package/lib/commonjs/classes/HMSSimulcastLayerSettingsPolicy.js +23 -0
- package/lib/commonjs/classes/HMSSimulcastLayerSettingsPolicy.js.map +1 -0
- package/lib/commonjs/classes/HMSSimulcastSettings.js +5 -4
- package/lib/commonjs/classes/HMSSimulcastSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSSimulcastSettingsPolicy.js +17 -0
- package/lib/commonjs/classes/HMSSimulcastSettingsPolicy.js.map +1 -0
- package/lib/commonjs/classes/HMSSubscribeDegradationPolicy.js +21 -0
- package/lib/commonjs/classes/HMSSubscribeDegradationPolicy.js.map +1 -0
- package/lib/commonjs/classes/HMSSubscribeSettings.js +2 -0
- package/lib/commonjs/classes/HMSSubscribeSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSUpdateListenerActions.js +8 -0
- package/lib/commonjs/classes/HMSUpdateListenerActions.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoResolution.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoTrackSettings.js +5 -0
- package/lib/commonjs/classes/HMSVideoTrackSettings.js.map +1 -1
- package/lib/commonjs/classes/HmsView.js +2 -0
- package/lib/commonjs/classes/HmsView.js.map +1 -1
- package/lib/commonjs/index.js +72 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/utils/emitter/EventEmitter.js +162 -0
- package/lib/commonjs/utils/emitter/EventEmitter.js.map +1 -0
- package/lib/commonjs/utils/emitter/_EmitterSubscription.js +46 -0
- package/lib/commonjs/utils/emitter/_EmitterSubscription.js.map +1 -0
- package/lib/commonjs/utils/emitter/_EventSubscription.js +36 -0
- package/lib/commonjs/utils/emitter/_EventSubscription.js.map +1 -0
- package/lib/commonjs/utils/emitter/_EventSubscriptionVendor.js +90 -0
- package/lib/commonjs/utils/emitter/_EventSubscriptionVendor.js.map +1 -0
- package/lib/commonjs/utils/index.js +17 -0
- package/lib/commonjs/utils/index.js.map +1 -0
- package/lib/module/classes/HMSAudioTrackSettings.js +14 -0
- package/lib/module/classes/HMSAudioTrackSettings.js.map +1 -1
- package/lib/module/classes/HMSCameraControl.js +21 -0
- package/lib/module/classes/HMSCameraControl.js.map +1 -0
- package/lib/module/classes/HMSEncoder.js +97 -14
- package/lib/module/classes/HMSEncoder.js.map +1 -1
- package/lib/module/classes/HMSIOSAudioMode.js +6 -0
- package/lib/module/classes/HMSIOSAudioMode.js.map +1 -0
- package/lib/module/classes/HMSLayer.js +7 -0
- package/lib/module/classes/HMSLayer.js.map +1 -0
- package/lib/module/classes/HMSLocalVideoStats.js +11 -0
- package/lib/module/classes/HMSLocalVideoStats.js.map +1 -1
- package/lib/module/classes/HMSPeer.js +1 -1
- package/lib/module/classes/HMSPeer.js.map +1 -1
- package/lib/module/classes/HMSPublishSettings.js +2 -0
- package/lib/module/classes/HMSPublishSettings.js.map +1 -1
- package/lib/module/classes/HMSQualityLimitationReason.js +9 -0
- package/lib/module/classes/HMSQualityLimitationReason.js.map +1 -0
- package/lib/module/classes/HMSQualityLimitationReasons.js +20 -0
- package/lib/module/classes/HMSQualityLimitationReasons.js.map +1 -0
- package/lib/module/classes/HMSRemotePeer.js.map +1 -1
- package/lib/module/classes/HMSRemoteVideoTrack.js +39 -3
- package/lib/module/classes/HMSRemoteVideoTrack.js.map +1 -1
- package/lib/module/classes/HMSRoom.js +4 -0
- package/lib/module/classes/HMSRoom.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/HMSSDK.js +83 -45
- package/lib/module/classes/HMSSDK.js.map +1 -1
- package/lib/module/classes/HMSSessionStore.js +166 -0
- package/lib/module/classes/HMSSessionStore.js.map +1 -0
- package/lib/module/classes/HMSSimulcastLayerDefinition.js +12 -0
- package/lib/module/classes/HMSSimulcastLayerDefinition.js.map +1 -0
- package/lib/module/classes/HMSSimulcastLayerSettingsPolicy.js +16 -0
- package/lib/module/classes/HMSSimulcastLayerSettingsPolicy.js.map +1 -0
- package/lib/module/classes/HMSSimulcastSettings.js +5 -4
- package/lib/module/classes/HMSSimulcastSettings.js.map +1 -1
- package/lib/module/classes/HMSSimulcastSettingsPolicy.js +10 -0
- package/lib/module/classes/HMSSimulcastSettingsPolicy.js.map +1 -0
- package/lib/module/classes/HMSSubscribeDegradationPolicy.js +14 -0
- package/lib/module/classes/HMSSubscribeDegradationPolicy.js.map +1 -0
- package/lib/module/classes/HMSSubscribeSettings.js +2 -0
- package/lib/module/classes/HMSSubscribeSettings.js.map +1 -1
- package/lib/module/classes/HMSUpdateListenerActions.js +8 -0
- package/lib/module/classes/HMSUpdateListenerActions.js.map +1 -1
- package/lib/module/classes/HMSVideoResolution.js.map +1 -1
- package/lib/module/classes/HMSVideoTrackSettings.js +5 -0
- package/lib/module/classes/HMSVideoTrackSettings.js.map +1 -1
- package/lib/module/classes/HmsView.js +2 -0
- package/lib/module/classes/HmsView.js.map +1 -1
- package/lib/module/index.js +6 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/emitter/EventEmitter.js +151 -0
- package/lib/module/utils/emitter/EventEmitter.js.map +1 -0
- package/lib/module/utils/emitter/_EmitterSubscription.js +39 -0
- package/lib/module/utils/emitter/_EmitterSubscription.js.map +1 -0
- package/lib/module/utils/emitter/_EventSubscription.js +29 -0
- package/lib/module/utils/emitter/_EventSubscription.js.map +1 -0
- package/lib/module/utils/emitter/_EventSubscriptionVendor.js +83 -0
- package/lib/module/utils/emitter/_EventSubscriptionVendor.js.map +1 -0
- package/lib/module/utils/index.js +2 -0
- package/lib/module/utils/index.js.map +1 -0
- package/lib/typescript/classes/HMSAudioTrackSettings.d.ts +14 -0
- package/lib/typescript/classes/HMSCameraControl.d.ts +9 -0
- package/lib/typescript/classes/HMSEncoder.d.ts +13 -1
- package/lib/typescript/classes/HMSIOSAudioMode.d.ts +4 -0
- package/lib/typescript/classes/HMSLayer.d.ts +5 -0
- package/lib/typescript/classes/HMSLocalVideoStats.d.ts +6 -0
- package/lib/typescript/classes/HMSPeer.d.ts +1 -1
- package/lib/typescript/classes/HMSPublishSettings.d.ts +3 -0
- package/lib/typescript/classes/HMSQualityLimitationReason.d.ts +7 -0
- package/lib/typescript/classes/HMSQualityLimitationReasons.d.ts +17 -0
- package/lib/typescript/classes/HMSRemotePeer.d.ts +0 -1
- package/lib/typescript/classes/HMSRemoteVideoTrack.d.ts +6 -2
- package/lib/typescript/classes/HMSRoomUpdate.d.ts +2 -1
- package/lib/typescript/classes/HMSSDK.d.ts +21 -31
- package/lib/typescript/classes/HMSSessionStore.d.ts +63 -0
- package/lib/typescript/classes/HMSSimulcastLayerDefinition.d.ts +10 -0
- package/lib/typescript/classes/HMSSimulcastLayerSettingsPolicy.d.ts +12 -0
- package/lib/typescript/classes/HMSSimulcastSettings.d.ts +7 -3
- package/lib/typescript/classes/HMSSimulcastSettingsPolicy.d.ts +7 -0
- package/lib/typescript/classes/HMSSubscribeDegradationPolicy.d.ts +10 -0
- package/lib/typescript/classes/HMSSubscribeSettings.d.ts +5 -2
- package/lib/typescript/classes/HMSUpdateListenerActions.d.ts +9 -1
- package/lib/typescript/classes/HMSVideoResolution.d.ts +2 -2
- package/lib/typescript/classes/HMSVideoTrackSettings.d.ts +5 -0
- package/lib/typescript/classes/HmsView.d.ts +2 -2
- package/lib/typescript/index.d.ts +7 -0
- package/lib/typescript/utils/emitter/EventEmitter.d.ts +91 -0
- package/lib/typescript/utils/emitter/_EmitterSubscription.d.ts +29 -0
- package/lib/typescript/utils/emitter/_EventSubscription.d.ts +19 -0
- package/lib/typescript/utils/emitter/_EventSubscriptionVendor.d.ts +44 -0
- package/lib/typescript/utils/index.d.ts +1 -0
- package/package.json +21 -2
- package/sdk-versions.json +3 -3
- package/src/classes/HMSAudioTrackSettings.ts +16 -0
- package/src/classes/HMSCameraControl.ts +21 -0
- package/src/classes/HMSEncoder.ts +126 -11
- package/src/classes/HMSIOSAudioMode.ts +4 -0
- package/src/classes/HMSLayer.ts +5 -0
- package/src/classes/HMSLocalVideoStats.ts +21 -0
- package/src/classes/HMSPeer.ts +1 -1
- package/src/classes/HMSPublishSettings.ts +4 -0
- package/src/classes/HMSQualityLimitationReason.ts +7 -0
- package/src/classes/HMSQualityLimitationReasons.ts +27 -0
- package/src/classes/HMSRemotePeer.ts +0 -1
- package/src/classes/HMSRemoteVideoTrack.ts +52 -4
- package/src/classes/HMSRoom.ts +2 -0
- package/src/classes/HMSRoomUpdate.ts +1 -0
- package/src/classes/HMSSDK.tsx +124 -52
- package/src/classes/HMSSessionStore.ts +209 -0
- package/src/classes/HMSSimulcastLayerDefinition.ts +12 -0
- package/src/classes/HMSSimulcastLayerSettingsPolicy.ts +18 -0
- package/src/classes/HMSSimulcastSettings.ts +12 -3
- package/src/classes/HMSSimulcastSettingsPolicy.ts +9 -0
- package/src/classes/HMSSubscribeDegradationPolicy.ts +15 -0
- package/src/classes/HMSSubscribeSettings.ts +10 -2
- package/src/classes/HMSUpdateListenerActions.ts +8 -0
- package/src/classes/HMSVideoResolution.ts +1 -1
- package/src/classes/HMSVideoTrackSettings.ts +5 -0
- package/src/classes/HmsView.tsx +5 -1
- package/src/index.ts +10 -0
- package/src/utils/emitter/EventEmitter.ts +160 -0
- package/src/utils/emitter/_EmitterSubscription.ts +44 -0
- package/src/utils/emitter/_EventSubscription.ts +28 -0
- package/src/utils/emitter/_EventSubscriptionVendor.ts +89 -0
- package/src/utils/index.ts +1 -0
|
@@ -80,6 +80,11 @@ class HMSSDKViewManager : SimpleViewManager<HMSView>() {
|
|
|
80
80
|
view.updateZOrderMediaOverlay(data)
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
@ReactProp(name = "autoSimulcast")
|
|
84
|
+
fun setAutoSimulcast(view: HMSView, data: Boolean?) {
|
|
85
|
+
data?.let { view.updateAutoSimulcast(it) }
|
|
86
|
+
}
|
|
87
|
+
|
|
83
88
|
private fun getHms(): MutableMap<String, HMSRNSDK>? {
|
|
84
89
|
return reactContext?.getNativeModule(HMSManager::class.java)?.getHmsInstance()
|
|
85
90
|
}
|
|
@@ -3,6 +3,7 @@ package com.reactnativehmssdk
|
|
|
3
3
|
import android.annotation.SuppressLint
|
|
4
4
|
import android.content.Context
|
|
5
5
|
import android.os.Build
|
|
6
|
+
import android.util.Log
|
|
6
7
|
import android.view.LayoutInflater
|
|
7
8
|
import android.widget.FrameLayout
|
|
8
9
|
import androidx.annotation.RequiresApi
|
|
@@ -13,30 +14,33 @@ import com.facebook.react.bridge.WritableMap
|
|
|
13
14
|
import com.facebook.react.uimanager.events.RCTEventEmitter
|
|
14
15
|
import live.hms.video.media.tracks.HMSVideoTrack
|
|
15
16
|
import live.hms.video.utils.HmsUtilities
|
|
16
|
-
import live.hms.
|
|
17
|
+
import live.hms.videoview.HMSVideoView
|
|
17
18
|
import org.webrtc.RendererCommon
|
|
18
|
-
import org.webrtc.SurfaceViewRenderer
|
|
19
19
|
|
|
20
20
|
@SuppressLint("ViewConstructor")
|
|
21
21
|
class HMSView(context: ReactContext) : FrameLayout(context) {
|
|
22
|
-
private var
|
|
22
|
+
private var hmsVideoView: HMSVideoView = HMSVideoView(context)
|
|
23
23
|
private var videoTrack: HMSVideoTrack? = null
|
|
24
24
|
private var scaleTypeApplied: Boolean = false
|
|
25
25
|
private var sdkId: String = "12345"
|
|
26
26
|
private var currentScaleType: RendererCommon.ScalingType =
|
|
27
|
-
|
|
27
|
+
RendererCommon.ScalingType.SCALE_ASPECT_FILL
|
|
28
|
+
private var disableAutoSimulcastLayerSelect = false
|
|
28
29
|
|
|
29
30
|
init {
|
|
30
31
|
val inflater = getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
|
|
31
32
|
val view = inflater.inflate(R.layout.hms_view, this)
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
hmsVideoView = view.findViewById(R.id.hmsVideoView)
|
|
35
|
+
hmsVideoView.setEnableHardwareScaler(false)
|
|
36
|
+
hmsVideoView.setScalingType(currentScaleType)
|
|
37
|
+
hmsVideoView.setMirror(false)
|
|
38
|
+
hmsVideoView.disableAutoSimulcastLayerSelect(disableAutoSimulcastLayerSelect)
|
|
35
39
|
}
|
|
36
40
|
|
|
37
41
|
@RequiresApi(Build.VERSION_CODES.N)
|
|
38
42
|
fun captureHmsView(args: ReadableArray?) {
|
|
39
|
-
HMSHelper.captureSurfaceView(
|
|
43
|
+
HMSHelper.captureSurfaceView(hmsVideoView, sdkId, args, context, id)
|
|
40
44
|
}
|
|
41
45
|
|
|
42
46
|
private fun onReceiveNativeEvent() {
|
|
@@ -48,26 +52,32 @@ class HMSView(context: ReactContext) : FrameLayout(context) {
|
|
|
48
52
|
|
|
49
53
|
override fun onDetachedFromWindow() {
|
|
50
54
|
super.onDetachedFromWindow()
|
|
51
|
-
|
|
52
|
-
surfaceView.release()
|
|
55
|
+
hmsVideoView.removeTrack()
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
override fun onAttachedToWindow() {
|
|
56
59
|
super.onAttachedToWindow()
|
|
57
|
-
|
|
58
|
-
videoTrack?.
|
|
59
|
-
|
|
60
|
-
if (
|
|
61
|
-
|
|
60
|
+
|
|
61
|
+
videoTrack?.let { // Safe Call Operator to check if videoTrack is not null
|
|
62
|
+
hmsVideoView.addTrack(it) // add the videoTrack to the hmsVideoView
|
|
63
|
+
if (!scaleTypeApplied) { // check if the scaleTypeApplied flag is false
|
|
64
|
+
if (currentScaleType != RendererCommon.ScalingType.SCALE_ASPECT_FILL) { // check if the currentScaleType is not SCALE_ASPECT_FILL
|
|
65
|
+
onReceiveNativeEvent() // call the onReceiveNativeEvent function
|
|
66
|
+
}
|
|
67
|
+
scaleTypeApplied = true // set the scaleTypeApplied flag to true
|
|
62
68
|
}
|
|
63
|
-
|
|
69
|
+
} ?: run { // Elvis Operator to handle the case when videoTrack is null
|
|
70
|
+
Log.e(
|
|
71
|
+
"HMSView",
|
|
72
|
+
"HMSView attached to window, but it's videoTrack is null",
|
|
73
|
+
) // log an error message
|
|
64
74
|
}
|
|
65
75
|
}
|
|
66
76
|
|
|
67
77
|
fun updateZOrderMediaOverlay(setZOrderMediaOverlay: Boolean?) {
|
|
68
78
|
if (setZOrderMediaOverlay != null && setZOrderMediaOverlay) {
|
|
69
|
-
//
|
|
70
|
-
|
|
79
|
+
// hmsVideoView.setZOrderOnTop(true);
|
|
80
|
+
hmsVideoView.setZOrderMediaOverlay(setZOrderMediaOverlay)
|
|
71
81
|
}
|
|
72
82
|
}
|
|
73
83
|
|
|
@@ -75,17 +85,17 @@ class HMSView(context: ReactContext) : FrameLayout(context) {
|
|
|
75
85
|
if (scaleType != null) {
|
|
76
86
|
when (scaleType) {
|
|
77
87
|
"ASPECT_FIT" -> {
|
|
78
|
-
|
|
88
|
+
hmsVideoView.setScalingType(RendererCommon.ScalingType.SCALE_ASPECT_FIT)
|
|
79
89
|
currentScaleType = RendererCommon.ScalingType.SCALE_ASPECT_FIT
|
|
80
90
|
return
|
|
81
91
|
}
|
|
82
92
|
"ASPECT_FILL" -> {
|
|
83
|
-
|
|
93
|
+
hmsVideoView.setScalingType(RendererCommon.ScalingType.SCALE_ASPECT_FILL)
|
|
84
94
|
currentScaleType = RendererCommon.ScalingType.SCALE_ASPECT_FILL
|
|
85
95
|
return
|
|
86
96
|
}
|
|
87
97
|
"ASPECT_BALANCED" -> {
|
|
88
|
-
|
|
98
|
+
hmsVideoView.setScalingType(RendererCommon.ScalingType.SCALE_ASPECT_BALANCED)
|
|
89
99
|
currentScaleType = RendererCommon.ScalingType.SCALE_ASPECT_BALANCED
|
|
90
100
|
return
|
|
91
101
|
}
|
|
@@ -97,10 +107,10 @@ class HMSView(context: ReactContext) : FrameLayout(context) {
|
|
|
97
107
|
}
|
|
98
108
|
|
|
99
109
|
fun setData(
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
110
|
+
id: String?,
|
|
111
|
+
trackId: String?,
|
|
112
|
+
hmsCollection: MutableMap<String, HMSRNSDK>,
|
|
113
|
+
mirror: Boolean?,
|
|
104
114
|
) {
|
|
105
115
|
if (id != null) {
|
|
106
116
|
sdkId = id
|
|
@@ -109,9 +119,16 @@ class HMSView(context: ReactContext) : FrameLayout(context) {
|
|
|
109
119
|
|
|
110
120
|
if (trackId != null && hms != null) {
|
|
111
121
|
if (mirror != null) {
|
|
112
|
-
|
|
122
|
+
hmsVideoView.setMirror(mirror)
|
|
113
123
|
}
|
|
124
|
+
// TODO: can be optimized here
|
|
114
125
|
videoTrack = hms.getRoom()?.let { HmsUtilities.getVideoTrack(trackId, it) }
|
|
115
126
|
}
|
|
116
127
|
}
|
|
128
|
+
|
|
129
|
+
fun updateAutoSimulcast(autoSimulcast: Boolean?) {
|
|
130
|
+
autoSimulcast?.let {
|
|
131
|
+
hmsVideoView.disableAutoSimulcastLayerSelect(!it)
|
|
132
|
+
}
|
|
133
|
+
}
|
|
117
134
|
}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
android:layout_height="match_parent"
|
|
7
7
|
android:background="#000">
|
|
8
8
|
|
|
9
|
-
<
|
|
10
|
-
android:id="@+id/
|
|
9
|
+
<live.hms.videoview.HMSVideoView
|
|
10
|
+
android:id="@+id/hmsVideoView"
|
|
11
11
|
android:layout_width="wrap_content"
|
|
12
12
|
android:layout_height="wrap_content"
|
|
13
13
|
android:layout_gravity="center"
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//
|
|
2
|
+
// HMSConstants.swift
|
|
3
|
+
// HMSSDK
|
|
4
|
+
//
|
|
5
|
+
// Created by Yogesh Singh on 27/12/22.
|
|
6
|
+
// Copyright © 2023 100ms. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
import Foundation
|
|
10
|
+
|
|
11
|
+
struct HMSConstants {
|
|
12
|
+
|
|
13
|
+
static let ON_PREVIEW = "ON_PREVIEW"
|
|
14
|
+
static let ON_JOIN = "ON_JOIN"
|
|
15
|
+
static let ON_ROOM_UPDATE = "ON_ROOM_UPDATE"
|
|
16
|
+
static let ON_PEER_UPDATE = "3"
|
|
17
|
+
static let ON_TRACK_UPDATE = "ON_TRACK_UPDATE"
|
|
18
|
+
static let ON_ROLE_CHANGE_REQUEST = "ON_ROLE_CHANGE_REQUEST"
|
|
19
|
+
static let ON_CHANGE_TRACK_STATE_REQUEST = "ON_CHANGE_TRACK_STATE_REQUEST"
|
|
20
|
+
static let ON_REMOVED_FROM_ROOM = "ON_REMOVED_FROM_ROOM"
|
|
21
|
+
static let ON_ERROR = "ON_ERROR"
|
|
22
|
+
static let ON_MESSAGE = "ON_MESSAGE"
|
|
23
|
+
static let ON_SPEAKER = "ON_SPEAKER"
|
|
24
|
+
static let RECONNECTING = "RECONNECTING"
|
|
25
|
+
static let RECONNECTED = "RECONNECTED"
|
|
26
|
+
static let ON_RTC_STATS = "ON_RTC_STATS"
|
|
27
|
+
static let ON_LOCAL_AUDIO_STATS = "ON_LOCAL_AUDIO_STATS"
|
|
28
|
+
static let ON_LOCAL_VIDEO_STATS = "ON_LOCAL_VIDEO_STATS"
|
|
29
|
+
static let ON_REMOTE_AUDIO_STATS = "ON_REMOTE_AUDIO_STATS"
|
|
30
|
+
static let ON_REMOTE_VIDEO_STATS = "ON_REMOTE_VIDEO_STATS"
|
|
31
|
+
static let ON_SESSION_STORE_AVAILABLE = "ON_SESSION_STORE_AVAILABLE"
|
|
32
|
+
static let ON_SESSION_STORE_CHANGED = "ON_SESSION_STORE_CHANGED"
|
|
33
|
+
}
|