Skip to content

Commit 52f77f6

Browse files
committed
Merge branch 'main' into base-profiles
2 parents 2f6d37e + 4ec9488 commit 52f77f6

File tree

11 files changed

+48
-7
lines changed

11 files changed

+48
-7
lines changed

packages/client/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

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

5+
## [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)
6+
7+
8+
### Bug Fixes
9+
10+
* 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)
11+
512
## [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)
613

714

packages/client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stream-io/video-client",
3-
"version": "1.10.2",
3+
"version": "1.10.3",
44
"packageManager": "[email protected]",
55
"main": "dist/index.cjs.js",
66
"module": "dist/index.es.js",

packages/client/src/devices/CameraManager.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { getVideoDevices, getVideoStream } from './devices';
66
import { TrackType } from '../gen/video/sfu/models/models';
77
import { PreferredCodec } from '../types';
88
import { isMobile } from '../compatibility';
9+
import { isReactNative } from '../helpers/platforms';
910

1011
export class CameraManager extends InputMediaDeviceManager<CameraManagerState> {
1112
private targetResolution = {
@@ -22,13 +23,17 @@ export class CameraManager extends InputMediaDeviceManager<CameraManagerState> {
2223
super(call, new CameraManagerState(), TrackType.VIDEO);
2324
}
2425

26+
private isDirectionSupportedByDevice() {
27+
return isReactNative() || isMobile();
28+
}
29+
2530
/**
2631
* Select the camera direction.
2732
*
2833
* @param direction the direction of the camera to select.
2934
*/
3035
async selectDirection(direction: Exclude<CameraDirection, undefined>) {
31-
if (isMobile()) {
36+
if (this.isDirectionSupportedByDevice()) {
3237
this.state.setDirection(direction);
3338
// Providing both device id and direction doesn't work, so we deselect the device
3439
this.state.setDevice(undefined);
@@ -102,7 +107,12 @@ export class CameraManager extends InputMediaDeviceManager<CameraManagerState> {
102107
constraints.height = this.targetResolution.height;
103108
// We can't set both device id and facing mode
104109
// Device id has higher priority
105-
if (!constraints.deviceId && this.state.direction && isMobile()) {
110+
111+
if (
112+
!constraints.deviceId &&
113+
this.state.direction &&
114+
this.isDirectionSupportedByDevice()
115+
) {
106116
constraints.facingMode =
107117
this.state.direction === 'front' ? 'user' : 'environment';
108118
}

packages/client/src/devices/__tests__/CameraManager.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ vi.mock('../../compatibility.ts', () => {
4343
};
4444
});
4545

46+
vi.mock('../../helpers/platforms', () => {
47+
console.log('MOCKING mobile device');
48+
return {
49+
isReactNative: () => false,
50+
};
51+
});
52+
4653
describe('CameraManager', () => {
4754
let manager: CameraManager;
4855

packages/react-bindings/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

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

5+
## [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)
6+
7+
### Dependency Updates
8+
9+
* `@stream-io/video-client` updated to version `1.10.3`
510
## [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)
611

712

packages/react-bindings/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stream-io/video-react-bindings",
3-
"version": "1.1.13",
3+
"version": "1.1.14",
44
"packageManager": "[email protected]",
55
"main": "./dist/index.cjs.js",
66
"module": "./dist/index.es.js",

packages/react-native-sdk/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

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

5+
## [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)
6+
7+
### Dependency Updates
8+
9+
* `@stream-io/video-client` updated to version `1.10.3`
10+
* `@stream-io/video-react-bindings` updated to version `1.1.14`
511
## [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)
612

713

packages/react-native-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stream-io/video-react-native-sdk",
3-
"version": "1.2.11",
3+
"version": "1.2.12",
44
"packageManager": "[email protected]",
55
"main": "dist/commonjs/index.js",
66
"module": "dist/module/index.js",

packages/react-sdk/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

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

5+
## [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)
6+
7+
### Dependency Updates
8+
9+
* `@stream-io/video-client` updated to version `1.10.3`
10+
* `@stream-io/video-react-bindings` updated to version `1.1.14`
511
## [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)
612

713
### Dependency Updates

packages/react-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stream-io/video-react-sdk",
3-
"version": "1.7.8",
3+
"version": "1.7.9",
44
"packageManager": "[email protected]",
55
"main": "./dist/index.cjs.js",
66
"module": "./dist/index.es.js",

0 commit comments

Comments
 (0)