saltfish 0.2.73 → 0.2.75

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.
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Maximum age in milliseconds for saved progress to be considered valid
3
+ * Progress older than this will be ignored and playlists will start from beginning
4
+ */
5
+ export declare const MAX_PROGRESS_AGE_MS = 6000;
6
+ /**
7
+ * Parses a timestamp from various formats (Firestore, number, etc.)
8
+ * @param progressData - The progress data object containing timestamp information
9
+ * @returns Timestamp in milliseconds, or null if no valid timestamp found
10
+ */
11
+ export declare function parseProgressTimestamp(progressData: any): number | null;
12
+ /**
13
+ * Checks if saved progress is recent enough to be used for resuming playback
14
+ * @param progressData - The progress data object containing timestamp information
15
+ * @param maxAgeMs - Maximum age in milliseconds (defaults to MAX_PROGRESS_AGE_MS)
16
+ * @returns Object with isValid boolean and ageMs number
17
+ */
18
+ export declare function isProgressRecent(progressData: any, maxAgeMs?: number): {
19
+ isValid: boolean;
20
+ ageMs: number | null;
21
+ timestampMs: number | null;
22
+ };
23
+ /**
24
+ * Logs progress validation details for debugging
25
+ * @param playlistId - The playlist ID being checked
26
+ * @param progressData - The progress data object
27
+ * @param context - Context string for the log (e.g., 'PlaylistLoader', 'PlayerInitializationService')
28
+ */
29
+ export declare function logProgressValidation(playlistId: string, progressData: any, context: string): void;
30
+ //# sourceMappingURL=progressUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"progressUtils.d.ts","sourceRoot":"","sources":["../../src/utils/progressUtils.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,mBAAmB,OAAO,CAAC;AAExC;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,GAAG,GAAG,MAAM,GAAG,IAAI,CAuBvE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,GAAG,EACjB,QAAQ,GAAE,MAA4B,GACrC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAexE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,GAAG,EACjB,OAAO,EAAE,MAAM,GACd,IAAI,CAmBN"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saltfish",
3
- "version": "0.2.73",
3
+ "version": "0.2.75",
4
4
  "description": "An interactive video-guided tour system for web applications",
5
5
  "main": "dist/saltfish-playlist-player.umd.js",
6
6
  "types": "dist/index.d.ts",