@stream-io/video-react-sdk 1.37.0 → 1.37.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/video-react-sdk",
3
- "version": "1.37.0",
3
+ "version": "1.37.2",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.es.js",
6
6
  "types": "./dist/index.d.ts",
@@ -60,7 +60,7 @@
60
60
  "@rollup/plugin-json": "^6.1.0",
61
61
  "@rollup/plugin-replace": "^6.0.2",
62
62
  "@rollup/plugin-typescript": "^12.1.4",
63
- "@stream-io/audio-filters-web": "^0.8.0",
63
+ "@stream-io/audio-filters-web": "^0.8.1",
64
64
  "@stream-io/video-styling": "^1.14.0",
65
65
  "@types/react": "~19.1.17",
66
66
  "@types/react-dom": "~19.1.11",
@@ -195,13 +195,29 @@ export const BackstageLayout = (props: BackstageLayoutProps) => {
195
195
  const participantCount = useParticipantCount();
196
196
  const startsAt = useCallStartsAt();
197
197
  const { t } = useI18n();
198
+ const [startsAtPassed, setStartsAtPassed] = useState(
199
+ () => !!startsAt && startsAt.getTime() < Date.now(),
200
+ );
201
+
202
+ useEffect(() => {
203
+ if (!startsAt || startsAtPassed) return;
204
+
205
+ const check = () => {
206
+ if (startsAt.getTime() < Date.now()) {
207
+ setStartsAtPassed(true);
208
+ }
209
+ };
210
+
211
+ const interval = setInterval(check, 1000);
212
+ return () => clearInterval(interval);
213
+ }, [startsAt, startsAtPassed]);
198
214
 
199
215
  return (
200
216
  <div className="str-video__livestream-layout__wrapper">
201
217
  <div className="str-video__livestream-layout__backstage">
202
218
  {startsAt && (
203
219
  <span className="str-video__livestream-layout__starts-at">
204
- {startsAt.getTime() < Date.now()
220
+ {startsAtPassed
205
221
  ? t('Livestream starts soon')
206
222
  : t('Livestream starts at {{ time }}', {
207
223
  time: startsAt.toLocaleTimeString([], {