@fishjam-cloud/react-native-client 0.14.0 → 0.14.1

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.
@@ -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 LocalCameraTrack:
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,
@@ -937,6 +921,13 @@ class RNFishjamClient: FishjamClientListener {
937
921
  ))
938
922
  }
939
923
 
924
+ static func add(customSource: CustomSource) async throws {
925
+ try await fishjamClient?.create(customSource: customSource)
926
+ }
927
+
928
+ static func remove(customSource: CustomSource) {
929
+ fishjamClient?.remove(customSource: customSource)
930
+ }
940
931
  }
941
932
 
942
933
  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.14.0",
3
+ "version": "0.14.1",
4
4
  "description": "A React Native client for Fishjam",
5
5
  "author": "Fishjam Team",
6
6
  "license": "Apache-2.0",