saltfish 0.2.66 → 0.2.68
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/PlayerInitializationService.d.ts.map +1 -1
- package/dist/managers/TransitionManager.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 +34 -17
- package/dist/saltfish-playlist-player.umd.js +1 -1
- package/package.json +1 -1
|
@@ -2012,9 +2012,16 @@ class PlayerInitializationService {
|
|
|
2012
2012
|
* Check for in-progress playlists and resume them
|
|
2013
2013
|
*/
|
|
2014
2014
|
async checkAndResumeInProgressPlaylist(watchedPlaylists) {
|
|
2015
|
+
var _a;
|
|
2015
2016
|
if (!watchedPlaylists) {
|
|
2016
2017
|
return false;
|
|
2017
2018
|
}
|
|
2019
|
+
const store = useSaltfishStore.getState();
|
|
2020
|
+
const currentManifestId = (_a = store.manifest) == null ? void 0 : _a.id;
|
|
2021
|
+
const currentState = store.currentState;
|
|
2022
|
+
if (currentManifestId && currentState !== "idle" && currentState !== "error") {
|
|
2023
|
+
return false;
|
|
2024
|
+
}
|
|
2018
2025
|
const currentTime = Date.now();
|
|
2019
2026
|
const MAX_AGE_MS = 6e3;
|
|
2020
2027
|
const inProgressEntry = Object.entries(watchedPlaylists).find(([playlistId, status]) => {
|
|
@@ -7836,28 +7843,38 @@ class TransitionManager {
|
|
|
7836
7843
|
* Handles URL changes by checking active URL path transitions and playlist triggers
|
|
7837
7844
|
*/
|
|
7838
7845
|
__publicField(this, "handleURLChange", () => {
|
|
7839
|
-
const isValidUrl = this.validateCurrentStepUrl();
|
|
7840
|
-
if (!isValidUrl) {
|
|
7841
|
-
return;
|
|
7842
|
-
}
|
|
7843
|
-
if (this.triggerManager) {
|
|
7844
|
-
this.triggerManager.evaluateAllTriggers();
|
|
7845
|
-
}
|
|
7846
7846
|
const urlPathTransitions = Array.from(this.activeTransitions.entries()).filter(([_, transition]) => {
|
|
7847
7847
|
var _a;
|
|
7848
7848
|
return ((_a = transition.data) == null ? void 0 : _a.type) === "url-path";
|
|
7849
7849
|
});
|
|
7850
|
-
|
|
7851
|
-
|
|
7850
|
+
let hasValidTransition = false;
|
|
7851
|
+
if (urlPathTransitions.length > 0) {
|
|
7852
|
+
for (const [_, transition] of urlPathTransitions) {
|
|
7853
|
+
if (transition.data && this.isURLPathMatch(transition.data.pattern)) {
|
|
7854
|
+
hasValidTransition = true;
|
|
7855
|
+
break;
|
|
7856
|
+
}
|
|
7857
|
+
}
|
|
7852
7858
|
}
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7859
|
+
if (!hasValidTransition) {
|
|
7860
|
+
const isValidUrl = this.validateCurrentStepUrl();
|
|
7861
|
+
if (!isValidUrl) {
|
|
7862
|
+
return;
|
|
7856
7863
|
}
|
|
7857
|
-
|
|
7858
|
-
|
|
7859
|
-
|
|
7860
|
-
|
|
7864
|
+
}
|
|
7865
|
+
if (this.triggerManager) {
|
|
7866
|
+
this.triggerManager.evaluateAllTriggers();
|
|
7867
|
+
}
|
|
7868
|
+
if (hasValidTransition) {
|
|
7869
|
+
for (const [_, transition] of urlPathTransitions) {
|
|
7870
|
+
if (!transition.data) {
|
|
7871
|
+
continue;
|
|
7872
|
+
}
|
|
7873
|
+
const { pattern, nextStepId } = transition.data;
|
|
7874
|
+
if (this.isURLPathMatch(pattern)) {
|
|
7875
|
+
this.triggerTransition(nextStepId);
|
|
7876
|
+
break;
|
|
7877
|
+
}
|
|
7861
7878
|
}
|
|
7862
7879
|
}
|
|
7863
7880
|
});
|
|
@@ -10676,7 +10693,7 @@ const SaltfishPlayer$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.de
|
|
|
10676
10693
|
__proto__: null,
|
|
10677
10694
|
SaltfishPlayer
|
|
10678
10695
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
10679
|
-
const version = "0.2.
|
|
10696
|
+
const version = "0.2.68";
|
|
10680
10697
|
const packageJson = {
|
|
10681
10698
|
version
|
|
10682
10699
|
};
|