Skip to content

Commit

Permalink
Merge branch 'main' into docs/cc-react
Browse files Browse the repository at this point in the history
  • Loading branch information
myandrienko authored Nov 7, 2024
2 parents 026c1fa + 121a736 commit 9e9bbbe
Show file tree
Hide file tree
Showing 18 changed files with 86 additions and 22 deletions.
7 changes: 7 additions & 0 deletions packages/client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stream-io/video-client",
"version": "1.10.2",
"version": "1.10.3",
"packageManager": "[email protected]",
"main": "dist/index.cjs.js",
"module": "dist/index.es.js",
Expand Down
14 changes: 12 additions & 2 deletions packages/client/src/devices/CameraManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<CameraManagerState> {
private targetResolution = {
Expand All @@ -22,13 +23,17 @@ export class CameraManager extends InputMediaDeviceManager<CameraManagerState> {
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<CameraDirection, undefined>) {
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);
Expand Down Expand Up @@ -102,7 +107,12 @@ export class CameraManager extends InputMediaDeviceManager<CameraManagerState> {
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';
}
Expand Down
7 changes: 7 additions & 0 deletions packages/client/src/devices/__tests__/CameraManager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
5 changes: 5 additions & 0 deletions packages/react-bindings/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
2 changes: 1 addition & 1 deletion packages/react-bindings/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stream-io/video-react-bindings",
"version": "1.1.13",
"version": "1.1.14",
"packageManager": "[email protected]",
"main": "./dist/index.cjs.js",
"module": "./dist/index.es.js",
Expand Down
13 changes: 13 additions & 0 deletions packages/react-native-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stream-io/video-react-native-sdk",
"version": "1.2.10",
"version": "1.2.12",
"packageManager": "[email protected]",
"main": "dist/commonjs/index.js",
"module": "dist/module/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ export const CallParticipantsSpotlight = ({
marginHorizontal: landscape ? 0 : 8,
};

const showShareScreenOverlay =
participantInSpotlight?.isLocalParticipant &&
isScreenShareOnSpotlight &&
ScreenShareOverlay;

return (
<View
testID={ComponentTestIds.CALL_PARTICIPANTS_SPOTLIGHT}
Expand All @@ -105,7 +110,7 @@ export const CallParticipantsSpotlight = ({
>
{participantInSpotlight &&
ParticipantView &&
(participantInSpotlight.isLocalParticipant && ScreenShareOverlay ? (
(showShareScreenOverlay ? (
<ScreenShareOverlay />
) : (
<ParticipantView
Expand Down
6 changes: 6 additions & 0 deletions packages/react-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [1.7.9](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.7.8...@stream-io/video-react-sdk-1.7.9) (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.7.8](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.7.7...@stream-io/video-react-sdk-1.7.8) (2024-11-01)

### Dependency Updates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,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.
Expand Down
2 changes: 1 addition & 1 deletion packages/react-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stream-io/video-react-sdk",
"version": "1.7.8",
"version": "1.7.9",
"packageManager": "[email protected]",
"main": "./dist/index.cjs.js",
"module": "./dist/index.es.js",
Expand Down
16 changes: 8 additions & 8 deletions sample-apps/react-native/dogfood/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ PODS:
- hermes-engine (0.73.4):
- hermes-engine/Pre-built (= 0.73.4)
- hermes-engine/Pre-built (0.73.4)
- JitsiWebRTC (124.0.1)
- libevent (2.1.12)
- MMKV (1.3.9):
- MMKVCore (~> 1.3.9)
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -1241,14 +1241,14 @@ SPEC REPOS:
- GoogleSignIn
- GTMAppAuth
- GTMSessionFetcher
- JitsiWebRTC
- libevent
- MMKV
- MMKVCore
- PromisesObjC
- PromisesSwift
- SocketRocket
- TOCropViewController
- WebRTC-SDK

EXTERNAL SOURCES:
boost:
Expand Down Expand Up @@ -1409,7 +1409,6 @@ SPEC CHECKSUMS:
GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de
GTMSessionFetcher: 5aea5ba6bd522a239e236100971f10cb71b96ab6
hermes-engine: b2669ce35fc4ac14f523b307aff8896799829fe2
JitsiWebRTC: d0ae5fd6a81e771bfd82c2ee6c6bb542ebd65ee8
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
MMKV: 817ba1eea17421547e01e087285606eb270a8dcb
MMKVCore: af055b00e27d88cd92fad301c5fecd1ff9b26dd9
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// @react-native-community/push-notification-ios
#import <UserNotifications/UserNotifications.h>
#import <RNCPushNotificationIOS.h>
#import <WebRTCModuleOptions.h>

#import "StreamVideoReactNative.h"

Expand Down Expand Up @@ -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];
}

Expand Down
4 changes: 2 additions & 2 deletions sample-apps/react-native/dogfood/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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",
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9e9bbbe

Please sign in to comment.