diff --git a/packages/client/CHANGELOG.md b/packages/client/CHANGELOG.md index c8bfcd8c55..4a0622dd3a 100644 --- a/packages/client/CHANGELOG.md +++ b/packages/client/CHANGELOG.md @@ -2,6 +2,13 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). +## [1.10.3](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.10.2...@stream-io/video-client-1.10.3) (2024-11-05) + + +### Bug Fixes + +* camera flip did not work in react-native ([#1554](https://github.com/GetStream/stream-video-js/issues/1554)) ([423890c](https://github.com/GetStream/stream-video-js/commit/423890cb2d1925366d8a63c29f93c4c92c8104ad)), closes [#1521](https://github.com/GetStream/stream-video-js/issues/1521) + ## [1.10.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.10.1...@stream-io/video-client-1.10.2) (2024-11-01) diff --git a/packages/client/docusaurus/docs/javascript/02-guides/03-call-and-participant-state.mdx b/packages/client/docusaurus/docs/javascript/02-guides/03-call-and-participant-state.mdx index d65bc4d41c..bb90aa19ee 100644 --- a/packages/client/docusaurus/docs/javascript/02-guides/03-call-and-participant-state.mdx +++ b/packages/client/docusaurus/docs/javascript/02-guides/03-call-and-participant-state.mdx @@ -153,6 +153,8 @@ const subscription = call.state.participants$.subscribe((participants) => { subscription.unsubscribe(); ``` +In a call with many participants, the value of the `participants$` call state observable is truncated to 250 participants. The participants who are publishing video, audio, or screen sharing have priority over the other participants in the list. This means, for example, that in a livestream with one host and many viewers, the host is guaranteed to be in the list. + ## Client state The client state can be accessed by `client.state`. diff --git a/packages/client/package.json b/packages/client/package.json index 21b41b8dbc..62c2802418 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@stream-io/video-client", - "version": "1.10.2", + "version": "1.10.3", "packageManager": "yarn@3.2.4", "main": "dist/index.cjs.js", "module": "dist/index.es.js", diff --git a/packages/client/src/devices/CameraManager.ts b/packages/client/src/devices/CameraManager.ts index 3cbf3df768..fc63d9974b 100644 --- a/packages/client/src/devices/CameraManager.ts +++ b/packages/client/src/devices/CameraManager.ts @@ -6,6 +6,7 @@ import { getVideoDevices, getVideoStream } from './devices'; import { TrackType } from '../gen/video/sfu/models/models'; import { PreferredCodec } from '../types'; import { isMobile } from '../compatibility'; +import { isReactNative } from '../helpers/platforms'; export class CameraManager extends InputMediaDeviceManager { private targetResolution = { @@ -22,13 +23,17 @@ export class CameraManager extends InputMediaDeviceManager { super(call, new CameraManagerState(), TrackType.VIDEO); } + private isDirectionSupportedByDevice() { + return isReactNative() || isMobile(); + } + /** * Select the camera direction. * * @param direction the direction of the camera to select. */ async selectDirection(direction: Exclude) { - if (isMobile()) { + if (this.isDirectionSupportedByDevice()) { this.state.setDirection(direction); // Providing both device id and direction doesn't work, so we deselect the device this.state.setDevice(undefined); @@ -102,7 +107,12 @@ export class CameraManager extends InputMediaDeviceManager { constraints.height = this.targetResolution.height; // We can't set both device id and facing mode // Device id has higher priority - if (!constraints.deviceId && this.state.direction && isMobile()) { + + if ( + !constraints.deviceId && + this.state.direction && + this.isDirectionSupportedByDevice() + ) { constraints.facingMode = this.state.direction === 'front' ? 'user' : 'environment'; } diff --git a/packages/client/src/devices/__tests__/CameraManager.test.ts b/packages/client/src/devices/__tests__/CameraManager.test.ts index e432ba6305..ecf8a13c13 100644 --- a/packages/client/src/devices/__tests__/CameraManager.test.ts +++ b/packages/client/src/devices/__tests__/CameraManager.test.ts @@ -43,6 +43,13 @@ vi.mock('../../compatibility.ts', () => { }; }); +vi.mock('../../helpers/platforms', () => { + console.log('MOCKING mobile device'); + return { + isReactNative: () => false, + }; +}); + describe('CameraManager', () => { let manager: CameraManager; diff --git a/packages/react-bindings/CHANGELOG.md b/packages/react-bindings/CHANGELOG.md index f99983eda7..74987cebe5 100644 --- a/packages/react-bindings/CHANGELOG.md +++ b/packages/react-bindings/CHANGELOG.md @@ -2,6 +2,11 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). +## [1.1.14](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-bindings-1.1.13...@stream-io/video-react-bindings-1.1.14) (2024-11-05) + +### Dependency Updates + +* `@stream-io/video-client` updated to version `1.10.3` ## [1.1.13](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-bindings-1.1.12...@stream-io/video-react-bindings-1.1.13) (2024-11-01) diff --git a/packages/react-bindings/package.json b/packages/react-bindings/package.json index bc3973f570..186dce2fb8 100644 --- a/packages/react-bindings/package.json +++ b/packages/react-bindings/package.json @@ -1,6 +1,6 @@ { "name": "@stream-io/video-react-bindings", - "version": "1.1.13", + "version": "1.1.14", "packageManager": "yarn@3.2.4", "main": "./dist/index.cjs.js", "module": "./dist/index.es.js", diff --git a/packages/react-native-sdk/CHANGELOG.md b/packages/react-native-sdk/CHANGELOG.md index 29ef58176e..33baa3873d 100644 --- a/packages/react-native-sdk/CHANGELOG.md +++ b/packages/react-native-sdk/CHANGELOG.md @@ -2,6 +2,19 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). +## [1.2.12](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-1.2.11...@stream-io/video-react-native-sdk-1.2.12) (2024-11-05) + +### Dependency Updates + +* `@stream-io/video-client` updated to version `1.10.3` +* `@stream-io/video-react-bindings` updated to version `1.1.14` +## [1.2.11](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-1.2.10...@stream-io/video-react-native-sdk-1.2.11) (2024-11-04) + + +### Bug Fixes + +* share screen for alone participant on spotlight layout ([#1553](https://github.com/GetStream/stream-video-js/issues/1553)) ([660056a](https://github.com/GetStream/stream-video-js/commit/660056af56d7f2b9d09b5a834a8eb4b9cba48fba)) + ## [1.2.10](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-native-sdk-1.2.9...@stream-io/video-react-native-sdk-1.2.10) (2024-11-01) ### Dependency Updates diff --git a/packages/react-native-sdk/docusaurus/docs/reactnative/03-core/03-call-and-participant-state.mdx b/packages/react-native-sdk/docusaurus/docs/reactnative/03-core/03-call-and-participant-state.mdx index d7595c6041..57c4884c10 100644 --- a/packages/react-native-sdk/docusaurus/docs/reactnative/03-core/03-call-and-participant-state.mdx +++ b/packages/react-native-sdk/docusaurus/docs/reactnative/03-core/03-call-and-participant-state.mdx @@ -211,6 +211,8 @@ const videoParticipants = participants.filter( ); ``` +In a call with many participants, the list returned by the `useParticipants` call state hook is truncated to 250 participants. The participants who are publishing video, audio, or screen sharing have priority over the other participants in the list. This means, for example, that in a livestream with one host and many viewers, the host is guaranteed to be in the list. + ## Client state To observe client state you need to provide a `StreamVideoClient` instance to the `StreamVideo` context provider. diff --git a/packages/react-native-sdk/package.json b/packages/react-native-sdk/package.json index fa3526e34c..2acae63ee7 100644 --- a/packages/react-native-sdk/package.json +++ b/packages/react-native-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@stream-io/video-react-native-sdk", - "version": "1.2.10", + "version": "1.2.12", "packageManager": "yarn@3.2.4", "main": "dist/commonjs/index.js", "module": "dist/module/index.js", diff --git a/packages/react-native-sdk/src/components/Call/CallLayout/CallParticipantsSpotlight.tsx b/packages/react-native-sdk/src/components/Call/CallLayout/CallParticipantsSpotlight.tsx index 231246a106..2b6d8f5316 100644 --- a/packages/react-native-sdk/src/components/Call/CallLayout/CallParticipantsSpotlight.tsx +++ b/packages/react-native-sdk/src/components/Call/CallLayout/CallParticipantsSpotlight.tsx @@ -91,6 +91,11 @@ export const CallParticipantsSpotlight = ({ marginHorizontal: landscape ? 0 : 8, }; + const showShareScreenOverlay = + participantInSpotlight?.isLocalParticipant && + isScreenShareOnSpotlight && + ScreenShareOverlay; + return ( {participantInSpotlight && ParticipantView && - (participantInSpotlight.isLocalParticipant && ScreenShareOverlay ? ( + (showShareScreenOverlay ? ( ) : ( 1.3.9) @@ -1146,15 +1145,16 @@ PODS: - RCT-Folly (= 2022.05.16.00) - React-Core - stream-react-native-webrtc - - stream-react-native-webrtc (124.0.0-rc.1): - - JitsiWebRTC (~> 124.0.0) + - stream-react-native-webrtc (125.0.0-rc.1): - React-Core - - stream-video-react-native (1.2.7): + - WebRTC-SDK (~> 125.6422.05) + - stream-video-react-native (1.2.12): - glog - RCT-Folly (= 2022.05.16.00) - React-Core - stream-react-native-webrtc - TOCropViewController (2.7.4) + - WebRTC-SDK (125.6422.05) - Yoga (1.14.0) DEPENDENCIES: @@ -1241,7 +1241,6 @@ SPEC REPOS: - GoogleSignIn - GTMAppAuth - GTMSessionFetcher - - JitsiWebRTC - libevent - MMKV - MMKVCore @@ -1249,6 +1248,7 @@ SPEC REPOS: - PromisesSwift - SocketRocket - TOCropViewController + - WebRTC-SDK EXTERNAL SOURCES: boost: @@ -1409,7 +1409,6 @@ SPEC CHECKSUMS: GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6 hermes-engine: b2669ce35fc4ac14f523b307aff8896799829fe2 - JitsiWebRTC: d0ae5fd6a81e771bfd82c2ee6c6bb542ebd65ee8 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 MMKV: 817ba1eea17421547e01e087285606eb270a8dcb MMKVCore: af055b00e27d88cd92fad301c5fecd1ff9b26dd9 @@ -1479,9 +1478,10 @@ SPEC CHECKSUMS: RNVoipPushNotification: 543e18f83089134a35e7f1d2eba4c8b1f7776b08 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 stream-io-video-filters-react-native: 8c345e6adf5164646696d45f9962c4199b2fe3b9 - stream-react-native-webrtc: 1380525629fae21f4894535189573fb4ddb7984a - stream-video-react-native: 7948f9d3bfd695f46d90f7d05b982b31b0c304a8 + stream-react-native-webrtc: 976646e6e3643d331fc4da20e4be04ea16af295b + stream-video-react-native: f6aa195dbaf9f72945ad2d16d709dc1e40ceee2b TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654 + WebRTC-SDK: 1990a1a595bd0b59c17485ce13ff17f575732c12 Yoga: 1b901a6d6eeba4e8a2e8f308f708691cdb5db312 PODFILE CHECKSUM: f96321cd21f8fa84788658bc6649718343f705b3 diff --git a/sample-apps/react-native/dogfood/ios/StreamReactNativeVideoSDKSample/AppDelegate.mm b/sample-apps/react-native/dogfood/ios/StreamReactNativeVideoSDKSample/AppDelegate.mm index 8c3f92a15f..bea64335c2 100644 --- a/sample-apps/react-native/dogfood/ios/StreamReactNativeVideoSDKSample/AppDelegate.mm +++ b/sample-apps/react-native/dogfood/ios/StreamReactNativeVideoSDKSample/AppDelegate.mm @@ -13,6 +13,7 @@ // @react-native-community/push-notification-ios #import #import +#import #import "StreamVideoReactNative.h" @@ -123,6 +124,10 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter]; center.delegate = self; + WebRTCModuleOptions *options = [WebRTCModuleOptions sharedInstance]; +// uncomment below to see native webrtc logs +// options.loggingSeverity = RTCLoggingSeverityInfo; + return [super application:application didFinishLaunchingWithOptions:launchOptions]; } diff --git a/sample-apps/react-native/dogfood/package.json b/sample-apps/react-native/dogfood/package.json index 5a03a7054e..3fa00576d5 100644 --- a/sample-apps/react-native/dogfood/package.json +++ b/sample-apps/react-native/dogfood/package.json @@ -1,6 +1,6 @@ { "name": "@stream-io/video-react-native-dogfood", - "version": "4.4.10", + "version": "4.4.12", "private": true, "scripts": { "android": "react-native run-android", @@ -30,7 +30,7 @@ "@react-navigation/native": "^6.1.10", "@react-navigation/native-stack": "^6.9.18", "@stream-io/flat-list-mvcp": "^0.10.3", - "@stream-io/react-native-webrtc": "124.0.0-rc.1", + "@stream-io/react-native-webrtc": "125.0.0-rc.1", "@stream-io/video-filters-react-native": "workspace:^", "@stream-io/video-react-native-sdk": "workspace:^", "react": "18.2.0", diff --git a/yarn.lock b/yarn.lock index 0f7987c16d..b5cfadc655 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7760,16 +7760,16 @@ __metadata: languageName: node linkType: hard -"@stream-io/react-native-webrtc@npm:124.0.0-rc.1": - version: 124.0.0-rc.1 - resolution: "@stream-io/react-native-webrtc@npm:124.0.0-rc.1" +"@stream-io/react-native-webrtc@npm:125.0.0-rc.1": + version: 125.0.0-rc.1 + resolution: "@stream-io/react-native-webrtc@npm:125.0.0-rc.1" dependencies: base64-js: 1.5.1 debug: 4.3.4 event-target-shim: 6.0.2 peerDependencies: react-native: ">=0.60.0" - checksum: d39e7652518d9f3dd904b947667ff1e9d0d35d0603e8e4b262f2d20e326328335a19e8e252881e17af9a1c0c4446f356c4aa6dc4744be2ecc5911e0ae2be3f25 + checksum: 1f2046eea92d128244949ec87f0ff92cc4a1940c56dc14e23ba41b6237048073c9db36f4b0c7fddfccda75dbbb532404d9425e97fe96ad18a983e7ec00213505 languageName: node linkType: hard @@ -7989,7 +7989,7 @@ __metadata: "@rnx-kit/metro-config": ^1.3.3 "@rnx-kit/metro-resolver-symlinks": ^0.1.22 "@stream-io/flat-list-mvcp": ^0.10.3 - "@stream-io/react-native-webrtc": 124.0.0-rc.1 + "@stream-io/react-native-webrtc": 125.0.0-rc.1 "@stream-io/video-filters-react-native": "workspace:^" "@stream-io/video-react-native-sdk": "workspace:^" "@types/eslint": ^8.56.10