@stream-io/video-react-sdk 1.31.7 → 1.32.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.32.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.31.8...@stream-io/video-react-sdk-1.32.0) (2026-02-06)
6
+
7
+ ### Dependency Updates
8
+
9
+ - `@stream-io/video-client` updated to version `1.42.0`
10
+ - `@stream-io/video-react-bindings` updated to version `1.13.4`
11
+
12
+ ### Features
13
+
14
+ - Detectors for broken microphone setup ([#2090](https://github.com/GetStream/stream-video-js/issues/2090)) ([552b3f4](https://github.com/GetStream/stream-video-js/commit/552b3f4e3c54e0b6fa67221cd510f4ea1f6f8a61))
15
+
16
+ ### Bug Fixes
17
+
18
+ - **react:** hide livestream layout fullscreen button when fullscreen is unsupported ([#2112](https://github.com/GetStream/stream-video-js/issues/2112)) ([f436b01](https://github.com/GetStream/stream-video-js/commit/f436b01f28416d2974c278f4059495fea555f305))
19
+
20
+ ## [1.31.8](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.31.7...@stream-io/video-react-sdk-1.31.8) (2026-01-30)
21
+
22
+ ### Dependency Updates
23
+
24
+ - `@stream-io/video-client` updated to version `1.41.3`
25
+ - `@stream-io/video-filters-web` updated to version `0.7.2`
26
+ - `@stream-io/video-react-bindings` updated to version `1.13.3`
27
+
28
+ ### Bug Fixes
29
+
30
+ - **react:** improve logic for calculating the lower / upper threshold for video filter degradation ([#2094](https://github.com/GetStream/stream-video-js/issues/2094)) ([5cd2d5c](https://github.com/GetStream/stream-video-js/commit/5cd2d5cb34fc7bbdfaf9529eb9f8d33a40346cab))
31
+
5
32
  ## [1.31.7](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-react-sdk-1.31.6...@stream-io/video-react-sdk-1.31.7) (2026-01-28)
6
33
 
7
34
  ### Dependency Updates
@@ -12,8 +12,6 @@ import clsx from 'clsx';
12
12
  * and uses two thresholds to avoid flickering near the limit.
13
13
  */
14
14
  const ALPHA = 0.2;
15
- const FPS_WARNING_THRESHOLD_LOWER = 23;
16
- const FPS_WARNING_THRESHOLD_UPPER = 25;
17
15
  const DEFAULT_FPS = 30;
18
16
  const DEVIATION_LIMIT = 0.5;
19
17
  const OUTLIER_PERSISTENCE = 5;
@@ -62,17 +60,16 @@ const BackgroundFiltersProvider = (props) => {
62
60
  const [backgroundBlurLevel, setBackgroundBlurLevel] = useState(bgBlurLevelFromProps);
63
61
  const [showLowFpsWarning, setShowLowFpsWarning] = useState(false);
64
62
  const [isLoading, setIsLoading] = useState(false);
65
- const fpsWarningThresholdLower = performanceThresholds?.fpsWarningThresholdLower ??
66
- FPS_WARNING_THRESHOLD_LOWER;
67
- const fpsWarningThresholdUpper = performanceThresholds?.fpsWarningThresholdUpper ??
68
- FPS_WARNING_THRESHOLD_UPPER;
69
- const defaultFps = performanceThresholds?.defaultFps ?? DEFAULT_FPS;
70
- const emaRef = useRef(defaultFps);
63
+ const cameraFrameRate = callStatsReport?.publisherStats?.camera?.frameRate;
64
+ const sourceFps = performanceThresholds?.defaultFps || cameraFrameRate || DEFAULT_FPS;
65
+ const fpsWarningThresholdLower = performanceThresholds?.fpsWarningThresholdLower ?? sourceFps * 0.75;
66
+ const fpsWarningThresholdUpper = performanceThresholds?.fpsWarningThresholdUpper ?? sourceFps * 0.85;
67
+ const emaRef = useRef(sourceFps);
71
68
  const outlierStreakRef = useRef(0);
72
69
  const handleStats = useCallback((stats) => {
73
70
  const fps = stats?.fps;
74
71
  if (fps === undefined || fps === null) {
75
- emaRef.current = defaultFps;
72
+ emaRef.current = sourceFps;
76
73
  outlierStreakRef.current = 0;
77
74
  setShowLowFpsWarning(false);
78
75
  return;
@@ -91,7 +88,7 @@ const BackgroundFiltersProvider = (props) => {
91
88
  return true;
92
89
  return prev;
93
90
  });
94
- }, [fpsWarningThresholdLower, fpsWarningThresholdUpper, defaultFps]);
91
+ }, [fpsWarningThresholdLower, fpsWarningThresholdUpper, sourceFps]);
95
92
  const performance = useMemo(() => {
96
93
  if (!backgroundFilter) {
97
94
  return { degraded: false };
@@ -148,10 +145,10 @@ const BackgroundFiltersProvider = (props) => {
148
145
  setBackgroundFilter(undefined);
149
146
  setBackgroundImage(undefined);
150
147
  setBackgroundBlurLevel(undefined);
151
- emaRef.current = defaultFps;
148
+ emaRef.current = sourceFps;
152
149
  outlierStreakRef.current = 0;
153
150
  setShowLowFpsWarning(false);
154
- }, [defaultFps]);
151
+ }, [sourceFps]);
155
152
  const [engine, setEngine] = useState(FilterEngine.NONE);
156
153
  const [isSupported, setIsSupported] = useState(false);
157
154
  useEffect(() => {
@@ -353,4 +350,4 @@ const useRenderer = (api, tfLite, call, engine) => {
353
350
  };
354
351
 
355
352
  export { BackgroundFiltersProvider };
356
- //# sourceMappingURL=background-filters-CysVAG5J.es.js.map
353
+ //# sourceMappingURL=background-filters-RdXfNf6_.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"background-filters-RdXfNf6_.es.js","sources":["../../src/components/BackgroundFilters/BackgroundFilters.tsx"],"sourcesContent":["import {\n Context,\n PropsWithChildren,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { flushSync } from 'react-dom';\nimport { useCall, useCallStateHooks } from '@stream-io/video-react-bindings';\nimport { Call, disposeOfMediaStream } from '@stream-io/video-client';\nimport {\n BackgroundBlurLevel,\n createRenderer,\n isMediaPipePlatformSupported,\n isPlatformSupported,\n loadMediaPipe,\n loadTFLite,\n PerformanceStats,\n Renderer,\n TFLite,\n VirtualBackground,\n} from '@stream-io/video-filters-web';\nimport clsx from 'clsx';\nimport type {\n BackgroundFiltersPerformance,\n BackgroundFiltersProps,\n BackgroundFiltersContextValue,\n PerformanceDegradationReason,\n} from './types';\n\n/**\n * Constants for FPS warning calculation.\n * Smooths out quick spikes using an EMA, ignores brief outliers,\n * and uses two thresholds to avoid flickering near the limit.\n */\nconst ALPHA = 0.2;\nconst DEFAULT_FPS = 30;\nconst DEVIATION_LIMIT = 0.5;\nconst OUTLIER_PERSISTENCE = 5;\n\n/**\n * Represents the available background filter processing engines.\n */\nenum FilterEngine {\n TF,\n MEDIA_PIPE,\n NONE,\n}\n\n/**\n * Determines which filter engine is available.\n * MEDIA_PIPE is the default unless legacy filters are requested or MediaPipe is unsupported.\n *\n * Returns NONE if neither is supported.\n */\nconst determineEngine = async (\n useLegacyFilter: boolean | undefined,\n forceSafariSupport: boolean | undefined,\n forceMobileSupport: boolean | undefined,\n): Promise<FilterEngine> => {\n if (useLegacyFilter) {\n const isTfPlatformSupported = await isPlatformSupported({\n forceSafariSupport,\n forceMobileSupport,\n });\n return isTfPlatformSupported ? FilterEngine.TF : FilterEngine.NONE;\n }\n\n const isMediaPipeSupported = await isMediaPipePlatformSupported({\n forceSafariSupport,\n forceMobileSupport,\n });\n\n return isMediaPipeSupported ? FilterEngine.MEDIA_PIPE : FilterEngine.NONE;\n};\n\n/**\n * A provider component that enables the use of background filters in your app.\n *\n * Please make sure you have the `@stream-io/video-filters-web` package installed\n * in your project before using this component.\n */\nexport const BackgroundFiltersProvider = (\n props: PropsWithChildren<BackgroundFiltersProps> & {\n // for code splitting. Prevents circular dependency issues where\n // this Context needs to be present in the main chunk, but also\n // imported by the background filters chunk.\n ContextProvider: Context<BackgroundFiltersContextValue | undefined>;\n },\n) => {\n const {\n ContextProvider,\n children,\n backgroundImages = [],\n backgroundFilter: bgFilterFromProps = undefined,\n backgroundImage: bgImageFromProps = undefined,\n backgroundBlurLevel: bgBlurLevelFromProps = undefined,\n tfFilePath,\n modelFilePath,\n useLegacyFilter,\n basePath,\n onError,\n performanceThresholds,\n forceSafariSupport,\n forceMobileSupport,\n } = props;\n\n const call = useCall();\n const { useCallStatsReport } = useCallStateHooks();\n const callStatsReport = useCallStatsReport();\n\n const [backgroundFilter, setBackgroundFilter] = useState(bgFilterFromProps);\n const [backgroundImage, setBackgroundImage] = useState(bgImageFromProps);\n const [backgroundBlurLevel, setBackgroundBlurLevel] =\n useState(bgBlurLevelFromProps);\n\n const [showLowFpsWarning, setShowLowFpsWarning] = useState<boolean>(false);\n const [isLoading, setIsLoading] = useState<boolean>(false);\n\n const cameraFrameRate = callStatsReport?.publisherStats?.camera?.frameRate;\n\n const sourceFps =\n performanceThresholds?.defaultFps || cameraFrameRate || DEFAULT_FPS;\n\n const fpsWarningThresholdLower =\n performanceThresholds?.fpsWarningThresholdLower ?? sourceFps * 0.75;\n const fpsWarningThresholdUpper =\n performanceThresholds?.fpsWarningThresholdUpper ?? sourceFps * 0.85;\n\n const emaRef = useRef<number>(sourceFps);\n const outlierStreakRef = useRef<number>(0);\n\n const handleStats = useCallback(\n (stats: PerformanceStats) => {\n const fps = stats?.fps;\n if (fps === undefined || fps === null) {\n emaRef.current = sourceFps;\n outlierStreakRef.current = 0;\n setShowLowFpsWarning(false);\n return;\n }\n\n const prevEma = emaRef.current;\n const deviation = Math.abs(fps - prevEma) / prevEma;\n\n const isOutlier = fps < prevEma && deviation > DEVIATION_LIMIT;\n outlierStreakRef.current = isOutlier ? outlierStreakRef.current + 1 : 0;\n if (isOutlier && outlierStreakRef.current < OUTLIER_PERSISTENCE) return;\n\n emaRef.current = ALPHA * fps + (1 - ALPHA) * prevEma;\n\n setShowLowFpsWarning((prev) => {\n if (prev && emaRef.current > fpsWarningThresholdUpper) return false;\n if (!prev && emaRef.current < fpsWarningThresholdLower) return true;\n\n return prev;\n });\n },\n [fpsWarningThresholdLower, fpsWarningThresholdUpper, sourceFps],\n );\n\n const performance: BackgroundFiltersPerformance = useMemo(() => {\n if (!backgroundFilter) {\n return { degraded: false };\n }\n\n const reasons: Array<PerformanceDegradationReason> = [];\n\n if (showLowFpsWarning) {\n reasons.push('frame-drop');\n }\n\n const qualityLimitationReasons =\n callStatsReport?.publisherStats?.qualityLimitationReasons;\n\n if (\n showLowFpsWarning &&\n qualityLimitationReasons &&\n qualityLimitationReasons?.includes('cpu')\n ) {\n reasons.push('cpu-throttling');\n }\n\n return {\n degraded: reasons.length > 0,\n reason: reasons.length > 0 ? reasons : undefined,\n };\n }, [\n showLowFpsWarning,\n callStatsReport?.publisherStats?.qualityLimitationReasons,\n backgroundFilter,\n ]);\n\n const prevDegradedRef = useRef<boolean | undefined>(undefined);\n useEffect(() => {\n const currentDegraded = performance.degraded;\n const prevDegraded = prevDegradedRef.current;\n\n if (\n !!backgroundFilter &&\n prevDegraded !== undefined &&\n prevDegraded !== currentDegraded\n ) {\n call?.tracer.trace('backgroundFilters.performance', {\n degraded: currentDegraded,\n reason: performance?.reason,\n fps: emaRef.current,\n });\n }\n prevDegradedRef.current = currentDegraded;\n }, [\n performanceThresholds,\n performance.degraded,\n performance.reason,\n backgroundFilter,\n call?.tracer,\n ]);\n\n const applyBackgroundImageFilter = useCallback((imageUrl: string) => {\n setBackgroundFilter('image');\n setBackgroundImage(imageUrl);\n }, []);\n\n const applyBackgroundBlurFilter = useCallback(\n (blurLevel: BackgroundBlurLevel = 'high') => {\n setBackgroundFilter('blur');\n setBackgroundBlurLevel(blurLevel);\n },\n [],\n );\n\n const disableBackgroundFilter = useCallback(() => {\n setBackgroundFilter(undefined);\n setBackgroundImage(undefined);\n setBackgroundBlurLevel(undefined);\n\n emaRef.current = sourceFps;\n outlierStreakRef.current = 0;\n setShowLowFpsWarning(false);\n }, [sourceFps]);\n\n const [engine, setEngine] = useState<FilterEngine>(FilterEngine.NONE);\n const [isSupported, setIsSupported] = useState(false);\n useEffect(() => {\n determineEngine(\n useLegacyFilter,\n forceSafariSupport,\n forceMobileSupport,\n ).then((determinedEngine) => {\n setEngine(determinedEngine);\n setIsSupported(determinedEngine !== FilterEngine.NONE);\n });\n }, [forceMobileSupport, forceSafariSupport, useLegacyFilter]);\n\n const [tfLite, setTfLite] = useState<TFLite>();\n useEffect(() => {\n if (engine !== FilterEngine.TF) return;\n\n loadTFLite({ basePath, modelFilePath, tfFilePath })\n .then(setTfLite)\n .catch((err) => console.error('Failed to load TFLite', err));\n }, [basePath, engine, modelFilePath, tfFilePath]);\n\n const [mediaPipe, setMediaPipe] = useState<ArrayBuffer>();\n useEffect(() => {\n if (engine !== FilterEngine.MEDIA_PIPE) return;\n\n loadMediaPipe({\n basePath: basePath,\n modelPath: modelFilePath,\n })\n .then(setMediaPipe)\n .catch((err) => console.error('Failed to preload MediaPipe', err));\n }, [engine, modelFilePath, basePath]);\n\n const handleError = useCallback(\n (error: any) => {\n console.warn(\n '[filters] Filter encountered an error and will be disabled',\n );\n disableBackgroundFilter();\n onError?.(error);\n },\n [disableBackgroundFilter, onError],\n );\n\n const isReady = useLegacyFilter ? !!tfLite : !!mediaPipe;\n const contextValue: BackgroundFiltersContextValue = {\n isSupported,\n performance,\n isReady,\n isLoading,\n backgroundImage,\n backgroundBlurLevel,\n backgroundFilter,\n disableBackgroundFilter,\n applyBackgroundBlurFilter,\n applyBackgroundImageFilter,\n backgroundImages,\n tfFilePath,\n modelFilePath,\n basePath,\n onError: handleError,\n };\n return (\n <ContextProvider.Provider value={contextValue}>\n {children}\n {isReady && (\n <BackgroundFilters\n api={contextValue}\n tfLite={tfLite}\n engine={engine}\n onStats={handleStats}\n setIsLoading={setIsLoading}\n />\n )}\n </ContextProvider.Provider>\n );\n};\n\nconst BackgroundFilters = (props: {\n api: BackgroundFiltersContextValue;\n tfLite?: TFLite;\n engine: FilterEngine;\n onStats: (stats: PerformanceStats) => void;\n setIsLoading: (loading: boolean) => void;\n}) => {\n const call = useCall();\n const { engine, api, tfLite, onStats, setIsLoading } = props;\n const { children, start } = useRenderer(api, tfLite, call, engine);\n const { onError, backgroundFilter } = api;\n const handleErrorRef = useRef<((error: any) => void) | undefined>(undefined);\n handleErrorRef.current = onError;\n\n const handleStatsRef = useRef<\n ((stats: PerformanceStats) => void) | undefined\n >(undefined);\n handleStatsRef.current = onStats;\n\n useEffect(() => {\n if (!call || !backgroundFilter) return;\n\n setIsLoading(true);\n const { unregister, registered } = call.camera.registerFilter((ms) => {\n return start(\n ms,\n (error) => handleErrorRef.current?.(error),\n (stats: PerformanceStats) => handleStatsRef.current?.(stats),\n );\n });\n registered.finally(() => {\n setIsLoading(false);\n });\n\n return () => {\n unregister().catch((err) => console.warn(`Can't unregister filter`, err));\n };\n }, [call, start, backgroundFilter, setIsLoading]);\n\n return children;\n};\n\nconst useRenderer = (\n api: BackgroundFiltersContextValue,\n tfLite: TFLite | undefined,\n call: Call | undefined,\n engine: FilterEngine,\n) => {\n const {\n backgroundFilter,\n backgroundBlurLevel,\n backgroundImage,\n modelFilePath,\n basePath,\n } = api;\n\n const videoRef = useRef<HTMLVideoElement>(null);\n const canvasRef = useRef<HTMLCanvasElement>(null);\n const bgImageRef = useRef<HTMLImageElement>(null);\n const [videoSize, setVideoSize] = useState<{ width: number; height: number }>(\n {\n width: 1920,\n height: 1080,\n },\n );\n\n const start = useCallback(\n (\n ms: MediaStream,\n onError?: (error: any) => void,\n onStats?: (stats: PerformanceStats) => void,\n ) => {\n let outputStream: MediaStream | undefined;\n let processor: VirtualBackground | undefined;\n let renderer: Renderer | undefined;\n\n const output = new Promise<MediaStream>((resolve, reject) => {\n if (!backgroundFilter) {\n reject(new Error('No filter specified'));\n return;\n }\n\n const videoEl = videoRef.current;\n const canvasEl = canvasRef.current;\n const bgImageEl = bgImageRef.current;\n\n const [track] = ms.getVideoTracks();\n\n if (!track) {\n reject(new Error('No video tracks in input media stream'));\n return;\n }\n\n if (engine === FilterEngine.MEDIA_PIPE) {\n call?.tracer.trace('backgroundFilters.enable', {\n backgroundFilter,\n backgroundBlurLevel,\n backgroundImage,\n engine,\n });\n\n if (!videoEl) {\n reject(new Error('Renderer started before elements are ready'));\n return;\n }\n\n const trackSettings = track.getSettings();\n flushSync(() =>\n setVideoSize({\n width: trackSettings.width ?? 0,\n height: trackSettings.height ?? 0,\n }),\n );\n\n processor = new VirtualBackground(\n track,\n {\n basePath: basePath,\n modelPath: modelFilePath,\n backgroundBlurLevel,\n backgroundImage,\n backgroundFilter,\n },\n { onError, onStats },\n );\n processor\n .start()\n .then((processedTrack) => {\n outputStream = new MediaStream([processedTrack]);\n resolve(outputStream);\n })\n .catch((error) => {\n reject(error);\n });\n\n return;\n }\n\n if (engine === FilterEngine.TF) {\n if (!videoEl || !canvasEl || (backgroundImage && !bgImageEl)) {\n reject(new Error('Renderer started before elements are ready'));\n return;\n }\n\n videoEl.srcObject = ms;\n videoEl.play().then(\n () => {\n const trackSettings = track.getSettings();\n flushSync(() =>\n setVideoSize({\n width: trackSettings.width ?? 0,\n height: trackSettings.height ?? 0,\n }),\n );\n call?.tracer.trace('backgroundFilters.enable', {\n backgroundFilter,\n backgroundBlurLevel,\n backgroundImage,\n engine,\n });\n\n if (!tfLite) {\n reject(new Error('TensorFlow Lite not loaded'));\n return;\n }\n\n renderer = createRenderer(\n tfLite,\n videoEl,\n canvasEl,\n {\n backgroundFilter,\n backgroundBlurLevel,\n backgroundImage: bgImageEl ?? undefined,\n },\n onError,\n );\n outputStream = canvasEl.captureStream();\n\n resolve(outputStream);\n },\n () => {\n reject(new Error('Could not play the source video stream'));\n },\n );\n return;\n }\n\n reject(new Error('No supported engine available'));\n });\n\n return {\n output,\n stop: () => {\n call?.tracer.trace('backgroundFilters.disable', null);\n processor?.stop();\n renderer?.dispose();\n if (videoRef.current) videoRef.current.srcObject = null;\n if (outputStream) disposeOfMediaStream(outputStream);\n },\n };\n },\n [\n backgroundBlurLevel,\n backgroundFilter,\n backgroundImage,\n call?.tracer,\n tfLite,\n engine,\n modelFilePath,\n basePath,\n ],\n );\n\n const children = (\n <div className=\"str-video__background-filters\">\n <video\n className={clsx(\n 'str-video__background-filters__video',\n videoSize.height > videoSize.width &&\n 'str-video__background-filters__video--tall',\n )}\n ref={videoRef}\n playsInline\n muted\n controls={false}\n {...videoSize}\n />\n {backgroundImage && (\n <img\n className=\"str-video__background-filters__background-image\"\n alt=\"Background\"\n ref={bgImageRef}\n crossOrigin=\"anonymous\"\n src={backgroundImage}\n {...videoSize}\n />\n )}\n <canvas\n className=\"str-video__background-filters__target-canvas\"\n {...videoSize}\n ref={canvasRef}\n />\n </div>\n );\n\n return { start, children };\n};\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;AAgCA;;;;AAIG;AACH,MAAM,KAAK,GAAG,GAAG;AACjB,MAAM,WAAW,GAAG,EAAE;AACtB,MAAM,eAAe,GAAG,GAAG;AAC3B,MAAM,mBAAmB,GAAG,CAAC;AAE7B;;AAEG;AACH,IAAK,YAIJ;AAJD,CAAA,UAAK,YAAY,EAAA;AACf,IAAA,YAAA,CAAA,YAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,GAAA,IAAE;AACF,IAAA,YAAA,CAAA,YAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAU;AACV,IAAA,YAAA,CAAA,YAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI;AACN,CAAC,EAJI,YAAY,KAAZ,YAAY,GAAA,EAAA,CAAA,CAAA;AAMjB;;;;;AAKG;AACH,MAAM,eAAe,GAAG,OACtB,eAAoC,EACpC,kBAAuC,EACvC,kBAAuC,KACd;IACzB,IAAI,eAAe,EAAE;AACnB,QAAA,MAAM,qBAAqB,GAAG,MAAM,mBAAmB,CAAC;YACtD,kBAAkB;YAClB,kBAAkB;AACnB,SAAA,CAAC;AACF,QAAA,OAAO,qBAAqB,GAAG,YAAY,CAAC,EAAE,GAAG,YAAY,CAAC,IAAI;IACpE;AAEA,IAAA,MAAM,oBAAoB,GAAG,MAAM,4BAA4B,CAAC;QAC9D,kBAAkB;QAClB,kBAAkB;AACnB,KAAA,CAAC;AAEF,IAAA,OAAO,oBAAoB,GAAG,YAAY,CAAC,UAAU,GAAG,YAAY,CAAC,IAAI;AAC3E,CAAC;AAED;;;;;AAKG;AACI,MAAM,yBAAyB,GAAG,CACvC,KAKC,KACC;IACF,MAA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AC,WAAW,EACvB,GAAG,EAAE,eAAe,EAAA,GAChB,SAAS,EAAA,CACb,CACH,EACDA,GAAA,CAAA,QAAA,EAAA,EACE,SAAS,EAAC,8CAA8C,EAAA,GACpD,SAAS,EACb,GAAG,EAAE,SAAS,EAAA,CACd,CAAA,EAAA,CACE,CACP;AAED,IAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE;AAC5B,CAAC;;;;"}
@@ -14,8 +14,6 @@ var clsx = require('clsx');
14
14
  * and uses two thresholds to avoid flickering near the limit.
15
15
  */
16
16
  const ALPHA = 0.2;
17
- const FPS_WARNING_THRESHOLD_LOWER = 23;
18
- const FPS_WARNING_THRESHOLD_UPPER = 25;
19
17
  const DEFAULT_FPS = 30;
20
18
  const DEVIATION_LIMIT = 0.5;
21
19
  const OUTLIER_PERSISTENCE = 5;
@@ -64,17 +62,16 @@ const BackgroundFiltersProvider = (props) => {
64
62
  const [backgroundBlurLevel, setBackgroundBlurLevel] = react.useState(bgBlurLevelFromProps);
65
63
  const [showLowFpsWarning, setShowLowFpsWarning] = react.useState(false);
66
64
  const [isLoading, setIsLoading] = react.useState(false);
67
- const fpsWarningThresholdLower = performanceThresholds?.fpsWarningThresholdLower ??
68
- FPS_WARNING_THRESHOLD_LOWER;
69
- const fpsWarningThresholdUpper = performanceThresholds?.fpsWarningThresholdUpper ??
70
- FPS_WARNING_THRESHOLD_UPPER;
71
- const defaultFps = performanceThresholds?.defaultFps ?? DEFAULT_FPS;
72
- const emaRef = react.useRef(defaultFps);
65
+ const cameraFrameRate = callStatsReport?.publisherStats?.camera?.frameRate;
66
+ const sourceFps = performanceThresholds?.defaultFps || cameraFrameRate || DEFAULT_FPS;
67
+ const fpsWarningThresholdLower = performanceThresholds?.fpsWarningThresholdLower ?? sourceFps * 0.75;
68
+ const fpsWarningThresholdUpper = performanceThresholds?.fpsWarningThresholdUpper ?? sourceFps * 0.85;
69
+ const emaRef = react.useRef(sourceFps);
73
70
  const outlierStreakRef = react.useRef(0);
74
71
  const handleStats = react.useCallback((stats) => {
75
72
  const fps = stats?.fps;
76
73
  if (fps === undefined || fps === null) {
77
- emaRef.current = defaultFps;
74
+ emaRef.current = sourceFps;
78
75
  outlierStreakRef.current = 0;
79
76
  setShowLowFpsWarning(false);
80
77
  return;
@@ -93,7 +90,7 @@ const BackgroundFiltersProvider = (props) => {
93
90
  return true;
94
91
  return prev;
95
92
  });
96
- }, [fpsWarningThresholdLower, fpsWarningThresholdUpper, defaultFps]);
93
+ }, [fpsWarningThresholdLower, fpsWarningThresholdUpper, sourceFps]);
97
94
  const performance = react.useMemo(() => {
98
95
  if (!backgroundFilter) {
99
96
  return { degraded: false };
@@ -150,10 +147,10 @@ const BackgroundFiltersProvider = (props) => {
150
147
  setBackgroundFilter(undefined);
151
148
  setBackgroundImage(undefined);
152
149
  setBackgroundBlurLevel(undefined);
153
- emaRef.current = defaultFps;
150
+ emaRef.current = sourceFps;
154
151
  outlierStreakRef.current = 0;
155
152
  setShowLowFpsWarning(false);
156
- }, [defaultFps]);
153
+ }, [sourceFps]);
157
154
  const [engine, setEngine] = react.useState(FilterEngine.NONE);
158
155
  const [isSupported, setIsSupported] = react.useState(false);
159
156
  react.useEffect(() => {
@@ -355,4 +352,4 @@ const useRenderer = (api, tfLite, call, engine) => {
355
352
  };
356
353
 
357
354
  exports.BackgroundFiltersProvider = BackgroundFiltersProvider;
358
- //# sourceMappingURL=background-filters-Dlhp-RMH.cjs.js.map
355
+ //# sourceMappingURL=background-filters-Zu84SkRR.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"background-filters-Zu84SkRR.cjs.js","sources":["../../src/components/BackgroundFilters/BackgroundFilters.tsx"],"sourcesContent":["import {\n Context,\n PropsWithChildren,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { flushSync } from 'react-dom';\nimport { useCall, useCallStateHooks } from '@stream-io/video-react-bindings';\nimport { Call, disposeOfMediaStream } from '@stream-io/video-client';\nimport {\n BackgroundBlurLevel,\n createRenderer,\n isMediaPipePlatformSupported,\n isPlatformSupported,\n loadMediaPipe,\n loadTFLite,\n PerformanceStats,\n Renderer,\n TFLite,\n VirtualBackground,\n} from '@stream-io/video-filters-web';\nimport clsx from 'clsx';\nimport type {\n BackgroundFiltersPerformance,\n BackgroundFiltersProps,\n BackgroundFiltersContextValue,\n PerformanceDegradationReason,\n} from './types';\n\n/**\n * Constants for FPS warning calculation.\n * Smooths out quick spikes using an EMA, ignores brief outliers,\n * and uses two thresholds to avoid flickering near the limit.\n */\nconst ALPHA = 0.2;\nconst DEFAULT_FPS = 30;\nconst DEVIATION_LIMIT = 0.5;\nconst OUTLIER_PERSISTENCE = 5;\n\n/**\n * Represents the available background filter processing engines.\n */\nenum FilterEngine {\n TF,\n MEDIA_PIPE,\n NONE,\n}\n\n/**\n * Determines which filter engine is available.\n * MEDIA_PIPE is the default unless legacy filters are requested or MediaPipe is unsupported.\n *\n * Returns NONE if neither is supported.\n */\nconst determineEngine = async (\n useLegacyFilter: boolean | undefined,\n forceSafariSupport: boolean | undefined,\n forceMobileSupport: boolean | undefined,\n): Promise<FilterEngine> => {\n if (useLegacyFilter) {\n const isTfPlatformSupported = await isPlatformSupported({\n forceSafariSupport,\n forceMobileSupport,\n });\n return isTfPlatformSupported ? FilterEngine.TF : FilterEngine.NONE;\n }\n\n const isMediaPipeSupported = await isMediaPipePlatformSupported({\n forceSafariSupport,\n forceMobileSupport,\n });\n\n return isMediaPipeSupported ? FilterEngine.MEDIA_PIPE : FilterEngine.NONE;\n};\n\n/**\n * A provider component that enables the use of background filters in your app.\n *\n * Please make sure you have the `@stream-io/video-filters-web` package installed\n * in your project before using this component.\n */\nexport const BackgroundFiltersProvider = (\n props: PropsWithChildren<BackgroundFiltersProps> & {\n // for code splitting. Prevents circular dependency issues where\n // this Context needs to be present in the main chunk, but also\n // imported by the background filters chunk.\n ContextProvider: Context<BackgroundFiltersContextValue | undefined>;\n },\n) => {\n const {\n ContextProvider,\n children,\n backgroundImages = [],\n backgroundFilter: bgFilterFromProps = undefined,\n backgroundImage: bgImageFromProps = undefined,\n backgroundBlurLevel: bgBlurLevelFromProps = undefined,\n tfFilePath,\n modelFilePath,\n useLegacyFilter,\n basePath,\n onError,\n performanceThresholds,\n forceSafariSupport,\n forceMobileSupport,\n } = props;\n\n const call = useCall();\n const { useCallStatsReport } = useCallStateHooks();\n const callStatsReport = useCallStatsReport();\n\n const [backgroundFilter, setBackgroundFilter] = useState(bgFilterFromProps);\n const [backgroundImage, setBackgroundImage] = useState(bgImageFromProps);\n const [backgroundBlurLevel, setBackgroundBlurLevel] =\n useState(bgBlurLevelFromProps);\n\n const [showLowFpsWarning, setShowLowFpsWarning] = useState<boolean>(false);\n const [isLoading, setIsLoading] = useState<boolean>(false);\n\n const cameraFrameRate = callStatsReport?.publisherStats?.camera?.frameRate;\n\n const sourceFps =\n performanceThresholds?.defaultFps || cameraFrameRate || DEFAULT_FPS;\n\n const fpsWarningThresholdLower =\n performanceThresholds?.fpsWarningThresholdLower ?? sourceFps * 0.75;\n const fpsWarningThresholdUpper =\n performanceThresholds?.fpsWarningThresholdUpper ?? sourceFps * 0.85;\n\n const emaRef = useRef<number>(sourceFps);\n const outlierStreakRef = useRef<number>(0);\n\n const handleStats = useCallback(\n (stats: PerformanceStats) => {\n const fps = stats?.fps;\n if (fps === undefined || fps === null) {\n emaRef.current = sourceFps;\n outlierStreakRef.current = 0;\n setShowLowFpsWarning(false);\n return;\n }\n\n const prevEma = emaRef.current;\n const deviation = Math.abs(fps - prevEma) / prevEma;\n\n const isOutlier = fps < prevEma && deviation > DEVIATION_LIMIT;\n outlierStreakRef.current = isOutlier ? outlierStreakRef.current + 1 : 0;\n if (isOutlier && outlierStreakRef.current < OUTLIER_PERSISTENCE) return;\n\n emaRef.current = ALPHA * fps + (1 - ALPHA) * prevEma;\n\n setShowLowFpsWarning((prev) => {\n if (prev && emaRef.current > fpsWarningThresholdUpper) return false;\n if (!prev && emaRef.current < fpsWarningThresholdLower) return true;\n\n return prev;\n });\n },\n [fpsWarningThresholdLower, fpsWarningThresholdUpper, sourceFps],\n );\n\n const performance: BackgroundFiltersPerformance = useMemo(() => {\n if (!backgroundFilter) {\n return { degraded: false };\n }\n\n const reasons: Array<PerformanceDegradationReason> = [];\n\n if (showLowFpsWarning) {\n reasons.push('frame-drop');\n }\n\n const qualityLimitationReasons =\n callStatsReport?.publisherStats?.qualityLimitationReasons;\n\n if (\n showLowFpsWarning &&\n qualityLimitationReasons &&\n qualityLimitationReasons?.includes('cpu')\n ) {\n reasons.push('cpu-throttling');\n }\n\n return {\n degraded: reasons.length > 0,\n reason: reasons.length > 0 ? reasons : undefined,\n };\n }, [\n showLowFpsWarning,\n callStatsReport?.publisherStats?.qualityLimitationReasons,\n backgroundFilter,\n ]);\n\n const prevDegradedRef = useRef<boolean | undefined>(undefined);\n useEffect(() => {\n const currentDegraded = performance.degraded;\n const prevDegraded = prevDegradedRef.current;\n\n if (\n !!backgroundFilter &&\n prevDegraded !== undefined &&\n prevDegraded !== currentDegraded\n ) {\n call?.tracer.trace('backgroundFilters.performance', {\n degraded: currentDegraded,\n reason: performance?.reason,\n fps: emaRef.current,\n });\n }\n prevDegradedRef.current = currentDegraded;\n }, [\n performanceThresholds,\n performance.degraded,\n performance.reason,\n backgroundFilter,\n call?.tracer,\n ]);\n\n const applyBackgroundImageFilter = useCallback((imageUrl: string) => {\n setBackgroundFilter('image');\n setBackgroundImage(imageUrl);\n }, []);\n\n const applyBackgroundBlurFilter = useCallback(\n (blurLevel: BackgroundBlurLevel = 'high') => {\n setBackgroundFilter('blur');\n setBackgroundBlurLevel(blurLevel);\n },\n [],\n );\n\n const disableBackgroundFilter = useCallback(() => {\n setBackgroundFilter(undefined);\n setBackgroundImage(undefined);\n setBackgroundBlurLevel(undefined);\n\n emaRef.current = sourceFps;\n outlierStreakRef.current = 0;\n setShowLowFpsWarning(false);\n }, [sourceFps]);\n\n const [engine, setEngine] = useState<FilterEngine>(FilterEngine.NONE);\n const [isSupported, setIsSupported] = useState(false);\n useEffect(() => {\n determineEngine(\n useLegacyFilter,\n forceSafariSupport,\n forceMobileSupport,\n ).then((determinedEngine) => {\n setEngine(determinedEngine);\n setIsSupported(determinedEngine !== FilterEngine.NONE);\n });\n }, [forceMobileSupport, forceSafariSupport, useLegacyFilter]);\n\n const [tfLite, setTfLite] = useState<TFLite>();\n useEffect(() => {\n if (engine !== FilterEngine.TF) return;\n\n loadTFLite({ basePath, modelFilePath, tfFilePath })\n .then(setTfLite)\n .catch((err) => console.error('Failed to load TFLite', err));\n }, [basePath, engine, modelFilePath, tfFilePath]);\n\n const [mediaPipe, setMediaPipe] = useState<ArrayBuffer>();\n useEffect(() => {\n if (engine !== FilterEngine.MEDIA_PIPE) return;\n\n loadMediaPipe({\n basePath: basePath,\n modelPath: modelFilePath,\n })\n .then(setMediaPipe)\n .catch((err) => console.error('Failed to preload MediaPipe', err));\n }, [engine, modelFilePath, basePath]);\n\n const handleError = useCallback(\n (error: any) => {\n console.warn(\n '[filters] Filter encountered an error and will be disabled',\n );\n disableBackgroundFilter();\n onError?.(error);\n },\n [disableBackgroundFilter, onError],\n );\n\n const isReady = useLegacyFilter ? !!tfLite : !!mediaPipe;\n const contextValue: BackgroundFiltersContextValue = {\n isSupported,\n performance,\n isReady,\n isLoading,\n backgroundImage,\n backgroundBlurLevel,\n backgroundFilter,\n disableBackgroundFilter,\n applyBackgroundBlurFilter,\n applyBackgroundImageFilter,\n backgroundImages,\n tfFilePath,\n modelFilePath,\n basePath,\n onError: handleError,\n };\n return (\n <ContextProvider.Provider value={contextValue}>\n {children}\n {isReady && (\n <BackgroundFilters\n api={contextValue}\n tfLite={tfLite}\n engine={engine}\n onStats={handleStats}\n setIsLoading={setIsLoading}\n />\n )}\n </ContextProvider.Provider>\n );\n};\n\nconst BackgroundFilters = (props: {\n api: BackgroundFiltersContextValue;\n tfLite?: TFLite;\n engine: FilterEngine;\n onStats: (stats: PerformanceStats) => void;\n setIsLoading: (loading: boolean) => void;\n}) => {\n const call = useCall();\n const { engine, api, tfLite, onStats, setIsLoading } = props;\n const { children, start } = useRenderer(api, tfLite, call, engine);\n const { onError, backgroundFilter } = api;\n const handleErrorRef = useRef<((error: any) => void) | undefined>(undefined);\n handleErrorRef.current = onError;\n\n const handleStatsRef = useRef<\n ((stats: PerformanceStats) => void) | undefined\n >(undefined);\n handleStatsRef.current = onStats;\n\n useEffect(() => {\n if (!call || !backgroundFilter) return;\n\n setIsLoading(true);\n const { unregister, registered } = call.camera.registerFilter((ms) => {\n return start(\n ms,\n (error) => handleErrorRef.current?.(error),\n (stats: PerformanceStats) => handleStatsRef.current?.(stats),\n );\n });\n registered.finally(() => {\n setIsLoading(false);\n });\n\n return () => {\n unregister().catch((err) => console.warn(`Can't unregister filter`, err));\n };\n }, [call, start, backgroundFilter, setIsLoading]);\n\n return children;\n};\n\nconst useRenderer = (\n api: BackgroundFiltersContextValue,\n tfLite: TFLite | undefined,\n call: Call | undefined,\n engine: FilterEngine,\n) => {\n const {\n backgroundFilter,\n backgroundBlurLevel,\n backgroundImage,\n modelFilePath,\n basePath,\n } = api;\n\n const videoRef = useRef<HTMLVideoElement>(null);\n const canvasRef = useRef<HTMLCanvasElement>(null);\n const bgImageRef = useRef<HTMLImageElement>(null);\n const [videoSize, setVideoSize] = useState<{ width: number; height: number }>(\n {\n width: 1920,\n height: 1080,\n },\n );\n\n const start = useCallback(\n (\n ms: MediaStream,\n onError?: (error: any) => void,\n onStats?: (stats: PerformanceStats) => void,\n ) => {\n let outputStream: MediaStream | undefined;\n let processor: VirtualBackground | undefined;\n let renderer: Renderer | undefined;\n\n const output = new Promise<MediaStream>((resolve, reject) => {\n if (!backgroundFilter) {\n reject(new Error('No filter specified'));\n return;\n }\n\n const videoEl = videoRef.current;\n const canvasEl = canvasRef.current;\n const bgImageEl = bgImageRef.current;\n\n const [track] = ms.getVideoTracks();\n\n if (!track) {\n reject(new Error('No video tracks in input media stream'));\n return;\n }\n\n if (engine === FilterEngine.MEDIA_PIPE) {\n call?.tracer.trace('backgroundFilters.enable', {\n backgroundFilter,\n backgroundBlurLevel,\n backgroundImage,\n engine,\n });\n\n if (!videoEl) {\n reject(new Error('Renderer started before elements are ready'));\n return;\n }\n\n const trackSettings = track.getSettings();\n flushSync(() =>\n setVideoSize({\n width: trackSettings.width ?? 0,\n height: trackSettings.height ?? 0,\n }),\n );\n\n processor = new VirtualBackground(\n track,\n {\n basePath: basePath,\n modelPath: modelFilePath,\n backgroundBlurLevel,\n backgroundImage,\n backgroundFilter,\n },\n { onError, onStats },\n );\n processor\n .start()\n .then((processedTrack) => {\n outputStream = new MediaStream([processedTrack]);\n resolve(outputStream);\n })\n .catch((error) => {\n reject(error);\n });\n\n return;\n }\n\n if (engine === FilterEngine.TF) {\n if (!videoEl || !canvasEl || (backgroundImage && !bgImageEl)) {\n reject(new Error('Renderer started before elements are ready'));\n return;\n }\n\n videoEl.srcObject = ms;\n videoEl.play().then(\n () => {\n const trackSettings = track.getSettings();\n flushSync(() =>\n setVideoSize({\n width: trackSettings.width ?? 0,\n height: trackSettings.height ?? 0,\n }),\n );\n call?.tracer.trace('backgroundFilters.enable', {\n backgroundFilter,\n backgroundBlurLevel,\n backgroundImage,\n engine,\n });\n\n if (!tfLite) {\n reject(new Error('TensorFlow Lite not loaded'));\n return;\n }\n\n renderer = createRenderer(\n tfLite,\n videoEl,\n canvasEl,\n {\n backgroundFilter,\n backgroundBlurLevel,\n backgroundImage: bgImageEl ?? undefined,\n },\n onError,\n );\n outputStream = canvasEl.captureStream();\n\n resolve(outputStream);\n },\n () => {\n reject(new Error('Could not play the source video stream'));\n },\n );\n return;\n }\n\n reject(new Error('No supported engine available'));\n });\n\n return {\n output,\n stop: () => {\n call?.tracer.trace('backgroundFilters.disable', null);\n processor?.stop();\n renderer?.dispose();\n if (videoRef.current) videoRef.current.srcObject = null;\n if (outputStream) disposeOfMediaStream(outputStream);\n },\n };\n },\n [\n backgroundBlurLevel,\n backgroundFilter,\n backgroundImage,\n call?.tracer,\n tfLite,\n engine,\n modelFilePath,\n basePath,\n ],\n );\n\n const children = (\n <div className=\"str-video__background-filters\">\n <video\n className={clsx(\n 'str-video__background-filters__video',\n videoSize.height > videoSize.width &&\n 'str-video__background-filters__video--tall',\n )}\n ref={videoRef}\n playsInline\n muted\n controls={false}\n {...videoSize}\n />\n {backgroundImage && (\n <img\n className=\"str-video__background-filters__background-image\"\n alt=\"Background\"\n ref={bgImageRef}\n crossOrigin=\"anonymous\"\n src={backgroundImage}\n {...videoSize}\n />\n )}\n <canvas\n className=\"str-video__background-filters__target-canvas\"\n {...videoSize}\n ref={canvasRef}\n />\n </div>\n );\n\n return { start, children };\n};\n"],"names":["isPlatformSupported","isMediaPipePlatformSupported","useCall","useCallStateHooks","useState","useRef","useCallback","useMemo","useEffect","loadTFLite","loadMediaPipe","_jsxs","_jsx","flushSync","VirtualBackground","createRenderer","disposeOfMediaStream"],"mappings":";;;;;;;;;;AAgCA;;;;AAIG;AACH,MAAM,KAAK,GAAG,GAAG;AACjB,MAAM,WAAW,GAAG,EAAE;AACtB,MAAM,eAAe,GAAG,GAAG;AAC3B,MAAM,mBAAmB,GAAG,CAAC;AAE7B;;AAEG;AACH,IAAK,YAIJ;AAJD,CAAA,UAAK,YAAY,EAAA;AACf,IAAA,YAAA,CAAA,YAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,GAAA,IAAE;AACF,IAAA,YAAA,CAAA,YAAA,CAAA,YAAA,CAAA,GAAA,CAAA,CAAA,GAAA,YAAU;AACV,IAAA,YAAA,CAAA,YAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI;AACN,CAAC,EAJI,YAAY,KAAZ,YAAY,GAAA,EAAA,CAAA,CAAA;AAMjB;;;;;AAKG;AACH,MAAM,eAAe,GAAG,OACtB,eAAoC,EACpC,kBAAuC,EACvC,kBAAuC,KACd;IACzB,IAAI,eAAe,EAAE;AACnB,QAAA,MAAM,qBAAqB,GAAG,MAAMA,mCA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MAAM,QAAQ,IACZL,eAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,+BAA+B,aAC5CC,cAAA,CAAA,OAAA,EAAA,EACE,SAAS,EAAE,IAAI,CACb,sCAAsC,EACtC,SAAS,CAAC,MAAM,GAAG,SAAS,CAAC,KAAK;oBAChC,4CAA4C,CAC/C,EACD,GAAG,EAAE,QAAQ,EACb,WAAW,EAAA,IAAA,EACX,KAAK,EAAA,IAAA,EACL,QAAQ,EAAE,KAAK,EAAA,GACX,SAAS,EAAA,CACb,EACD,eAAe,KACdA,cAAA,CAAA,KAAA,EAAA,EACE,SAAS,EAAC,iDAAiD,EAC3D,GAAG,EAAC,YAAY,EAChB,GAAG,EAAE,UAAU,EACf,WAAW,EAAC,WAAW,EACvB,GAAG,EAAE,eAAe,EAAA,GAChB,SAAS,EAAA,CACb,CACH,EACDA,cAAA,CAAA,QAAA,EAAA,EACE,SAAS,EAAC,8CAA8C,EAAA,GACpD,SAAS,EACb,GAAG,EAAE,SAAS,EAAA,CACd,CAAA,EAAA,CACE,CACP;AAED,IAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE;AAC5B,CAAC;;;;"}
package/dist/index.cjs.js CHANGED
@@ -1013,7 +1013,7 @@ const AvatarFallback = ({ className, names, style, }) => {
1013
1013
  return (jsxRuntime.jsx("div", { className: clsx('str-video__avatar--initials-fallback', className), style: style, children: jsxRuntime.jsxs("div", { children: [names[0][0], names[1]?.[0]] }) }));
1014
1014
  };
1015
1015
 
1016
- const BackgroundFiltersProviderImpl = react.lazy(() => Promise.resolve().then(function () { return require('./background-filters-Dlhp-RMH.cjs.js'); }).then((m) => ({
1016
+ const BackgroundFiltersProviderImpl = react.lazy(() => Promise.resolve().then(function () { return require('./background-filters-Zu84SkRR.cjs.js'); }).then((m) => ({
1017
1017
  default: m.BackgroundFiltersProvider,
1018
1018
  })));
1019
1019
  /**
@@ -1104,7 +1104,7 @@ const Notification = (props) => {
1104
1104
  }, visibilityTimeout);
1105
1105
  return () => clearTimeout(timeout);
1106
1106
  }, [isVisible, resetIsVisible, visibilityTimeout]);
1107
- return (jsxRuntime.jsxs("div", { ref: refs.setReference, children: [isVisible && (jsxRuntime.jsxs("div", { className: clsx('str-video__notification', className), ref: refs.setFloating, style: {
1107
+ return (jsxRuntime.jsxs("div", { className: "str-video__notification-wrapper", ref: refs.setReference, children: [isVisible && (jsxRuntime.jsxs("div", { className: clsx('str-video__notification', className), ref: refs.setFloating, style: {
1108
1108
  position: strategy,
1109
1109
  top: y ?? 0,
1110
1110
  left: x ?? 0,
@@ -1161,6 +1161,22 @@ const RecordingInProgressNotification = ({ children, text, }) => {
1161
1161
  return (jsxRuntime.jsx(Notification, { message: message, iconClassName: "str-video__icon str-video__icon--recording-on", isVisible: isVisible, placement: "top-start", close: () => setVisible(false), children: children }));
1162
1162
  };
1163
1163
 
1164
+ const MicCaptureErrorNotification = ({ children, text, placement, }) => {
1165
+ const call = videoReactBindings.useCall();
1166
+ const { t } = videoReactBindings.useI18n();
1167
+ const [isVisible, setIsVisible] = react.useState(false);
1168
+ react.useEffect(() => {
1169
+ if (!call)
1170
+ return;
1171
+ return call.on('mic.capture_report', (event) => {
1172
+ setIsVisible(!event.capturesAudio);
1173
+ });
1174
+ }, [call]);
1175
+ const message = text ??
1176
+ t('Your microphone is not capturing audio. Please check your setup.');
1177
+ return (jsxRuntime.jsx(Notification, { message: message, isVisible: isVisible, placement: placement, close: () => setIsVisible(false), children: children }));
1178
+ };
1179
+
1164
1180
  const LoadingIndicator = ({ className, type = 'spinner', text, tooltip, }) => {
1165
1181
  return (jsxRuntime.jsxs("div", { className: clsx('str-video__loading-indicator', className), title: tooltip, children: [jsxRuntime.jsx("div", { className: clsx('str-video__loading-indicator__icon', type) }), text && jsxRuntime.jsx("p", { className: "str-video__loading-indicator-text", children: text })] }));
1166
1182
  };
@@ -1510,7 +1526,7 @@ const SpeakerTest = (props) => {
1510
1526
  const audioElementRef = react.useRef(null);
1511
1527
  const [isPlaying, setIsPlaying] = react.useState(false);
1512
1528
  const { t } = videoReactBindings.useI18n();
1513
- const { audioUrl = `https://unpkg.com/${"@stream-io/video-react-sdk"}@${"1.31.7"}/assets/piano.mp3`, } = props;
1529
+ const { audioUrl = `https://unpkg.com/${"@stream-io/video-react-sdk"}@${"1.32.0"}/assets/piano.mp3`, } = props;
1514
1530
  // Update audio output device when selection changes
1515
1531
  react.useEffect(() => {
1516
1532
  const audio = audioElementRef.current;
@@ -1727,7 +1743,7 @@ const CancelCallButton = ({ disabled, caption, onClick, onLeave, }) => {
1727
1743
  return (jsxRuntime.jsx(IconButton, { disabled: disabled, icon: "call-end", variant: "danger", title: caption ?? t('Leave call'), "data-testid": "cancel-call-button", onClick: handleClick }));
1728
1744
  };
1729
1745
 
1730
- const CallControls = ({ onLeave }) => (jsxRuntime.jsxs("div", { className: "str-video__call-controls", children: [jsxRuntime.jsx(videoReactBindings.Restricted, { requiredGrants: [videoClient.OwnCapability.SEND_AUDIO], children: jsxRuntime.jsx(SpeakingWhileMutedNotification, { children: jsxRuntime.jsx(ToggleAudioPublishingButton, {}) }) }), jsxRuntime.jsx(videoReactBindings.Restricted, { requiredGrants: [videoClient.OwnCapability.SEND_VIDEO], children: jsxRuntime.jsx(ToggleVideoPublishingButton, {}) }), jsxRuntime.jsx(videoReactBindings.Restricted, { requiredGrants: [videoClient.OwnCapability.CREATE_REACTION], children: jsxRuntime.jsx(ReactionsButton, {}) }), jsxRuntime.jsx(videoReactBindings.Restricted, { requiredGrants: [videoClient.OwnCapability.SCREENSHARE], children: jsxRuntime.jsx(ScreenShareButton, {}) }), jsxRuntime.jsx(videoReactBindings.Restricted, { requiredGrants: [
1746
+ const CallControls = ({ onLeave }) => (jsxRuntime.jsxs("div", { className: "str-video__call-controls", children: [jsxRuntime.jsx(videoReactBindings.Restricted, { requiredGrants: [videoClient.OwnCapability.SEND_AUDIO], children: jsxRuntime.jsx(MicCaptureErrorNotification, { children: jsxRuntime.jsx(SpeakingWhileMutedNotification, { children: jsxRuntime.jsx(ToggleAudioPublishingButton, {}) }) }) }), jsxRuntime.jsx(videoReactBindings.Restricted, { requiredGrants: [videoClient.OwnCapability.SEND_VIDEO], children: jsxRuntime.jsx(ToggleVideoPublishingButton, {}) }), jsxRuntime.jsx(videoReactBindings.Restricted, { requiredGrants: [videoClient.OwnCapability.CREATE_REACTION], children: jsxRuntime.jsx(ReactionsButton, {}) }), jsxRuntime.jsx(videoReactBindings.Restricted, { requiredGrants: [videoClient.OwnCapability.SCREENSHARE], children: jsxRuntime.jsx(ScreenShareButton, {}) }), jsxRuntime.jsx(videoReactBindings.Restricted, { requiredGrants: [
1731
1747
  videoClient.OwnCapability.START_RECORD_CALL,
1732
1748
  videoClient.OwnCapability.STOP_RECORD_CALL,
1733
1749
  ], children: jsxRuntime.jsx(RecordCallButton, {}) }), jsxRuntime.jsx(CancelCallButton, { onLeave: onLeave })] }));
@@ -2837,7 +2853,7 @@ const ParticipantOverlay = (props) => {
2837
2853
  showLiveBadge ||
2838
2854
  showMuteButton ||
2839
2855
  showSpeakerName;
2840
- const { participant } = useParticipantViewContext();
2856
+ const { participant, participantViewElement } = useParticipantViewContext();
2841
2857
  const { useParticipantCount, useSpeakerState } = videoReactBindings.useCallStateHooks();
2842
2858
  const participantCount = useParticipantCount();
2843
2859
  const duration = useUpdateCallDuration();
@@ -2848,7 +2864,9 @@ const ParticipantOverlay = (props) => {
2848
2864
  return (jsxRuntime.jsx("div", { className: "str-video__livestream-layout__overlay", children: overlayBarVisible && (jsxRuntime.jsxs("div", { className: "str-video__livestream-layout__overlay__bar", children: [showLiveBadge && (jsxRuntime.jsx("span", { className: "str-video__livestream-layout__live-badge", children: t('Live') })), showParticipantCount && (jsxRuntime.jsx("span", { className: "str-video__livestream-layout__viewers-count", children: humanizeParticipantCount
2849
2865
  ? videoClient.humanize(participantCount)
2850
2866
  : participantCount })), showSpeakerName && (jsxRuntime.jsx("span", { className: "str-video__livestream-layout__speaker-name", title: participant.name || participant.userId || '', children: participant.name || participant.userId || '' })), showDuration && (jsxRuntime.jsx("span", { className: "str-video__livestream-layout__duration", children: formatDuration(duration) })), showMuteButton && (jsxRuntime.jsx("span", { className: clsx('str-video__livestream-layout__mute-button', isSpeakerMuted &&
2851
- 'str-video__livestream-layout__mute-button--muted'), onClick: () => speaker.setVolume(isSpeakerMuted ? 1 : 0) })), enableFullScreen && (jsxRuntime.jsx("span", { className: "str-video__livestream-layout__go-fullscreen", onClick: toggleFullScreen }))] })) }));
2867
+ 'str-video__livestream-layout__mute-button--muted'), onClick: () => speaker.setVolume(isSpeakerMuted ? 1 : 0) })), enableFullScreen &&
2868
+ participantViewElement &&
2869
+ typeof participantViewElement.requestFullscreen !== 'undefined' && (jsxRuntime.jsx("span", { className: "str-video__livestream-layout__go-fullscreen", onClick: toggleFullScreen }))] })) }));
2852
2870
  };
2853
2871
  const useUpdateCallDuration = () => {
2854
2872
  const { useIsCallLive, useCallSession } = videoReactBindings.useCallStateHooks();
@@ -3228,7 +3246,7 @@ const checkCanJoinEarly = (startsAt, joinAheadTimeSeconds) => {
3228
3246
  return Date.now() >= +startsAt - (joinAheadTimeSeconds ?? 0) * 1000;
3229
3247
  };
3230
3248
 
3231
- const [major, minor, patch] = ("1.31.7").split('.');
3249
+ const [major, minor, patch] = ("1.32.0").split('.');
3232
3250
  videoClient.setSdkInfo({
3233
3251
  type: videoClient.SfuModels.SdkType.REACT,
3234
3252
  major,
@@ -3278,6 +3296,7 @@ exports.LivestreamPlayer = LivestreamPlayer;
3278
3296
  exports.LoadingCallRecordingListing = LoadingCallRecordingListing;
3279
3297
  exports.LoadingIndicator = LoadingIndicator;
3280
3298
  exports.MenuToggle = MenuToggle;
3299
+ exports.MicCaptureErrorNotification = MicCaptureErrorNotification;
3281
3300
  exports.NoiseCancellationProvider = NoiseCancellationProvider;
3282
3301
  exports.Notification = Notification;
3283
3302
  exports.PaginatedGridLayout = PaginatedGridLayout;