@stream-io/video-react-sdk 1.21.2 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,33 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [1.22.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.21.3...@stream-io/video-react-sdk-1.22.0) (2025-09-29)
6
+
7
+ ### Dependency Updates
8
+
9
+ - `@stream-io/video-client` updated to version `1.32.0`
10
+ - `@stream-io/video-react-bindings` updated to version `1.8.4`
11
+
12
+ ### Features
13
+
14
+ - **egress-composite:** custom actions ([#1926](https://github.com/GetStream/stream-video-js/issues/1926)) ([760a35a](https://github.com/GetStream/stream-video-js/commit/760a35a5a5b450d9cde9398f011b5efba8b44458))
15
+
16
+ ### Bug Fixes
17
+
18
+ - make `mute all` label translatable ([#1930](https://github.com/GetStream/stream-video-js/issues/1930)) ([1f49368](https://github.com/GetStream/stream-video-js/commit/1f49368643ccf9a4cec643e4bd9e10ddf7635232))
19
+
20
+ ## [1.21.3](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.21.2...@stream-io/video-react-sdk-1.21.3) (2025-09-17)
21
+
22
+ ### Dependency Updates
23
+
24
+ - `@stream-io/video-client` updated to version `1.31.0`
25
+ - `@stream-io/video-filters-web` updated to version `0.2.2`
26
+ - `@stream-io/video-react-bindings` updated to version `1.8.3`
27
+
28
+ ### Bug Fixes
29
+
30
+ - **video-filters:** prevent background tab throttling ([#1920](https://github.com/GetStream/stream-video-js/issues/1920)) ([f93d5cc](https://github.com/GetStream/stream-video-js/commit/f93d5cc5785957c7f181fcaf689ec366df9e646b))
31
+
5
32
  ## [1.21.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.21.1...@stream-io/video-react-sdk-1.21.2) (2025-09-16)
6
33
 
7
34
  ### Dependency Updates
package/dist/index.cjs.js CHANGED
@@ -848,7 +848,7 @@ const useBackgroundFilters = () => {
848
848
  * in your project before using this component.
849
849
  */
850
850
  const BackgroundFiltersProvider = (props) => {
851
- const { children, backgroundImages = [], backgroundFilter: bgFilterFromProps = undefined, backgroundImage: bgImageFromProps = undefined, backgroundBlurLevel: bgBlurLevelFromProps = undefined, tfFilePath, modelFilePath, basePath, onError, } = props;
851
+ const { children, backgroundImages = [], backgroundFilter: bgFilterFromProps = undefined, backgroundImage: bgImageFromProps = undefined, backgroundBlurLevel: bgBlurLevelFromProps = undefined, tfFilePath, modelFilePath, basePath, onError, forceSafariSupport, forceMobileSupport, } = props;
852
852
  const [backgroundFilter, setBackgroundFilter] = react.useState(bgFilterFromProps);
853
853
  const [backgroundImage, setBackgroundImage] = react.useState(bgImageFromProps);
854
854
  const [backgroundBlurLevel, setBackgroundBlurLevel] = react.useState(bgBlurLevelFromProps);
@@ -867,8 +867,11 @@ const BackgroundFiltersProvider = (props) => {
867
867
  }, []);
868
868
  const [isSupported, setIsSupported] = react.useState(false);
869
869
  react.useEffect(() => {
870
- videoFiltersWeb.isPlatformSupported().then(setIsSupported);
871
- }, []);
870
+ videoFiltersWeb.isPlatformSupported({
871
+ forceSafariSupport,
872
+ forceMobileSupport,
873
+ }).then(setIsSupported);
874
+ }, [forceMobileSupport, forceSafariSupport]);
872
875
  const [tfLite, setTfLite] = react.useState();
873
876
  react.useEffect(() => {
874
877
  // don't try to load TFLite if the platform is not supported
@@ -1898,10 +1901,11 @@ const CallParticipantsList = ({ onClose, activeUsersSearchFn, blockedUsersSearch
1898
1901
  };
1899
1902
  const CallParticipantListContentHeader = ({ userListType, setUserListType, }) => {
1900
1903
  const call = videoReactBindings.useCall();
1904
+ const { t } = videoReactBindings.useI18n();
1901
1905
  const muteAll = react.useCallback(() => {
1902
1906
  call?.muteAllUsers('audio');
1903
1907
  }, [call]);
1904
- return (jsxRuntime.jsxs("div", { className: "str-video__participant-list__content-header", children: [jsxRuntime.jsx("div", { className: "str-video__participant-list__content-header-title", children: userListType === 'active' && (jsxRuntime.jsx(videoReactBindings.Restricted, { requiredGrants: [videoClient.OwnCapability.MUTE_USERS], hasPermissionsOnly: true, children: jsxRuntime.jsx(TextButton, { onClick: muteAll, children: "Mute all" }) })) }), jsxRuntime.jsx(MenuToggle, { placement: "bottom-end", ToggleButton: ToggleButton$1, children: jsxRuntime.jsx(GenericMenu, { children: Object.keys(UserListTypes).map((lt) => (jsxRuntime.jsx(GenericMenuButtonItem, { "aria-selected": lt === userListType, onClick: () => setUserListType(lt), children: UserListTypes[lt] }, lt))) }) })] }));
1908
+ return (jsxRuntime.jsxs("div", { className: "str-video__participant-list__content-header", children: [jsxRuntime.jsx("div", { className: "str-video__participant-list__content-header-title", children: userListType === 'active' && (jsxRuntime.jsx(videoReactBindings.Restricted, { requiredGrants: [videoClient.OwnCapability.MUTE_USERS], hasPermissionsOnly: true, children: jsxRuntime.jsx(TextButton, { onClick: muteAll, children: t('Mute all') }) })) }), jsxRuntime.jsx(MenuToggle, { placement: "bottom-end", ToggleButton: ToggleButton$1, children: jsxRuntime.jsx(GenericMenu, { children: Object.keys(UserListTypes).map((lt) => (jsxRuntime.jsx(GenericMenuButtonItem, { "aria-selected": lt === userListType, onClick: () => setUserListType(lt), children: UserListTypes[lt] }, lt))) }) })] }));
1905
1909
  };
1906
1910
  const ActiveUsersSearchResults = ({ searchQuery, activeUsersSearchFn: activeUsersSearchFnFromProps, debounceSearchInterval, }) => {
1907
1911
  const { useParticipants } = videoReactBindings.useCallStateHooks();
@@ -2470,15 +2474,26 @@ function applyFilter(obj, filter) {
2470
2474
  }
2471
2475
  return checkConditions(obj, filter);
2472
2476
  }
2477
+ const isDateString = (value) => typeof value === 'string' &&
2478
+ /^((?:(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2}(?:\.\d+)?))(Z|[+-]\d{2}:\d{2})?)$/.test(value);
2473
2479
  function checkConditions(obj, conditions) {
2474
2480
  let match = true;
2475
2481
  for (const key of Object.keys(conditions)) {
2476
2482
  const operator = conditions[key];
2477
2483
  const maybeOperator = operator && typeof operator === 'object';
2478
- const value = obj[key];
2484
+ let value = obj[key];
2485
+ if (value instanceof Date) {
2486
+ value = value.getTime();
2487
+ }
2488
+ else if (isDateString(value)) {
2489
+ value = new Date(value).getTime();
2490
+ }
2479
2491
  if (maybeOperator && '$eq' in operator) {
2480
2492
  const eqOperator = operator;
2481
- match && (match = eqOperator.$eq === value);
2493
+ const eqOperatorValue = isDateString(eqOperator.$eq)
2494
+ ? new Date(eqOperator.$eq).getTime()
2495
+ : eqOperator.$eq;
2496
+ match && (match = eqOperatorValue === value);
2482
2497
  }
2483
2498
  else if (maybeOperator && '$neq' in operator) {
2484
2499
  const neqOperator = operator;
@@ -2497,6 +2512,37 @@ function checkConditions(obj, conditions) {
2497
2512
  match = false;
2498
2513
  }
2499
2514
  }
2515
+ else if (maybeOperator && '$gt' in operator) {
2516
+ const gtOperator = operator;
2517
+ const gtOperatorValue = isDateString(gtOperator.$gt)
2518
+ ? new Date(gtOperator.$gt).getTime()
2519
+ : gtOperator.$gt;
2520
+ match && (match = value > gtOperatorValue);
2521
+ }
2522
+ else if (maybeOperator && '$gte' in operator) {
2523
+ const gteOperator = operator;
2524
+ const gteOperatorValue = isDateString(gteOperator.$gte)
2525
+ ? new Date(gteOperator.$gte).getTime()
2526
+ : gteOperator.$gte;
2527
+ match && (match = value >= gteOperatorValue);
2528
+ }
2529
+ else if (maybeOperator && '$lt' in operator) {
2530
+ const ltOperator = operator;
2531
+ const ltOperatorValue = isDateString(ltOperator.$lt)
2532
+ ? new Date(ltOperator.$lt).getTime()
2533
+ : ltOperator.$lt;
2534
+ match && (match = value < ltOperatorValue);
2535
+ }
2536
+ else if (maybeOperator && '$lte' in operator) {
2537
+ const lteOperator = operator;
2538
+ const lteOperatorValue = isDateString(lteOperator.$lte)
2539
+ ? new Date(lteOperator.$lte).getTime()
2540
+ : lteOperator.$lte;
2541
+ match && (match = value <= lteOperatorValue);
2542
+ // } else if (maybeOperator && '$autocomplete' in operator) {
2543
+ // TODO: regexp solution maybe?
2544
+ // match &&= false;
2545
+ }
2500
2546
  else {
2501
2547
  const eqValue = operator;
2502
2548
  match && (match = eqValue === value);
@@ -2970,7 +3016,7 @@ const checkCanJoinEarly = (startsAt, joinAheadTimeSeconds) => {
2970
3016
  return Date.now() >= +startsAt - (joinAheadTimeSeconds ?? 0) * 1000;
2971
3017
  };
2972
3018
 
2973
- const [major, minor, patch] = ("1.21.2").split('.');
3019
+ const [major, minor, patch] = ("1.22.0").split('.');
2974
3020
  videoClient.setSdkInfo({
2975
3021
  type: videoClient.SfuModels.SdkType.REACT,
2976
3022
  major,
@@ -3058,6 +3104,7 @@ exports.Tooltip = Tooltip;
3058
3104
  exports.Video = Video$1;
3059
3105
  exports.VideoPreview = VideoPreview;
3060
3106
  exports.WithTooltip = WithTooltip;
3107
+ exports.applyFilter = applyFilter;
3061
3108
  exports.defaultEmojiReactionMap = defaultEmojiReactionMap;
3062
3109
  exports.defaultReactions = defaultReactions;
3063
3110
  exports.translations = translations;