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.9.0: Develop to main #1240

Merged
merged 53 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
8c724d6
updated packages
ygit Sep 15, 2023
db272b8
updated package version
ygit Sep 15, 2023
0666fd4
Merge branch 'main' into develop
ygit Sep 18, 2023
2559449
released sample app version 2.3.73 (324) ⚛️
stanwolverine Sep 19, 2023
5953369
updated SDK versions
ygit Sep 19, 2023
bfd9520
Merge branch 'develop' into feature/addHandraiseAPIs
ygit Sep 19, 2023
0da0fa2
deleted nested `.gitignore` files
stanwolverine Sep 19, 2023
cc0a120
fastlane script run changes
stanwolverine Sep 19, 2023
16c23fb
sample apps changes
stanwolverine Sep 19, 2023
77b1931
Merge pull request #1225 from 100mslive/fastlane-working-changes
ygit Sep 19, 2023
aca2366
Merge branch 'develop' into feature/addHandraiseAPIs
ygit Sep 19, 2023
a4ab309
added android hand raise APIs
ygit Sep 19, 2023
4724a98
added isHandRaise options
ygit Sep 19, 2023
8b0b7ed
added hand raise APIs on JS
ygit Sep 19, 2023
b490a82
resolved lint warnings
ygit Sep 19, 2023
8a1ad35
Merge branch 'feature/addHandraiseAPIs' into feature/ios-hand-raise-f…
stanwolverine Sep 19, 2023
1abce97
feat(sdk): :sparkles: added raise hand first class apis on ios
stanwolverine Sep 20, 2023
11140b2
updated parsing
ygit Sep 20, 2023
f9b7808
feat(prebuilt): :sparkles: added 'hand raise' first class api usage i…
stanwolverine Sep 20, 2023
2b84463
Merge branch 'feature/addHandraiseAPIs' into feature/ios-hand-raise-f…
stanwolverine Sep 20, 2023
5ad9f18
resolved lint warnings
ygit Sep 20, 2023
3f679b0
upgraded `android sdk` version
stanwolverine Sep 20, 2023
b498098
released sample app version 2.3.73 (324) ⚛️
stanwolverine Sep 20, 2023
08dd4cf
release df app changes
stanwolverine Sep 20, 2023
d905c37
updated gems
ygit Sep 21, 2023
cda34c4
updated script
ygit Sep 21, 2023
66ff007
released sample app version 2.3.73 (324) ⚛️
ygit Sep 21, 2023
e999151
released sample app version 2.3.74 (325) ⚛️
ygit Sep 21, 2023
8ddb639
updated gradle
ygit Sep 21, 2023
162a28c
Merge pull request #1226 from 100mslive/feature/addHandraiseAPIs
ygit Sep 21, 2023
c294db7
Added GitHub actions (#1229)
ygit Sep 25, 2023
7b09eeb
Added support for peerListUpdated API (#1228)
ygit Oct 5, 2023
0d956ef
Feature/android auto enter pip support (#1231)
stanwolverine Oct 5, 2023
0c5efa3
Fix/light theme issues (#1233)
stanwolverine Oct 5, 2023
894b014
Fix-Prebuilt/change name feature for all (#1234)
stanwolverine Oct 5, 2023
b0e6fc1
Release 2.0.0 alpha prelease prep (#1236)
stanwolverine Oct 5, 2023
4cce1c7
Merge branch 'main' into develop
stanwolverine Oct 6, 2023
80bf914
Updated Browser Recording State (#1238)
ygit Oct 12, 2023
3a5e2de
Feat/peerlist iterator api changes in Prebuilt and sdk (#1237)
stanwolverine Oct 12, 2023
a2aa0ef
removed auto enter PIP mode
ygit Oct 12, 2023
a3f57c7
updated changelog
ygit Oct 12, 2023
cfbdeaf
released sample app version 2.3.85 (336) ⚛️
ygit Oct 12, 2023
85ea573
updated Changelog
ygit Oct 12, 2023
fe0692f
Feat/lower remote peer hand UI in prebuilt (#1239)
stanwolverine Oct 12, 2023
d6db944
released sample app version 2.3.86 (337) ⚛️
ygit Oct 12, 2023
e232ba1
Revert "Feat/lower remote peer hand UI in prebuilt (#1239)"
ygit Oct 12, 2023
5b2de7d
updated reanimated package declaration
ygit Oct 12, 2023
cdc5544
updated React Native screens version
ygit Oct 12, 2023
1bd53a3
added code docs for peerlist iterator apis
stanwolverine Oct 12, 2023
c3b7a10
removed console logs, unused variable and commented code
stanwolverine Oct 12, 2023
d0c7a28
updated github action
ygit Oct 12, 2023
b008d2f
released sample app version 2.3.87 (338) ⚛️
ygit Oct 12, 2023
61597d9
updated github action
ygit Oct 12, 2023
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
15 changes: 1 addition & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,11 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 12.x
java-version: 11.x
- uses: actions/checkout@v3
- name: Install dependencies
run: cd packages/react-native-room-kit/example/; npm install

- name: Cache Gradle Wrapper
uses: actions/cache@v2
with:
path: ~/packages/react-native-room-kit/example/android/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}

- name: Cache Gradle Dependencies
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-caches-
- name: Make Gradlew Executable
run: cd packages/react-native-room-kit/example/android && chmod +x ./gradlew

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ object HMSDecoder {
fun getHMSBrowserRecordingState(data: HMSBrowserRecordingState?): ReadableMap {
val input = Arguments.createMap()
if (data !== null) {
input.putBoolean("initialising", false)
input.putBoolean("initialising", data.initialising)

input.putBoolean("running", data.running)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import live.hms.video.media.settings.*
import live.hms.video.media.tracks.HMSRemoteAudioTrack
import live.hms.video.media.tracks.HMSRemoteVideoTrack
import live.hms.video.media.tracks.HMSTrack
import live.hms.video.sdk.HMSSDK
import live.hms.video.sdk.listeners.PeerListResultListener
import live.hms.video.sdk.models.*
import live.hms.video.sdk.models.enums.AudioMixingMode
import live.hms.video.sdk.models.role.HMSRole
Expand All @@ -28,6 +30,9 @@ import org.webrtc.SurfaceViewRenderer
import java.io.ByteArrayOutputStream
import java.util.*
import kotlin.collections.ArrayList
import kotlin.coroutines.resume
import kotlin.coroutines.resumeWithException
import kotlin.coroutines.suspendCoroutine

object HMSHelper {
fun areAllRequiredKeysAvailable(
Expand Down Expand Up @@ -106,14 +111,35 @@ object HMSHelper {
return null
}

fun getRemotePeerFromPeerId(
suspend fun getRemotePeerFromPeerId(
peerId: String?,
room: HMSRoom?,
hmsSDK: HMSSDK?,
): HMSRemotePeer? {
if (peerId != null && room != null) {
return HmsUtilities.getPeer(peerId, room) as? HMSRemotePeer
return suspendCoroutine {
val room = hmsSDK?.getRoom()

if (peerId != null && room != null) {
val peerFromRoom = HmsUtilities.getPeer(peerId, room) as? HMSRemotePeer
if (peerFromRoom != null) {
it.resume(peerFromRoom)
} else {
val limit = 1
val peerIds = arrayListOf(peerId)
val peerListIterator = hmsSDK.getPeerListIterator(PeerListIteratorOptions(limit = limit, byPeerIds = peerIds))
peerListIterator.next(object : PeerListResultListener {
override fun onError(error: HMSException) {
it.resumeWithException(error)
}
override fun onSuccess(result: ArrayList<HMSPeer>) {
val peerFromIterator = result[0]
it.resume(peerFromIterator as? HMSRemotePeer)
}
})
}
} else {
it.resume(null)
}
}
return null
}

fun getRolesFromRoleNames(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class HMSRNSDK(
private var eventsEnableStatus = mutableMapOf<String, Boolean>()
private var sessionStore: HmsSessionStore? = null
private val keyChangeObservers = mutableMapOf<String, HMSKeyChangeListener?>()
private val peerListIterators = mutableMapOf<Int, PeerListIterator>()
private val peerListIterators = mutableMapOf<String, PeerListIterator>()

init {
val builder = HMSSDK.Builder(reactApplicationContext)
Expand Down Expand Up @@ -1114,30 +1114,31 @@ class HMSRNSDK(
arrayOf(Pair("peerId", "String"), Pair("reason", "String")),
)
if (requiredKeys === null) {
val peerId = data.getString("peerId")
val peer = HMSHelper.getRemotePeerFromPeerId(peerId, hmsSDK?.getRoom())
HMSCoroutineScope.launch {
val peerId = data.getString("peerId")

if (peer != null) {
hmsSDK?.removePeerRequest(
peer,
data.getString("reason") as String,
object : HMSActionResultListener {
override fun onSuccess() {
callback?.resolve(emitHMSSuccess())
}
val peer = HMSHelper.getRemotePeerFromPeerId(peerId, hmsSDK)

override fun onError(error: HMSException) {
callback?.reject(error.code.toString(), error.message)
}
},
)
} else {
self.emitCustomError("PEER_NOT_FOUND")
callback?.reject("101", "PEER_NOT_FOUND")
if (peer != null) {
hmsSDK?.removePeerRequest(
peer,
data.getString("reason") as String,
object : HMSActionResultListener {
override fun onSuccess() {
callback?.resolve(emitHMSSuccess())
}

override fun onError(error: HMSException) {
callback?.reject(error.code.toString(), error.message)
}
},
)
} else {
callback?.reject("101", "PEER_NOT_FOUND")
}
}
} else {
val errorMessage = "removePeer: $requiredKeys"
self.emitRequiredKeysError(errorMessage)
rejectCallback(callback, errorMessage)
}
}
Expand Down Expand Up @@ -1281,13 +1282,10 @@ class HMSRNSDK(
val requiredKeys = HMSHelper.getUnavailableRequiredKey(data, arrayOf(Pair("mute", "Boolean")))
if (requiredKeys === null) {
val mute = data.getBoolean("mute")
val peers = hmsSDK?.getRemotePeers()
if (peers != null) {
for (remotePeer in peers) {
val peerId = remotePeer.peerID
val peer = HMSHelper.getRemotePeerFromPeerId(peerId, hmsSDK?.getRoom())
peer?.audioTrack?.isPlaybackAllowed = !mute
}
val remotePeers = hmsSDK?.getRemotePeers()

remotePeers?.forEach() {
it.audioTrack?.isPlaybackAllowed = !mute
}
} else {
val errorMessage = "setPlaybackForAllAudio: $requiredKeys"
Expand Down Expand Up @@ -2433,7 +2431,12 @@ class HMSRNSDK(
}

fun getPeerListIterator(data: ReadableMap): WritableMap? {
val uniqueId = data.getInt("uniqueId")
val uniqueId = data.getString("uniqueId")
if (uniqueId == null) {
print("Error in getPeerListIterator: uniqueId is not available")
return null
}

val options = HMSHelper.getPeerListIteratorOptions(data)

hmsSDK?.let {
Expand All @@ -2442,7 +2445,7 @@ class HMSRNSDK(
peerListIterators[uniqueId] = iterator
val map = Arguments.createMap()
map.putBoolean("success", true)
map.putInt("uniqueId", uniqueId)
map.putString("uniqueId", uniqueId)
return map
}
print("Error in getPeerListIterator: HMS SDK is not available")
Expand All @@ -2453,7 +2456,7 @@ class HMSRNSDK(
data: ReadableMap,
promise: Promise?,
) {
val uniqueId = data.getInt("uniqueId")
val uniqueId = data.getString("uniqueId")

peerListIterators[uniqueId]?.let {
promise?.resolve(it.hasNext())
Expand All @@ -2466,7 +2469,7 @@ class HMSRNSDK(
data: ReadableMap,
promise: Promise?,
) {
val uniqueId = data.getInt("uniqueId")
val uniqueId = data.getString("uniqueId")

val peerListIterator = peerListIterators[uniqueId]

Expand All @@ -2482,12 +2485,19 @@ class HMSRNSDK(
}

override fun onSuccess(result: ArrayList<HMSPeer>) {
val array = Arguments.createArray()
val resultData: WritableMap = Arguments.createMap()

resultData.putInt("totalCount", peerListIterator.totalCount)

val array: WritableArray = Arguments.createArray()
for (peer in result) {
val hmsPeer = HMSDecoder.getHmsPeerSubset(peer, null)
val hmsPeer = HMSDecoder.getHmsPeer(peer)
array.pushMap(hmsPeer)
}
promise?.resolve(array)

resultData.putArray("peers", array)

promise?.resolve(resultData)
}
},
)
Expand Down
29 changes: 22 additions & 7 deletions packages/react-native-hms/example/ExampleAppChangelog.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
Board: https://github.com/100mslive/react-native-hms/projects/17
# DEPRECATED
Board: https://100ms.atlassian.net/jira/software/projects/RN/boards/33

- Restored original example app of `@100mslive/react-native-hms` package
- Add Large Rooms Participants List UI
https://100ms.atlassian.net/browse/RN-106

https://github.com/100mslive/react-native-hms/issues/1058
- Add Light Theme Support on Prebuilt
https://100ms.atlassian.net/browse/RN-105

Branch: `prebuilt-hls-viewer-role-layout-changes` (commit hash: 9e1e1e97...)
- Recording Icon changes to show the recording states
https://100ms.atlassian.net/browse/RN-104

React Native SDK: 2.0.0
Android SDK: 2.6.7
iOS SDK: 0.9.5
- Added support for using react-native-animated library version 3.x.x

Known Issues:

- Not getting `PEER_LEFT` update even for broadcaster, only getting `ON_PEER_LIST_UPDATED` event
https://100ms.atlassian.net/browse/AN-1107

- Not getting Peer obejct in `peerListIterator` next call, while using peerID as filter
https://100ms.atlassian.net/browse/IOS-764

Room Kit: 1.0.1
React Native SDK: 1.9.0
Android SDK: 2.7.7
iOS SDK: 1.1.0
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 @@ -8,16 +8,16 @@ GEM
artifactory (3.0.15)
atomos (0.1.3)
aws-eventstream (1.2.0)
aws-partitions (1.824.0)
aws-sdk-core (3.181.1)
aws-partitions (1.834.0)
aws-sdk-core (3.185.1)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.71.0)
aws-sdk-core (~> 3, >= 3.177.0)
aws-sdk-kms (1.72.0)
aws-sdk-core (~> 3, >= 3.184.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.134.0)
aws-sdk-s3 (1.136.0)
aws-sdk-core (~> 3, >= 3.181.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.6)
Expand All @@ -36,7 +36,7 @@ GEM
unf (>= 0.0.5, < 1.0.0)
dotenv (2.8.1)
emoji_regex (3.2.3)
excon (0.103.0)
excon (0.104.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
Expand Down Expand Up @@ -66,7 +66,7 @@ GEM
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.2.7)
fastlane (2.215.1)
fastlane (2.216.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
Expand Down Expand Up @@ -107,7 +107,7 @@ GEM
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.49.0)
google-apis-androidpublisher_v3 (0.50.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-core (0.11.1)
addressable (~> 2.5, >= 2.5.1)
Expand Down Expand Up @@ -138,7 +138,7 @@ GEM
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
googleauth (1.8.0)
googleauth (1.8.1)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
multi_json (~> 1.11)
Expand Down Expand Up @@ -192,10 +192,10 @@ GEM
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (2.4.2)
unicode-display_width (2.5.0)
webrick (1.8.1)
word_wrap (1.0.0)
xcodeproj (1.22.0)
xcodeproj (1.23.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
Expand Down
Loading
Loading