saltfish 0.2.36 → 0.2.38

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.
@@ -2956,12 +2956,10 @@ class StateMachineActionHandler {
2956
2956
  });
2957
2957
  log("StateMachineActionHandler: Starting async video load");
2958
2958
  const loadTranscriptForStep = () => {
2959
- var _a, _b, _c;
2959
+ var _a, _b;
2960
2960
  const store = useSaltfishStore.getState();
2961
- const currentPlaylistId = (_a = store.manifest) == null ? void 0 : _a.id;
2962
- const currentPlaylist = (_b = store.backendPlaylists) == null ? void 0 : _b.find((p) => p.id === currentPlaylistId);
2963
- const captionsEnabled = (currentPlaylist == null ? void 0 : currentPlaylist.captions) === true;
2964
- const language = (_c = store.userData) == null ? void 0 : _c.language;
2961
+ const captionsEnabled = ((_a = store.manifest) == null ? void 0 : _a.captions) ?? true;
2962
+ const language = (_b = store.userData) == null ? void 0 : _b.language;
2965
2963
  let transcript = currentStep.transcript;
2966
2964
  if (language && currentStep.translations && currentStep.translations[language]) {
2967
2965
  const translatedTranscript = currentStep.translations[language].transcript;
@@ -3065,7 +3063,7 @@ class StateMachineActionHandler {
3065
3063
  });
3066
3064
  log("StateMachineActionHandler: Starting async idle mode video load");
3067
3065
  this.managers.videoManager.loadVideo(videoUrl).then(() => {
3068
- var _a, _b, _c;
3066
+ var _a, _b;
3069
3067
  log("StateMachineActionHandler: Idle mode video loaded successfully, configuring for ambient playback");
3070
3068
  const videoElement = this.managers.videoManager.getVideoElement();
3071
3069
  if (videoElement) {
@@ -3076,10 +3074,8 @@ class StateMachineActionHandler {
3076
3074
  });
3077
3075
  }
3078
3076
  const store = useSaltfishStore.getState();
3079
- const currentPlaylistId = (_a = store.manifest) == null ? void 0 : _a.id;
3080
- const currentPlaylist = (_b = store.backendPlaylists) == null ? void 0 : _b.find((p) => p.id === currentPlaylistId);
3081
- const captionsEnabled = (currentPlaylist == null ? void 0 : currentPlaylist.captions) === true;
3082
- const language = (_c = store.userData) == null ? void 0 : _c.language;
3077
+ const captionsEnabled = ((_a = store.manifest) == null ? void 0 : _a.captions) ?? true;
3078
+ const language = (_b = store.userData) == null ? void 0 : _b.language;
3083
3079
  let transcript = currentStep.transcript;
3084
3080
  if (language && currentStep.translations && currentStep.translations[language]) {
3085
3081
  const translation = currentStep.translations[language];
@@ -3994,7 +3990,6 @@ const _TranscriptManager = class _TranscriptManager {
3994
3990
  }
3995
3991
  this.currentTranscript = transcript;
3996
3992
  if (transcript) {
3997
- this.updateCCButtonState(true);
3998
3993
  this.createTranscriptUI();
3999
3994
  this.chunks = transcript.chunks || [];
4000
3995
  this.isNewVideo = true;
@@ -4005,8 +4000,9 @@ const _TranscriptManager = class _TranscriptManager {
4005
4000
  log(`TranscriptManager: Using user preference for captions: ${this.isVisible}`);
4006
4001
  } else {
4007
4002
  this.isVisible = initiallyVisible;
4008
- log(`TranscriptManager: Using backend setting for captions: ${this.isVisible}`);
4003
+ log(`TranscriptManager: Using manifest setting for captions: ${this.isVisible}`);
4009
4004
  }
4005
+ this.updateCCButtonState(true);
4010
4006
  if (this.isVisible) {
4011
4007
  this.showTranscript();
4012
4008
  } else {
@@ -10304,7 +10300,7 @@ const SaltfishPlayer$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
10304
10300
  __proto__: null,
10305
10301
  SaltfishPlayer
10306
10302
  }, Symbol.toStringTag, { value: "Module" }));
10307
- const version = "0.2.36";
10303
+ const version = "0.2.38";
10308
10304
  const packageJson = {
10309
10305
  version
10310
10306
  };