Skip to content

Commit

Permalink
Release 1.10.9: Develop to main (#1413)
Browse files Browse the repository at this point in the history
# Description

- Release 1.10.9: Develop to main

### Pre-launch Checklist

- [x] The [Documentation] is updated accordingly, or this PR doesn't
require it.
- [x] I have updated the `ExampleAppChangelog.txt` file with relevant
changes.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I added new tests to check the change I am making, or this PR is
test-exempt.
- [x] All existing and new tests are passing.

<!-- Links -->

[Documentation]: https://www.100ms.live/docs
  • Loading branch information
ygit authored Jul 31, 2024
2 parents 55c5af3 + 7e1b27a commit 430815f
Show file tree
Hide file tree
Showing 98 changed files with 10,651 additions and 9,659 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 11
- name: Set up JDK 15
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 11.x
java-version: 15.x

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18

- name: Install dependencies
run: |
Expand Down Expand Up @@ -84,16 +84,16 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 11
- name: Set up JDK 15
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 11.x
java-version: 15.x

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18

- name: Setup Ruby
uses: ruby/setup-ruby@v1
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,16 @@ xcuserdata
DerivedData
*.hmap
*.ipa
*/ios/.xcode.env.local
*.xcuserstate
project.xcworkspace

.cxx/

# Ruby / CocoaPods
**/ios/Pods/
**/vendor/bundle/

# Android/IJ
.idea
.gradle
Expand Down
13 changes: 6 additions & 7 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,20 @@ cli:
plugins:
sources:
- id: trunk
ref: v1.6.0
ref: v1.6.1
uri: https://github.com/trunk-io/plugins
lint:
disabled:
- osv-scanner
enabled:
- [email protected]
- [email protected]
- [email protected]
- [email protected].2
- [email protected].3
- [email protected]
- [email protected].176
- trivy@0.52.2
- trufflehog@3.79.0
- [email protected].1
- [email protected].213
- trivy@0.53.0
- trufflehog@3.80.3
- [email protected].2
- [email protected]
- [email protected]
- [email protected]
Expand Down
11 changes: 6 additions & 5 deletions packages/react-native-hms/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<a href="https://100ms.live/">
<img src="https://raw.githubusercontent.com/100mslive/react-native-hms/main/100ms.svg" title="100ms logo" float=center height=256>
<img src="https://raw.githubusercontent.com/100mslive/react-native-hms/main/100ms.svg" title="100ms logo" float=center height=256 alt="100ms logo">
</a>

[![npm](https://img.shields.io/npm/v/@100mslive/react-native-hms)](https://www.npmjs.com/package/@100mslive/react-native-hms)
Expand All @@ -22,10 +22,11 @@ With support for HLS and RTMP Live Streaming and Recording, Picture-in-Picture (

📖 Read the Complete Documentation here: https://www.100ms.live/docs/react-native/v2/foundation/basics

| Package | Version |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| @100mslive/react-native-room-kit | [![npm](https://img.shields.io/npm/v/@100mslive/react-native-room-kit)](https://www.npmjs.com/package/@100mslive/react-native-room-kit) |
| @100mslive/react-native-hms | [![npm](https://img.shields.io/npm/v/@100mslive/react-native-hms)](https://www.npmjs.com/package/@100mslive/react-native-hms) |
| Package | Version |
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| @100mslive/react-native-room-kit | [![npm](https://img.shields.io/npm/v/@100mslive/react-native-room-kit)](https://www.npmjs.com/package/@100mslive/react-native-room-kit) |
| @100mslive/react-native-hms | [![npm](https://img.shields.io/npm/v/@100mslive/react-native-hms)](https://www.npmjs.com/package/@100mslive/react-native-hms) |
| @100mslive/react-native-video-plugin | [![npm](https://img.shields.io/npm/v/@100mslive/react-native-video-plugin)](https://www.npmjs.com/package/@100mslive/react-native-video-plugin) |

## 🏃 Example App

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ class HMSManager(
activity.setPictureInPictureParams(pipParams)
return true
} catch (e: Exception) {
throw e
return false
}
}

Expand Down Expand Up @@ -1128,7 +1128,7 @@ class HMSManager(

return activity.enterPictureInPictureMode(pipParams)
} catch (e: Exception) {
throw e
return false
}
}

Expand Down Expand Up @@ -1646,6 +1646,23 @@ class HMSManager(
}
// endregion

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

// region Warning on JS side
@ReactMethod
fun addListener(eventName: String) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ class HMSRNSDK(
}
}

if (data?.hasKey("haltPreviewJoinForPermissionsRequest") == true) {
val halt = data?.getBoolean("haltPreviewJoinForPermissionsRequest")
if (halt != null) {
builder.haltPreviewJoinForPermissionsRequest(halt)
}
}

this.hmsSDK = builder.build()

hmsSDK?.let {
Expand Down Expand Up @@ -286,6 +293,17 @@ class HMSRNSDK(
data.putArray("removedPeers", removedPeersArray)
delegate.emitEvent("ON_PEER_LIST_UPDATED", data)
}

override fun onPermissionsRequested(permissions: List<String>) {
if (eventsEnableStatus["ON_PERMISSIONS_REQUESTED"] != true) {
return
}
val data: WritableMap = Arguments.createMap()

data.putArray("permissions", Arguments.fromList(permissions))
data.putString("id", id)
delegate.emitEvent("ON_PERMISSIONS_REQUESTED", data)
}
},
)
} else {
Expand Down Expand Up @@ -557,6 +575,17 @@ class HMSRNSDK(
data.putString("id", id)
delegate.emitEvent("ON_TRANSCRIPTS", data)
}

override fun onPermissionsRequested(permissions: List<String>) {
if (eventsEnableStatus["ON_PERMISSIONS_REQUESTED"] != true) {
return
}
val data: WritableMap = Arguments.createMap()

data.putArray("permissions", Arguments.fromList(permissions))
data.putString("id", id)
delegate.emitEvent("ON_PERMISSIONS_REQUESTED", data)
}
},
)

Expand Down Expand Up @@ -1440,6 +1469,7 @@ class HMSRNSDK(

if (audioTrackId == trackId) {
peer.audioTrack?.setVolume(volume)
callback?.resolve(null)
return
}

Expand All @@ -1449,6 +1479,7 @@ class HMSRNSDK(

if (trackExtracted != null) {
trackExtracted.setVolume(volume)
callback?.resolve(null)
return
}
}
Expand Down Expand Up @@ -1721,7 +1752,7 @@ class HMSRNSDK(
val audioDevice = data.getString("audioDevice")
hmsSDK?.let {
it.switchAudioOutput(HMSHelper.getAudioDevice(audioDevice))
callback?.resolve(true)
callback?.resolve(null)
}
} else {
val errorMessage = "switchAudioOutput: $requiredKeys"
Expand Down Expand Up @@ -1807,7 +1838,7 @@ class HMSRNSDK(
override fun onSuccess() {
isAudioSharing = false
audioshareCallback = null
callback?.resolve(getPromiseResolveData())
callback?.resolve(true)
}
},
)
Expand All @@ -1825,7 +1856,7 @@ class HMSRNSDK(
val mode = HMSHelper.getAudioMixingMode(data.getString("audioMixingMode"))
audioMixingMode = mode
hmsSDK?.setAudioMixingMode(mode)
callback?.resolve(getPromiseResolveData())
callback?.resolve(true)
} else {
val errorMessage = "setAudioMixingMode: $requiredKeys"
rejectCallback(callback, errorMessage)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import android.content.Intent
import android.content.IntentFilter
import android.os.Build
import androidx.annotation.RequiresApi
import androidx.core.content.ContextCompat
import androidx.core.content.ContextCompat.RECEIVER_NOT_EXPORTED

data class PIPAction(
val title: String,
Expand Down Expand Up @@ -62,7 +64,7 @@ class PipActionReceiver(

IntentFilter().also {
it.addAction(PIP_INTENT_ACTION)
activity.registerReceiver(this, it)
ContextCompat.registerReceiver(activity, this, it, RECEIVER_NOT_EXPORTED)
}
registered = true
}
Expand Down
22 changes: 11 additions & 11 deletions packages/react-native-hms/example/android/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.949.0)
aws-sdk-core (3.200.0)
aws-partitions (1.956.0)
aws-sdk-core (3.201.1)
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.87.0)
aws-sdk-core (~> 3, >= 3.199.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.155.0)
aws-sdk-core (~> 3, >= 3.199.0)
aws-sdk-kms (1.88.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.156.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.8)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.8.0)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
Expand All @@ -38,7 +38,7 @@ GEM
domain_name (0.6.20240107)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.110.0)
excon (0.111.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
Expand Down Expand Up @@ -162,7 +162,7 @@ GEM
json (2.7.2)
jwt (2.8.2)
base64
mini_magick (4.13.1)
mini_magick (4.13.2)
mini_mime (1.1.5)
multi_json (1.15.0)
multipart-post (2.4.1)
Expand Down Expand Up @@ -226,4 +226,4 @@ DEPENDENCIES
fastlane-plugin-firebase_app_distribution

BUNDLED WITH
2.5.9
2.5.15
22 changes: 11 additions & 11 deletions packages/react-native-hms/example/ios/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.949.0)
aws-sdk-core (3.200.0)
aws-partitions (1.956.0)
aws-sdk-core (3.201.1)
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.87.0)
aws-sdk-core (~> 3, >= 3.199.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.155.0)
aws-sdk-core (~> 3, >= 3.199.0)
aws-sdk-kms (1.88.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.156.0)
aws-sdk-core (~> 3, >= 3.201.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.8)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.8.0)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
Expand All @@ -38,7 +38,7 @@ GEM
domain_name (0.6.20240107)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.110.0)
excon (0.111.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
Expand Down Expand Up @@ -155,7 +155,7 @@ GEM
json (2.7.2)
jwt (2.8.2)
base64
mini_magick (4.13.1)
mini_magick (4.13.2)
mini_mime (1.1.5)
multi_json (1.15.0)
multipart-post (2.4.1)
Expand Down Expand Up @@ -218,4 +218,4 @@ DEPENDENCIES
fastlane

BUNDLED WITH
2.5.9
2.5.15
Loading

0 comments on commit 430815f

Please sign in to comment.