@100mslive/react-native-hms 1.5.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/src/main/java/com/reactnativehmssdk/HMSManager.kt +52 -24
- package/android/src/main/java/com/reactnativehmssdk/HMSRNSDK.kt +245 -62
- package/android/src/main/java/com/reactnativehmssdk/HMSView.kt +15 -6
- package/ios/HMSConstants.swift +3 -1
- package/ios/HMSDecoder.swift +1 -1
- package/ios/HMSHelper.swift +44 -7
- package/ios/HMSManager.m +8 -0
- package/ios/HMSManager.swift +35 -1
- package/ios/HMSRNSDK.swift +268 -38
- package/lib/commonjs/classes/HMSAudioTrackSettings.js +14 -0
- package/lib/commonjs/classes/HMSAudioTrackSettings.js.map +1 -1
- package/lib/commonjs/classes/HMSEncoder.js +2 -1
- 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/HMSSDK.js +50 -0
- 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/HMSUpdateListenerActions.js +8 -0
- package/lib/commonjs/classes/HMSUpdateListenerActions.js.map +1 -1
- package/lib/commonjs/classes/HMSVideoTrackSettings.js +5 -0
- package/lib/commonjs/classes/HMSVideoTrackSettings.js.map +1 -1
- package/lib/commonjs/index.js +12 -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/HMSEncoder.js +2 -1
- 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/HMSSDK.js +50 -0
- 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/HMSUpdateListenerActions.js +8 -0
- package/lib/module/classes/HMSUpdateListenerActions.js.map +1 -1
- package/lib/module/classes/HMSVideoTrackSettings.js +5 -0
- package/lib/module/classes/HMSVideoTrackSettings.js.map +1 -1
- package/lib/module/index.js +1 -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/HMSIOSAudioMode.d.ts +4 -0
- package/lib/typescript/classes/HMSSDK.d.ts +16 -0
- package/lib/typescript/classes/HMSSessionStore.d.ts +63 -0
- package/lib/typescript/classes/HMSUpdateListenerActions.d.ts +9 -1
- package/lib/typescript/classes/HMSVideoTrackSettings.d.ts +5 -0
- package/lib/typescript/index.d.ts +2 -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 +2 -2
- package/src/classes/HMSAudioTrackSettings.ts +16 -0
- package/src/classes/HMSEncoder.ts +1 -0
- package/src/classes/HMSIOSAudioMode.ts +4 -0
- package/src/classes/HMSSDK.tsx +70 -4
- package/src/classes/HMSSessionStore.ts +209 -0
- package/src/classes/HMSUpdateListenerActions.ts +8 -0
- package/src/classes/HMSVideoTrackSettings.ts +5 -0
- package/src/index.ts +5 -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
|
@@ -489,7 +489,7 @@ class HMSManager(reactContext: ReactApplicationContext) :
|
|
|
489
489
|
},
|
|
490
490
|
endMeeting = {
|
|
491
491
|
endMeeting()
|
|
492
|
-
}
|
|
492
|
+
},
|
|
493
493
|
)
|
|
494
494
|
} else {
|
|
495
495
|
null
|
|
@@ -556,7 +556,7 @@ class HMSManager(reactContext: ReactApplicationContext) :
|
|
|
556
556
|
pipRemoteActionsList[audioActionIdx] = android.app.RemoteAction(
|
|
557
557
|
android.graphics.drawable.Icon.createWithResource(
|
|
558
558
|
reactApplicationContext,
|
|
559
|
-
if (hmssdk?.getLocalPeer()?.audioTrack?.isMute === true) R.drawable.ic_mic_off_24 else R.drawable.ic_mic_24
|
|
559
|
+
if (hmssdk?.getLocalPeer()?.audioTrack?.isMute === true) R.drawable.ic_mic_off_24 else R.drawable.ic_mic_24,
|
|
560
560
|
),
|
|
561
561
|
PipActionReceiver.PIPActions.localAudio.title,
|
|
562
562
|
PipActionReceiver.PIPActions.localAudio.description,
|
|
@@ -564,8 +564,8 @@ class HMSManager(reactContext: ReactApplicationContext) :
|
|
|
564
564
|
reactApplicationContext,
|
|
565
565
|
PipActionReceiver.PIPActions.localAudio.requestCode,
|
|
566
566
|
Intent(PipActionReceiver.PIP_INTENT_ACTION).putExtra(PipActionReceiver.PIPActions.localAudio.title, PipActionReceiver.PIPActions.localAudio.requestCode),
|
|
567
|
-
PendingIntent.FLAG_IMMUTABLE
|
|
568
|
-
)
|
|
567
|
+
PendingIntent.FLAG_IMMUTABLE,
|
|
568
|
+
),
|
|
569
569
|
)
|
|
570
570
|
}
|
|
571
571
|
}
|
|
@@ -577,7 +577,7 @@ class HMSManager(reactContext: ReactApplicationContext) :
|
|
|
577
577
|
pipRemoteActionsList[videoActionIdx] = android.app.RemoteAction(
|
|
578
578
|
android.graphics.drawable.Icon.createWithResource(
|
|
579
579
|
reactApplicationContext,
|
|
580
|
-
updatedIcon
|
|
580
|
+
updatedIcon,
|
|
581
581
|
),
|
|
582
582
|
PipActionReceiver.PIPActions.localVideo.title,
|
|
583
583
|
PipActionReceiver.PIPActions.localVideo.description,
|
|
@@ -585,8 +585,8 @@ class HMSManager(reactContext: ReactApplicationContext) :
|
|
|
585
585
|
reactApplicationContext,
|
|
586
586
|
PipActionReceiver.PIPActions.localVideo.requestCode,
|
|
587
587
|
Intent(PipActionReceiver.PIP_INTENT_ACTION).putExtra(PipActionReceiver.PIPActions.localVideo.title, PipActionReceiver.PIPActions.localVideo.requestCode),
|
|
588
|
-
PendingIntent.FLAG_IMMUTABLE
|
|
589
|
-
)
|
|
588
|
+
PendingIntent.FLAG_IMMUTABLE,
|
|
589
|
+
),
|
|
590
590
|
)
|
|
591
591
|
}
|
|
592
592
|
}
|
|
@@ -606,7 +606,7 @@ class HMSManager(reactContext: ReactApplicationContext) :
|
|
|
606
606
|
val aspectRatio: Pair<Int, Int>?,
|
|
607
607
|
val showEndButton: Boolean,
|
|
608
608
|
val showVideoButton: Boolean,
|
|
609
|
-
val showAudioButton: Boolean
|
|
609
|
+
val showAudioButton: Boolean,
|
|
610
610
|
)
|
|
611
611
|
|
|
612
612
|
@ReactMethod
|
|
@@ -656,8 +656,8 @@ class HMSManager(reactContext: ReactApplicationContext) :
|
|
|
656
656
|
it.setAspectRatio(
|
|
657
657
|
Rational(
|
|
658
658
|
config.aspectRatio.first,
|
|
659
|
-
config.aspectRatio.second
|
|
660
|
-
)
|
|
659
|
+
config.aspectRatio.second,
|
|
660
|
+
),
|
|
661
661
|
)
|
|
662
662
|
}
|
|
663
663
|
|
|
@@ -679,7 +679,7 @@ class HMSManager(reactContext: ReactApplicationContext) :
|
|
|
679
679
|
android.app.RemoteAction(
|
|
680
680
|
android.graphics.drawable.Icon.createWithResource(
|
|
681
681
|
reactApplicationContext,
|
|
682
|
-
if (localPeer?.audioTrack?.isMute === true) R.drawable.ic_mic_off_24 else R.drawable.ic_mic_24
|
|
682
|
+
if (localPeer?.audioTrack?.isMute === true) R.drawable.ic_mic_off_24 else R.drawable.ic_mic_24,
|
|
683
683
|
),
|
|
684
684
|
PipActionReceiver.PIPActions.localAudio.title,
|
|
685
685
|
PipActionReceiver.PIPActions.localAudio.description,
|
|
@@ -687,9 +687,9 @@ class HMSManager(reactContext: ReactApplicationContext) :
|
|
|
687
687
|
reactApplicationContext,
|
|
688
688
|
PipActionReceiver.PIPActions.localAudio.requestCode,
|
|
689
689
|
Intent(PipActionReceiver.PIP_INTENT_ACTION).putExtra(PipActionReceiver.PIPActions.localAudio.title, PipActionReceiver.PIPActions.localAudio.requestCode),
|
|
690
|
-
PendingIntent.FLAG_IMMUTABLE
|
|
691
|
-
)
|
|
692
|
-
)
|
|
690
|
+
PendingIntent.FLAG_IMMUTABLE,
|
|
691
|
+
),
|
|
692
|
+
),
|
|
693
693
|
)
|
|
694
694
|
}
|
|
695
695
|
|
|
@@ -704,11 +704,11 @@ class HMSManager(reactContext: ReactApplicationContext) :
|
|
|
704
704
|
PipActionReceiver.PIPActions.endMeet.requestCode,
|
|
705
705
|
Intent(PipActionReceiver.PIP_INTENT_ACTION).putExtra(
|
|
706
706
|
PipActionReceiver.PIPActions.endMeet.title,
|
|
707
|
-
PipActionReceiver.PIPActions.endMeet.requestCode
|
|
707
|
+
PipActionReceiver.PIPActions.endMeet.requestCode,
|
|
708
708
|
),
|
|
709
|
-
PendingIntent.FLAG_IMMUTABLE
|
|
710
|
-
)
|
|
711
|
-
)
|
|
709
|
+
PendingIntent.FLAG_IMMUTABLE,
|
|
710
|
+
),
|
|
711
|
+
),
|
|
712
712
|
)
|
|
713
713
|
}
|
|
714
714
|
|
|
@@ -717,7 +717,7 @@ class HMSManager(reactContext: ReactApplicationContext) :
|
|
|
717
717
|
android.app.RemoteAction(
|
|
718
718
|
android.graphics.drawable.Icon.createWithResource(
|
|
719
719
|
reactApplicationContext,
|
|
720
|
-
if (localPeer?.videoTrack?.isMute === true) R.drawable.ic_camera_toggle_off else R.drawable.ic_camera_toggle_on
|
|
720
|
+
if (localPeer?.videoTrack?.isMute === true) R.drawable.ic_camera_toggle_off else R.drawable.ic_camera_toggle_on,
|
|
721
721
|
),
|
|
722
722
|
PipActionReceiver.PIPActions.localVideo.title,
|
|
723
723
|
PipActionReceiver.PIPActions.localVideo.description,
|
|
@@ -726,11 +726,11 @@ class HMSManager(reactContext: ReactApplicationContext) :
|
|
|
726
726
|
PipActionReceiver.PIPActions.localVideo.requestCode,
|
|
727
727
|
Intent(PipActionReceiver.PIP_INTENT_ACTION).putExtra(
|
|
728
728
|
PipActionReceiver.PIPActions.localVideo.title,
|
|
729
|
-
PipActionReceiver.PIPActions.localVideo.requestCode
|
|
729
|
+
PipActionReceiver.PIPActions.localVideo.requestCode,
|
|
730
730
|
),
|
|
731
|
-
PendingIntent.FLAG_IMMUTABLE
|
|
732
|
-
)
|
|
733
|
-
)
|
|
731
|
+
PendingIntent.FLAG_IMMUTABLE,
|
|
732
|
+
),
|
|
733
|
+
),
|
|
734
734
|
)
|
|
735
735
|
}
|
|
736
736
|
|
|
@@ -806,7 +806,7 @@ class HMSManager(reactContext: ReactApplicationContext) :
|
|
|
806
806
|
aspectRatio = aspectRatio,
|
|
807
807
|
showEndButton = showEndButton,
|
|
808
808
|
showAudioButton = showAudioButton,
|
|
809
|
-
showVideoButton = showVideoButton
|
|
809
|
+
showVideoButton = showVideoButton,
|
|
810
810
|
)
|
|
811
811
|
}
|
|
812
812
|
|
|
@@ -912,6 +912,34 @@ class HMSManager(reactContext: ReactApplicationContext) :
|
|
|
912
912
|
hms?.captureImageAtMaxSupportedResolution(data, promise)
|
|
913
913
|
}
|
|
914
914
|
|
|
915
|
+
@ReactMethod
|
|
916
|
+
fun setSessionMetadataForKey(data: ReadableMap, promise: Promise?) {
|
|
917
|
+
val hms = HMSHelper.getHms(data, hmsCollection)
|
|
918
|
+
|
|
919
|
+
hms?.setSessionMetadataForKey(data, promise)
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
@ReactMethod
|
|
923
|
+
fun getSessionMetadataForKey(data: ReadableMap, promise: Promise?) {
|
|
924
|
+
val hms = HMSHelper.getHms(data, hmsCollection)
|
|
925
|
+
|
|
926
|
+
hms?.getSessionMetadataForKey(data, promise)
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
@ReactMethod
|
|
930
|
+
fun addKeyChangeListener(data: ReadableMap, promise: Promise?) {
|
|
931
|
+
val hms = HMSHelper.getHms(data, hmsCollection)
|
|
932
|
+
|
|
933
|
+
hms?.addKeyChangeListener(data, promise)
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
@ReactMethod
|
|
937
|
+
fun removeKeyChangeListener(data: ReadableMap, promise: Promise?) {
|
|
938
|
+
val hms = HMSHelper.getHms(data, hmsCollection)
|
|
939
|
+
|
|
940
|
+
hms?.removeKeyChangeListener(data, promise)
|
|
941
|
+
}
|
|
942
|
+
|
|
915
943
|
fun emitEvent(event: String, data: WritableMap) {
|
|
916
944
|
reactApplicationContext
|
|
917
945
|
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
|