@scarlett-player/hls 1.8.1 → 1.10.0

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.
@@ -112,6 +112,8 @@ interface HLSLiveInfo {
112
112
  targetLatency: number;
113
113
  /** Drift from live edge */
114
114
  drift: number;
115
+ /** Position to seek to for live sync (seconds from start), when known */
116
+ liveSyncPosition?: number;
115
117
  }
116
118
  /** HLS Plugin interface extending base Plugin */
117
119
  interface IHLSPlugin extends Plugin<HLSPluginConfig> {
@@ -138,29 +140,4 @@ interface IHLSPlugin extends Plugin<HLSPluginConfig> {
138
140
  switchToHlsJs(): Promise<void>;
139
141
  }
140
142
 
141
- /**
142
- * URL sanitizer for error telemetry.
143
- *
144
- * Segment and playlist URLs are the single most useful field when
145
- * diagnosing a dead stream, and the single most dangerous one to hand to a
146
- * consumer's telemetry: signed-URL tokens, HMAC signatures, and session ids
147
- * all live in the query string. Stripping the whole query (and fragment) is
148
- * the privacy-safe default for EVERY consumer; anyone who genuinely needs
149
- * the parameters can subscribe to hls.js directly.
150
- */
151
- /**
152
- * Reduce a URL to origin + pathname, dropping the query string and fragment.
153
- *
154
- * @param url - Raw URL from a provider error, if any
155
- * @returns Sanitized `origin + pathname`, or undefined when there is
156
- * nothing usable to report (absent or unparseable URL)
157
- *
158
- * @example
159
- * ```ts
160
- * sanitizeUrl('https://cdn.example.com/live/x.m3u8?token=secret#frag');
161
- * // 'https://cdn.example.com/live/x.m3u8'
162
- * ```
163
- */
164
- declare function sanitizeUrl(url: string | undefined | null): string | undefined;
165
-
166
- export { type HLSPluginConfig as H, type IHLSPlugin as I, type HLSQualityLevel as a, type HLSError as b, type HLSLiveInfo as c, sanitizeUrl as s };
143
+ export type { HLSPluginConfig as H, IHLSPlugin as I, HLSQualityLevel as a, HLSError as b, HLSLiveInfo as c };
@@ -112,6 +112,8 @@ interface HLSLiveInfo {
112
112
  targetLatency: number;
113
113
  /** Drift from live edge */
114
114
  drift: number;
115
+ /** Position to seek to for live sync (seconds from start), when known */
116
+ liveSyncPosition?: number;
115
117
  }
116
118
  /** HLS Plugin interface extending base Plugin */
117
119
  interface IHLSPlugin extends Plugin<HLSPluginConfig> {
@@ -138,29 +140,4 @@ interface IHLSPlugin extends Plugin<HLSPluginConfig> {
138
140
  switchToHlsJs(): Promise<void>;
139
141
  }
140
142
 
141
- /**
142
- * URL sanitizer for error telemetry.
143
- *
144
- * Segment and playlist URLs are the single most useful field when
145
- * diagnosing a dead stream, and the single most dangerous one to hand to a
146
- * consumer's telemetry: signed-URL tokens, HMAC signatures, and session ids
147
- * all live in the query string. Stripping the whole query (and fragment) is
148
- * the privacy-safe default for EVERY consumer; anyone who genuinely needs
149
- * the parameters can subscribe to hls.js directly.
150
- */
151
- /**
152
- * Reduce a URL to origin + pathname, dropping the query string and fragment.
153
- *
154
- * @param url - Raw URL from a provider error, if any
155
- * @returns Sanitized `origin + pathname`, or undefined when there is
156
- * nothing usable to report (absent or unparseable URL)
157
- *
158
- * @example
159
- * ```ts
160
- * sanitizeUrl('https://cdn.example.com/live/x.m3u8?token=secret#frag');
161
- * // 'https://cdn.example.com/live/x.m3u8'
162
- * ```
163
- */
164
- declare function sanitizeUrl(url: string | undefined | null): string | undefined;
165
-
166
- export { type HLSPluginConfig as H, type IHLSPlugin as I, type HLSQualityLevel as a, type HLSError as b, type HLSLiveInfo as c, sanitizeUrl as s };
143
+ export type { HLSPluginConfig as H, IHLSPlugin as I, HLSQualityLevel as a, HLSError as b, HLSLiveInfo as c };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scarlett-player/hls",
3
- "version": "1.8.1",
3
+ "version": "1.10.0",
4
4
  "description": "HLS Provider Plugin for Scarlett Player",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -37,7 +37,7 @@
37
37
  "vitest": "^1.6.0",
38
38
  "@vitest/coverage-v8": "^1.6.0",
39
39
  "jsdom": "^24.0.0",
40
- "@scarlett-player/core": "1.8.1"
40
+ "@scarlett-player/core": "1.10.0"
41
41
  },
42
42
  "keywords": [
43
43
  "video",