@geekapps/silo-elements-nextjs 0.2.45 → 0.2.47

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.
@@ -182,6 +182,12 @@ function Video({
182
182
  setSubtitleMode(initialSubtitleMode);
183
183
  }
184
184
  }, [subtitleMode, captions, initialSubtitleMode]);
185
+ useEffect(() => {
186
+ if (subtitleMode === "off" && initialSubtitleMode !== "off") {
187
+ setSubtitleMode(initialSubtitleMode);
188
+ setSubtitleStyle((st) => ({ ...st, track: initialSubtitleMode }));
189
+ }
190
+ }, [initialSubtitleMode]);
185
191
  useEffect(() => {
186
192
  const video = videoRef.current;
187
193
  if (!video) return;