Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.10.2: Develop to main #1376

Merged
merged 39 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
d8fb199
updated package versions
ygit Mar 15, 2024
28c2ca5
updated package.json
ygit Mar 15, 2024
ee5a08d
updated default meeting link
ygit Mar 15, 2024
6b6dabc
updated packages
ygit Mar 16, 2024
73e2d42
updated sdk version
ygit Mar 25, 2024
8e47c84
updated packages
ygit Mar 27, 2024
f587869
RN-261: Krisp Noise cancellation support (#1369)
stanwolverine Apr 1, 2024
f2be907
RN-262: SIP peer support in sdk and prebuilt (#1372)
stanwolverine Apr 1, 2024
d78179b
saving username when joining a Room (#1370)
ygit Apr 1, 2024
1986429
RN-277: showing hand raise only if enabled from dashboard (#1371)
ygit Apr 1, 2024
f27b0e2
released sample app version 2.3.194 (444) ⚛️
ygit Apr 1, 2024
dd778ee
updated example app changelog
ygit Apr 1, 2024
53b04dc
released sample app version 2.3.195 (445) ⚛️
ygit Apr 1, 2024
8fc88d0
added noise cancellation button on preview
ygit Apr 2, 2024
4013a3e
added check if peer can publish audio
ygit Apr 2, 2024
60c03ee
added check for noise cancellation availability
ygit Apr 2, 2024
e701a5a
Revert "added check for noise cancellation availability"
ygit Apr 2, 2024
9746d63
Revert "Revert "added check for noise cancellation availability""
ygit Apr 2, 2024
c40f120
updated NC availablity checks
ygit Apr 2, 2024
42ba5e5
RN-285: added noise cancellation button on Preview screen (#1373)
ygit Apr 2, 2024
3bee45c
Merge branch 'RN-285' into develop
ygit Apr 2, 2024
f1310ca
RN-283: Updated name for SIP peer (#1375)
ygit Apr 2, 2024
7991355
released sample app version 2.3.196 (446) ⚛️
ygit Apr 2, 2024
f97dfda
released sample app version 2.4.1 (451) ⚛️
ygit Apr 2, 2024
56c442b
released sample app version 2.4.3 (453) ⚛️
ygit Apr 8, 2024
9292691
Merge branch 'main' into develop
ygit Apr 8, 2024
b85436e
added privacy info file on iOS
ygit Apr 8, 2024
66f839c
updated privacy info
ygit Apr 8, 2024
4867094
updated privacy type
ygit Apr 8, 2024
72efe65
released sample app version 2.4.5 (455) ⚛️
ygit Apr 8, 2024
44ddcaa
using prod android build versions
ygit Apr 8, 2024
b5a87c2
updated NC availablity checks
ygit Apr 8, 2024
bda4131
disabling NC button if audio muted
ygit Apr 8, 2024
513619f
released sample app version 2.4.6 (456) ⚛️
ygit Apr 8, 2024
fd9412a
updated peer dependency
ygit Apr 8, 2024
9ed9f9b
updated java version in build script
ygit Apr 8, 2024
6449b9b
updated to JDK 17 in build script
ygit Apr 8, 2024
0fd2aad
updated java version to 15 in build script
ygit Apr 8, 2024
51355ea
updated to java version 11 in build script
ygit Apr 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cli:
plugins:
sources:
- id: trunk
ref: v1.4.4
ref: v1.4.5
uri: https://github.com/trunk-io/plugins
lint:
disabled:
Expand All @@ -14,9 +14,9 @@ lint:
- [email protected]
- [email protected]
- [email protected]
- [email protected].38
- trivy@0.49.1
- trufflehog@3.69.0
- [email protected].53
- trivy@0.50.1
- trufflehog@3.71.0
- [email protected]
- [email protected]
- [email protected]
Expand All @@ -26,7 +26,7 @@ lint:
- [email protected]
- git-diff-check
- [email protected]
- buildifier@6.4.0
- buildifier@7.1.0
runtimes:
enabled:
- [email protected]
Expand Down
12 changes: 9 additions & 3 deletions packages/react-native-hms/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@ dependencies {
implementation "androidx.constraintlayout:constraintlayout:2.1.3"
implementation "androidx.appcompat:appcompat:1.3.1"

implementation "live.100ms:android-sdk:${sdkVersions["android"]}"
implementation "live.100ms:video-view:${sdkVersions["android"]}"
implementation "live.100ms:hls-player:${sdkVersions["android"]}"
implementation "com.github.100mslive:android-sdk:2.9.6"
implementation "com.github.100mslive:video-view:2.9.6"
implementation "com.github.100mslive:hls-player:2.9.6"
implementation "com.github.100mslive:hms-noise-cancellation-android:2.9.6"

// implementation "live.100ms:android-sdk:${sdkVersions["android"]}"
// implementation "live.100ms:video-view:${sdkVersions["android"]}"
// implementation "live.100ms:hls-player:${sdkVersions["android"]}"
// implementation "live.100ms:hms-noise-cancellation-android:${sdkVersions["android"]}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@ object HMSDecoder {
hmsPeer.auxiliaryTracks.let {
peer.putArray("auxiliaryTracks", this.getAllTracks(it))
}

peer.putString("type", hmsPeer.type.name)
}
return peer
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,21 @@ object HMSHelper {
val initialState = getHMSTrackSettingsInitState(data.getString("initialState"))
builder.initialState(initialState)
}

if (areAllRequiredKeysAvailable(data, arrayOf(Pair("noiseCancellationPlugin", "Map")))) {
val plugin = data.getMap("noiseCancellationPlugin")

/**
* ***** Plugin Signature *****
* {
* modelName: "SMALL_FULL_BAND"
* initialState: "ENABLED" | "DISABLED"
* }
*/
val initialState = plugin?.getString("initialState") ?: "DISABLED"
builder.enableNoiseCancellation(initialState == "ENABLED")
}

return builder.build()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import android.content.pm.PackageManager
import android.content.res.Configuration
import android.os.Build
import android.os.Bundle
import android.util.Log
import android.util.Rational
import android.view.WindowManager
import androidx.annotation.RequiresApi
Expand All @@ -19,6 +20,7 @@ import com.facebook.react.module.annotations.ReactModule
import com.facebook.react.modules.core.DeviceEventManagerModule
import com.reactnativehmssdk.HMSManager.Companion.REACT_CLASS
import live.hms.video.error.HMSException
import live.hms.video.factories.noisecancellation.AvailabilityStatus
import java.util.UUID

@ReactModule(name = REACT_CLASS)
Expand Down Expand Up @@ -1456,6 +1458,117 @@ class HMSManager(reactContext: ReactApplicationContext) :
}
// endregion

// region Noise Cancellation Plugin
@ReactMethod
fun enableNoiseCancellationPlugin(
data: ReadableMap,
promise: Promise?,
) {
val rnSDK =
HMSHelper.getHms(data, hmsCollection) ?: run {
promise?.reject(
"6004",
"RN HMS SDK not initialized",
)
return
}
val hmsSdk =
rnSDK.hmsSDK ?: run {
promise?.reject(
"6004",
"HMS SDK not initialized",
)
return
}
hmsSdk.setNoiseCancellationEnabled(true)
promise?.resolve(true)
}

@ReactMethod
fun disableNoiseCancellationPlugin(
data: ReadableMap,
promise: Promise?,
) {
val rnSDK =
HMSHelper.getHms(data, hmsCollection) ?: run {
promise?.reject(
"6004",
"RN HMS SDK not initialized",
)
return
}
val hmsSdk =
rnSDK.hmsSDK ?: run {
promise?.reject(
"6004",
"HMS SDK not initialized",
)
return
}
hmsSdk.setNoiseCancellationEnabled(false)
promise?.resolve(true)
}

@ReactMethod
fun isNoiseCancellationPluginEnabled(
data: ReadableMap,
promise: Promise?,
) {
val rnSDK =
HMSHelper.getHms(data, hmsCollection) ?: run {
promise?.reject(
"6004",
"RN HMS SDK not initialized",
)
return
}
val hmsSdk =
rnSDK.hmsSDK ?: run {
promise?.reject(
"6004",
"HMS SDK not initialized",
)
return
}
val isEnabled = hmsSdk.getNoiseCancellationEnabled()
promise?.resolve(isEnabled)
}

@ReactMethod
fun isNoiseCancellationPluginAvailable(
data: ReadableMap,
promise: Promise?,
) {
val rnSDK =
HMSHelper.getHms(data, hmsCollection) ?: run {
promise?.reject(
"6004",
"RN HMS SDK not initialized",
)
return
}
val hmsSdk =
rnSDK.hmsSDK ?: run {
promise?.reject(
"6004",
"HMS SDK not initialized",
)
return
}

val availability: AvailabilityStatus = hmsSdk.isNoiseCancellationAvailable()
val isAvailable =
if (availability == AvailabilityStatus.Available) {
true
} else {
val reason = (availability as AvailabilityStatus.NotAvailable).reason
Log.d("HMSManager", "NoiseCancellation Not available because of $reason")
false
}
promise?.resolve(isAvailable)
}
// endregion

// region ActivityLifecycleCallbacks

override fun onActivityCreated(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1847,6 +1847,9 @@ class HMSRNSDK(
"isLocal" -> {
result.putBoolean("isLocal", peer.isLocal)
}
"type" -> {
result.putString("type", peer.type.name)
}
"networkQuality" -> {
if (peer.networkQuality !== null) {
result.putMap("networkQuality", HMSDecoder.getHmsNetworkQuality(peer.networkQuality))
Expand Down
16 changes: 8 additions & 8 deletions packages/react-native-hms/example/android/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.896.0)
aws-sdk-core (3.191.3)
aws-partitions (1.904.0)
aws-sdk-core (3.191.5)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.77.0)
aws-sdk-kms (1.78.0)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.143.0)
aws-sdk-s3 (1.146.1)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.8)
Expand All @@ -38,7 +38,7 @@ GEM
domain_name (0.6.20240107)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.109.0)
excon (0.110.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
Expand Down Expand Up @@ -112,9 +112,9 @@ GEM
google-apis-firebaseappdistribution_v1 (~> 0.3.0)
google-apis-firebaseappdistribution_v1alpha (~> 0.2.0)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.58.0)
google-apis-androidpublisher_v3 (0.60.0)
google-apis-core (>= 0.14.0, < 2.a)
google-apis-core (0.14.0)
google-apis-core (0.14.1)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 1.9)
httpclient (>= 2.8.1, < 3.a)
Expand All @@ -130,7 +130,7 @@ GEM
google-apis-core (>= 0.14.0, < 2.a)
google-apis-playcustomapp_v1 (0.15.0)
google-apis-core (>= 0.14.0, < 2.a)
google-apis-storage_v1 (0.35.0)
google-apis-storage_v1 (0.37.0)
google-apis-core (>= 0.14.0, < 2.a)
google-cloud-core (1.7.0)
google-cloud-env (>= 1.0, < 3.a)
Expand Down
16 changes: 8 additions & 8 deletions packages/react-native-hms/example/ios/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.896.0)
aws-sdk-core (3.191.3)
aws-partitions (1.904.0)
aws-sdk-core (3.191.5)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.77.0)
aws-sdk-kms (1.78.0)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.143.0)
aws-sdk-s3 (1.146.1)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.8)
Expand All @@ -38,7 +38,7 @@ GEM
domain_name (0.6.20240107)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.109.0)
excon (0.110.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
Expand Down Expand Up @@ -109,9 +109,9 @@ GEM
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.58.0)
google-apis-androidpublisher_v3 (0.60.0)
google-apis-core (>= 0.14.0, < 2.a)
google-apis-core (0.14.0)
google-apis-core (0.14.1)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 1.9)
httpclient (>= 2.8.1, < 3.a)
Expand All @@ -123,7 +123,7 @@ GEM
google-apis-core (>= 0.14.0, < 2.a)
google-apis-playcustomapp_v1 (0.15.0)
google-apis-core (>= 0.14.0, < 2.a)
google-apis-storage_v1 (0.35.0)
google-apis-storage_v1 (0.37.0)
google-apis-core (>= 0.14.0, < 2.a)
google-cloud-core (1.7.0)
google-cloud-env (>= 1.0, < 3.a)
Expand Down
Loading
Loading