Skip to content

Commit 0329aa0

Browse files
committed
Merge branch 'main' into expose-android-push-utils
# Conflicts: # sample-apps/react-native/dogfood/ios/Podfile.lock
2 parents e99ddf2 + fae292a commit 0329aa0

File tree

52 files changed

+912
-127
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+912
-127
lines changed

.github/workflows/react-native-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ jobs:
130130
name: Deploy iOS
131131
needs: build_ios
132132
timeout-minutes: 60
133-
if: ${{ github.ref == 'refs/heads/main' }}
133+
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/PBE-5855-feat/react-native-video-design-v2' }}
134134
runs-on: macos-latest
135135
steps:
136136
- uses: actions/checkout@v4

packages/client/CHANGELOG.md

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

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

5+
## [1.10.5](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.10.4...@stream-io/video-client-1.10.5) (2024-11-07)
6+
7+
8+
### Bug Fixes
9+
10+
* ignore maxSimulcastLayers override for SVC codecs ([#1564](https://github.com/GetStream/stream-video-js/issues/1564)) ([48f8abe](https://github.com/GetStream/stream-video-js/commit/48f8abe5fd5b48c367a04696febd582573def828))
11+
12+
## [1.10.4](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.10.3...@stream-io/video-client-1.10.4) (2024-11-07)
13+
14+
15+
### Bug Fixes
16+
17+
* max simulcast layers preference ([#1560](https://github.com/GetStream/stream-video-js/issues/1560)) ([2b0bf28](https://github.com/GetStream/stream-video-js/commit/2b0bf2824dce41c2709e361e0521cf85e1b2fd16))
18+
19+
## [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)
20+
21+
22+
### Bug Fixes
23+
24+
* 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)
25+
26+
## [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)
27+
28+
29+
### Bug Fixes
30+
31+
* camera not enabled on foreground notifications ([#1546](https://github.com/GetStream/stream-video-js/issues/1546)) ([67c920a](https://github.com/GetStream/stream-video-js/commit/67c920ac4bca35a414b88f6c9829b08396a6260b))
32+
33+
## [1.10.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.10.0...@stream-io/video-client-1.10.1) (2024-10-30)
34+
35+
36+
### Bug Fixes
37+
38+
* various device selector issues ([#1541](https://github.com/GetStream/stream-video-js/issues/1541)) ([f23618b](https://github.com/GetStream/stream-video-js/commit/f23618bda447eeb2d66f908bdb38b24db051f87c))
39+
40+
## [1.10.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.9.3...@stream-io/video-client-1.10.0) (2024-10-30)
41+
42+
43+
### Features
44+
45+
* report input devices in call stats ([#1533](https://github.com/GetStream/stream-video-js/issues/1533)) ([f34fe0a](https://github.com/GetStream/stream-video-js/commit/f34fe0a0444903099565ae55a9639e39fc19b76c))
46+
547
## [1.9.3](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.9.2...@stream-io/video-client-1.9.3) (2024-10-28)
648

749

packages/client/docusaurus/docs/javascript/02-guides/03-call-and-participant-state.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ const subscription = call.state.participants$.subscribe((participants) => {
151151
subscription.unsubscribe();
152152
```
153153

154+
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.
155+
154156
## Client state
155157

156158
The client state can be accessed by `client.state`.

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.9.3",
3+
"version": "1.10.5",
44
"packageManager": "[email protected]",
55
"main": "dist/index.cjs.js",
66
"module": "dist/index.es.js",

packages/client/src/Call.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -993,6 +993,9 @@ export class Call {
993993
options: statsOptions,
994994
subscriber: this.subscriber,
995995
publisher: this.publisher,
996+
microphone: this.microphone,
997+
camera: this.camera,
998+
state: this.state,
996999
});
9971000
this.sfuStatsReporter.start();
9981001
}

packages/client/src/coordinator/connection/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ export class StreamClient {
252252
) {
253253
this.logger(
254254
'warn',
255-
'Please do not use connectUser server side. connectUser impacts MAU and concurrent connection usage and thus your bill. If you have a valid use-case, add "allowServerSideConnect: true" to the client options to disable this warning.',
255+
'Please do not use connectUser server side. Use our @stream-io/node-sdk instead: https://getstream.io/video/docs/api/',
256256
);
257257
}
258258

packages/client/src/devices/BrowserPermission.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class BrowserPermission {
2222

2323
this.ready = (async () => {
2424
const assumeGranted = (error?: unknown) => {
25-
this.setState('granted');
25+
this.setState('prompt');
2626
};
2727

2828
if (!canQueryPermissions()) {
@@ -88,12 +88,14 @@ export class BrowserPermission {
8888
this.permission.constraints,
8989
);
9090
disposeOfMediaStream(stream);
91+
this.setState('granted');
9192
return true;
9293
} catch (e) {
9394
if (e instanceof DOMException && e.name === 'NotAllowedError') {
9495
this.logger('info', 'Browser permission was not granted', {
9596
permission: this.permission,
9697
});
98+
this.setState('denied');
9799

98100
if (throwOnNotAllowed) {
99101
throw e;

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/InputMediaDeviceManager.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ export abstract class InputMediaDeviceManager<
7474
* Starts stream.
7575
*/
7676
async enable() {
77+
this.state.prevStatus = this.state.optimisticStatus;
7778
if (this.state.optimisticStatus === 'enabled') {
7879
return;
7980
}
80-
8181
this.state.setPendingStatus('enabled');
8282

8383
await withCancellation(this.statusChangeConcurrencyTag, async (signal) => {
@@ -97,7 +97,7 @@ export abstract class InputMediaDeviceManager<
9797
* @param {boolean} [forceStop=false] when true, stops the tracks regardless of the state.disableMode
9898
*/
9999
async disable(forceStop: boolean = false) {
100-
this.state.prevStatus = this.state.status;
100+
this.state.prevStatus = this.state.optimisticStatus;
101101
if (!forceStop && this.state.optimisticStatus === 'disabled') {
102102
return;
103103
}
@@ -131,7 +131,7 @@ export abstract class InputMediaDeviceManager<
131131
async resume() {
132132
if (
133133
this.state.prevStatus === 'enabled' &&
134-
this.state.status === 'disabled'
134+
this.state.status !== 'enabled'
135135
) {
136136
await this.enable();
137137
}

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

0 commit comments

Comments
 (0)