Skip to content

Commit d8b8adb

Browse files
committed
Merge branch 'main' into video-moderation
# Conflicts: # packages/video-filters-web/src/VirtualBackground.ts # sample-apps/react/react-dogfood/components/ActiveCall.tsx
2 parents e397061 + b06e130 commit d8b8adb

File tree

45 files changed

+698
-265
lines changed

Some content is hidden

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

45 files changed

+698
-265
lines changed

packages/audio-filters-web/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+
## [0.6.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/audio-filters-web-0.6.0...@stream-io/audio-filters-web-0.6.1) (2025-11-25)
6+
7+
### Bug Fixes
8+
9+
- **noise cancellation:** delay toggling until initialization is finished ([#2014](https://github.com/GetStream/stream-video-js/issues/2014)) ([d28b8ea](https://github.com/GetStream/stream-video-js/commit/d28b8ea282322a25688ff48966b0dc10dd7e60bd))
10+
- **noise cancellation:** delay toggling until initialization is finished ([#2017](https://github.com/GetStream/stream-video-js/issues/2017)) ([cbd3e43](https://github.com/GetStream/stream-video-js/commit/cbd3e437f75979d6babd8ff8b825140d4afbc062))
11+
512
## [0.6.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/audio-filters-web-0.5.0...@stream-io/audio-filters-web-0.6.0) (2025-10-14)
613

714
### Features

packages/audio-filters-web/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/audio-filters-web",
3-
"version": "0.6.0",
3+
"version": "0.6.1",
44
"main": "./dist/index.cjs.js",
55
"module": "./dist/index.es.js",
66
"types": "./dist/index.d.ts",

packages/client/CHANGELOG.md

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

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

5+
## [1.37.3](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.37.2...@stream-io/video-client-1.37.3) (2025-11-25)
6+
7+
- instructions for Claude and other coding agents ([#2012](https://github.com/GetStream/stream-video-js/issues/2012)) ([08a3459](https://github.com/GetStream/stream-video-js/commit/08a345954f7cb5b1fae5a4b39b5b585bf1f631ec))
8+
9+
### Bug Fixes
10+
11+
- **noise cancellation:** delay toggling until initialization is finished ([#2014](https://github.com/GetStream/stream-video-js/issues/2014)) ([d28b8ea](https://github.com/GetStream/stream-video-js/commit/d28b8ea282322a25688ff48966b0dc10dd7e60bd))
12+
513
## [1.37.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.37.1...@stream-io/video-client-1.37.2) (2025-11-20)
614

715
### Bug Fixes

packages/client/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export * from './src/devices';
1717
export * from './src/store';
1818
export * from './src/sorting';
1919
export * from './src/helpers/client-details';
20+
export * from './src/helpers/humanize';
2021
export * from './src/helpers/DynascaleManager';
2122
export * from './src/helpers/ViewportTracker';
2223
export * from './src/helpers/sound-detector';

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.37.2",
3+
"version": "1.37.3",
44
"main": "dist/index.cjs.js",
55
"module": "dist/index.es.js",
66
"browser": "dist/index.browser.es.js",
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { describe, it, expect } from 'vitest';
2+
3+
import { humanize } from '../humanize';
4+
5+
describe('humanize', () => {
6+
it('returns the same string for numbers below 1000', () => {
7+
expect(humanize(0)).toBe('0');
8+
expect(humanize(1)).toBe('1');
9+
expect(humanize(12)).toBe('12');
10+
expect(humanize(999)).toBe('999');
11+
});
12+
13+
it('formats thousands with k suffix', () => {
14+
expect(humanize(1000)).toBe('1k');
15+
expect(humanize(1500)).toBe('1.5k');
16+
expect(humanize(12_300)).toBe('12.3k');
17+
// >= 100 of the unit → no decimals
18+
expect(humanize(123_456)).toBe('123k');
19+
});
20+
21+
it('formats millions with M suffix', () => {
22+
expect(humanize(1_000_000)).toBe('1M'); // trailing .0 removed
23+
expect(humanize(1_500_000)).toBe('1.5M');
24+
expect(humanize(12_000_000)).toBe('12M');
25+
});
26+
27+
it('formats billions with B suffix', () => {
28+
expect(humanize(1_000_000_000)).toBe('1B');
29+
expect(humanize(1_250_000_000)).toBe('1.3B');
30+
expect(humanize(12_345_678_901)).toBe('12.3B');
31+
});
32+
33+
it('rounds within the same unit and removes trailing .0', () => {
34+
// Rounds up within the same unit (k), does not carry over to the next unit
35+
expect(humanize(999_500)).toBe('1000k');
36+
// Rounds to a whole number for millions when first decimal rounds to .0
37+
expect(humanize(99_950_000)).toBe('100M');
38+
// No trailing .0
39+
expect(humanize(100_000)).toBe('100k');
40+
});
41+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* Formats large numbers into a compact, human-friendly form: 1k, 1.5k, 2M, etc.
3+
*/
4+
export const humanize = (n: number): string => {
5+
if (n < 1000) return String(n);
6+
const units = [
7+
{ value: 1_000_000_000, suffix: 'B' },
8+
{ value: 1_000_000, suffix: 'M' },
9+
{ value: 1_000, suffix: 'k' },
10+
];
11+
for (const { value, suffix } of units) {
12+
if (n >= value) {
13+
const num = n / value;
14+
const precision = num < 100 ? 1 : 0; // show one decimal only for small leading numbers
15+
const formatted = num.toFixed(precision).replace(/\.0$/g, '');
16+
return `${formatted}${suffix}`;
17+
}
18+
}
19+
return String(n);
20+
};

packages/noise-cancellation-react-native/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+
## [0.4.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/noise-cancellation-react-native-0.4.1...@stream-io/noise-cancellation-react-native-0.4.2) (2025-11-25)
6+
7+
### Bug Fixes
8+
9+
- **noise cancellation:** delay toggling until initialization is finished ([#2014](https://github.com/GetStream/stream-video-js/issues/2014)) ([d28b8ea](https://github.com/GetStream/stream-video-js/commit/d28b8ea282322a25688ff48966b0dc10dd7e60bd))
10+
511
## [0.4.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/noise-cancellation-react-native-0.4.0...@stream-io/noise-cancellation-react-native-0.4.1) (2025-11-05)
612

713
### Bug Fixes

packages/noise-cancellation-react-native/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/noise-cancellation-react-native",
3-
"version": "0.4.1",
3+
"version": "0.4.2",
44
"description": "Noise cancellation for the Stream React Native Video SDK",
55
"main": "dist/commonjs/index.js",
66
"module": "dist/module/index.js",

packages/react-bindings/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.11.4](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-bindings-1.11.3...@stream-io/video-react-bindings-1.11.4) (2025-11-25)
6+
7+
### Dependency Updates
8+
9+
- `@stream-io/video-client` updated to version `1.37.3`
10+
511
## [1.11.3](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-bindings-1.11.2...@stream-io/video-react-bindings-1.11.3) (2025-11-20)
612

713
### Dependency Updates

0 commit comments

Comments
 (0)