saltfish 0.2.25 → 0.2.26
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/dist/core/services/StateMachineActionHandler.d.ts.map +1 -1
- package/dist/core/stateMachine.d.ts +0 -3
- package/dist/core/stateMachine.d.ts.map +1 -1
- package/dist/core/stateMachineConfig.d.ts.map +1 -1
- package/dist/player.js +2 -2
- package/dist/player.min.js +2 -2
- package/dist/saltfish-playlist-player.es.js +7 -16
- package/dist/saltfish-playlist-player.umd.js +1 -1
- package/package.json +1 -1
|
@@ -722,11 +722,6 @@ class PlayerStateMachine {
|
|
|
722
722
|
}
|
|
723
723
|
},
|
|
724
724
|
logErrorRecovery: () => {
|
|
725
|
-
},
|
|
726
|
-
autoProgressToNextStep: (_context, event) => {
|
|
727
|
-
if ((event == null ? void 0 : event.type) === "VIDEO_FINISHED_CONTINUE") {
|
|
728
|
-
log(`State Machine: Auto-progressing from step: ${event.step.id}`);
|
|
729
|
-
}
|
|
730
725
|
}
|
|
731
726
|
};
|
|
732
727
|
}
|
|
@@ -782,7 +777,7 @@ class PlayerStateMachine {
|
|
|
782
777
|
* @param event - The event to process
|
|
783
778
|
*/
|
|
784
779
|
updateContextFromEvent(event) {
|
|
785
|
-
if (event.type === "TRANSITION_TO_STEP" || event.type === "MANIFEST_LOADED" || event.type === "
|
|
780
|
+
if (event.type === "TRANSITION_TO_STEP" || event.type === "MANIFEST_LOADED" || event.type === "VIDEO_FINISHED_WAIT") {
|
|
786
781
|
this.context.currentStep = event.step;
|
|
787
782
|
} else if (event.type === "ERROR") {
|
|
788
783
|
this.context.error = event.error;
|
|
@@ -856,10 +851,6 @@ const playerStateMachineConfig = {
|
|
|
856
851
|
on: {
|
|
857
852
|
"PAUSE": { target: "paused" },
|
|
858
853
|
"MINIMIZE": { target: "minimized" },
|
|
859
|
-
"VIDEO_FINISHED_CONTINUE": {
|
|
860
|
-
target: "playing",
|
|
861
|
-
actions: ["autoProgressToNextStep"]
|
|
862
|
-
},
|
|
863
854
|
"VIDEO_FINISHED_WAIT": { target: "waitingForInteraction" },
|
|
864
855
|
"AUTOPLAY_FALLBACK": { target: "autoplayBlocked" },
|
|
865
856
|
"TRANSITION_TO_STEP": {
|
|
@@ -2935,13 +2926,13 @@ class StateMachineActionHandler {
|
|
|
2935
2926
|
if (!hasSpecialTransitions) {
|
|
2936
2927
|
log("StateMachineActionHandler: Setting up transitions after video ended");
|
|
2937
2928
|
this.managers.transitionManager.setupTransitions(context.currentStep, true);
|
|
2929
|
+
} else {
|
|
2930
|
+
const store = useSaltfishStore.getState();
|
|
2931
|
+
store.sendStateMachineEvent({
|
|
2932
|
+
type: "VIDEO_FINISHED_WAIT",
|
|
2933
|
+
step: context.currentStep
|
|
2934
|
+
});
|
|
2938
2935
|
}
|
|
2939
|
-
const eventType = hasSpecialTransitions ? "VIDEO_FINISHED_WAIT" : "VIDEO_FINISHED_CONTINUE";
|
|
2940
|
-
const store = useSaltfishStore.getState();
|
|
2941
|
-
store.sendStateMachineEvent({
|
|
2942
|
-
type: eventType,
|
|
2943
|
-
step: context.currentStep
|
|
2944
|
-
});
|
|
2945
2936
|
}
|
|
2946
2937
|
});
|
|
2947
2938
|
log("StateMachineActionHandler: Starting async video load");
|