@fishjam-cloud/react-native-client 0.14.0 → 0.15.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/ios/RNFishjamClient.swift +11 -19
- package/ios/RNFishjamProxy.swift +12 -0
- package/package.json +2 -2
|
@@ -386,6 +386,7 @@ class RNFishjamClient: FishjamClientListener {
|
|
|
386
386
|
func toggleScreenShare(screenShareOptions: ScreenShareOptions) throws {
|
|
387
387
|
try ensureCreated()
|
|
388
388
|
try ensureConnected()
|
|
389
|
+
|
|
389
390
|
guard isAppScreenShareOn == false else {
|
|
390
391
|
emit(event: .warning(message: "Screensharing screen not available during screensharing app."))
|
|
391
392
|
return
|
|
@@ -536,30 +537,13 @@ class RNFishjamClient: FishjamClientListener {
|
|
|
536
537
|
"vadStatus": track.vadStatus == .speech ? "speech" : "silence",
|
|
537
538
|
]
|
|
538
539
|
|
|
539
|
-
case let track as
|
|
540
|
-
return [
|
|
541
|
-
"id": track.id,
|
|
542
|
-
"type": "Video",
|
|
543
|
-
"metadata": track.metadata.toDict(),
|
|
544
|
-
"aspectRatio": track.dimensions?.aspectRatio,
|
|
545
|
-
]
|
|
546
|
-
|
|
547
|
-
case let track as LocalBroadcastScreenShareTrack:
|
|
540
|
+
case let track as LocalVideoTrack:
|
|
548
541
|
return [
|
|
549
542
|
"id": track.id,
|
|
550
543
|
"type": "Video",
|
|
551
544
|
"metadata": track.metadata.toDict(),
|
|
552
545
|
"aspectRatio": track.dimensions?.aspectRatio,
|
|
553
546
|
]
|
|
554
|
-
|
|
555
|
-
case let track as LocalAppScreenShareTrack:
|
|
556
|
-
return [
|
|
557
|
-
"id": track.id,
|
|
558
|
-
"type": "Video",
|
|
559
|
-
"metadata": track.metadata.toDict(),
|
|
560
|
-
"aspectRatio": track.dimensions?.aspectRatio,
|
|
561
|
-
]
|
|
562
|
-
|
|
563
547
|
case let track as LocalAudioTrack:
|
|
564
548
|
return [
|
|
565
549
|
"id": track.id,
|
|
@@ -804,7 +788,8 @@ class RNFishjamClient: FishjamClientListener {
|
|
|
804
788
|
}
|
|
805
789
|
|
|
806
790
|
func onJoinError(metadata: Any) {
|
|
807
|
-
|
|
791
|
+
let reason = (metadata as? [String: Any])?["reason"] as? String ?? "Unknown error"
|
|
792
|
+
connectPromise?.reject("E_MEMBRANE_CONNECT", "Failed to join room, reason: \(reason)")
|
|
808
793
|
connectPromise = nil
|
|
809
794
|
}
|
|
810
795
|
|
|
@@ -937,6 +922,13 @@ class RNFishjamClient: FishjamClientListener {
|
|
|
937
922
|
))
|
|
938
923
|
}
|
|
939
924
|
|
|
925
|
+
static func add(customSource: CustomSource) async throws {
|
|
926
|
+
try await fishjamClient?.create(customSource: customSource)
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
static func remove(customSource: CustomSource) {
|
|
930
|
+
fishjamClient?.remove(customSource: customSource)
|
|
931
|
+
}
|
|
940
932
|
}
|
|
941
933
|
|
|
942
934
|
extension RNFishjamClient: CameraCapturerDeviceChangedListener {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import FishjamCloudClient
|
|
2
|
+
import Foundation
|
|
3
|
+
|
|
4
|
+
public class RNFishjamProxy {
|
|
5
|
+
static public func add(customSource: CustomSource) async throws {
|
|
6
|
+
try await RNFishjamClient.add(customSource: customSource)
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
static public func remove(customSource: CustomSource) {
|
|
10
|
+
RNFishjamClient.remove(customSource: customSource)
|
|
11
|
+
}
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fishjam-cloud/react-native-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "A React Native client for Fishjam",
|
|
5
5
|
"author": "Fishjam Team",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"pod-install": "^0.3.4",
|
|
60
60
|
"react-dom": "^18.3.1",
|
|
61
61
|
"ts-proto": "^2.6.1",
|
|
62
|
-
"typedoc": "^0.
|
|
62
|
+
"typedoc": "^0.28.1",
|
|
63
63
|
"typedoc-plugin-mark-react-functional-components": "^0.2.2",
|
|
64
64
|
"typescript": "^5.8.2"
|
|
65
65
|
},
|