saltfish 0.3.12 → 0.3.13

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.
@@ -3399,7 +3399,9 @@ function setupEventUpdater(eventManager) {
3399
3399
  }
3400
3400
  function handleStateTransitionEvents(eventData, store, eventManager) {
3401
3401
  const { prevPreviousState, previousState, currentState, currentStepId } = eventData;
3402
- if (currentState === "playing" && previousState === "paused" && prevPreviousState === "loading" && store.manifest && currentStepId) {
3402
+ const isNormalPlaylistStart = currentState === "playing" && previousState === "paused" && prevPreviousState === "loading";
3403
+ const isDelayedPlaylistStart = currentState === "playing" && (previousState === "autoplayBlocked" || previousState === "idleMode");
3404
+ if ((isNormalPlaylistStart || isDelayedPlaylistStart) && store.manifest && currentStepId) {
3403
3405
  const isStartingNode = currentStepId === store.manifest.startStep;
3404
3406
  if (isStartingNode) {
3405
3407
  log(`EventUpdater: Triggering playlistStarted event for ${store.manifest.id} (starting node: ${currentStepId})`);
@@ -3478,9 +3480,9 @@ function handleStepEvents(eventData, store, eventManager, prevStepId) {
3478
3480
  }
3479
3481
  }
3480
3482
  const isStepChange = currentStepId !== prevStepId && currentState === "playing";
3481
- const isAutoplayFallbackTransition = previousState === "autoplayBlocked" && currentState === "playing" && prevStepId === currentStepId;
3483
+ const isAutoplayOrIdleModeTransition = (previousState === "autoplayBlocked" || previousState === "idleMode") && currentState === "playing" && prevStepId === currentStepId;
3482
3484
  const isFirstStepOfPlaylist = prevPreviousState === "loading" && previousState === "paused" && currentState === "playing" && currentStepId;
3483
- const shouldTriggerStepStarted = currentStep && store.manifest && (isStepChange || isAutoplayFallbackTransition || isFirstStepOfPlaylist);
3485
+ const shouldTriggerStepStarted = currentStep && store.manifest && (isStepChange || isAutoplayOrIdleModeTransition || isFirstStepOfPlaylist);
3484
3486
  log("EventUpdater.handleStepEvents: Step started check", {
3485
3487
  currentStep: currentStep == null ? void 0 : currentStep.id,
3486
3488
  hasManifest: !!store.manifest
@@ -11243,7 +11245,7 @@ const SaltfishPlayer$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
11243
11245
  __proto__: null,
11244
11246
  SaltfishPlayer
11245
11247
  }, Symbol.toStringTag, { value: "Module" }));
11246
- const version = "0.3.12";
11248
+ const version = "0.3.13";
11247
11249
  const packageJson = {
11248
11250
  version
11249
11251
  };