supervision 0.1.4 → 0.1.6

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.
Files changed (71) hide show
  1. package/dist/index.d.ts +12 -4
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +864 -127
  4. package/dist/index.js.map +1 -1
  5. package/dist/mask-preparation.worker.js +91 -59
  6. package/dist/mask-preparation.worker.js.map +1 -1
  7. package/dist/media/media-errors.d.ts +32 -0
  8. package/dist/media/media-errors.d.ts.map +1 -0
  9. package/dist/media/media-source-state.d.ts.map +1 -1
  10. package/dist/media/media-stream-media-source.d.ts +31 -0
  11. package/dist/media/media-stream-media-source.d.ts.map +1 -1
  12. package/dist/media/mediabunny-media-source.d.ts.map +1 -1
  13. package/dist/media/presentation-timeline-media-source.d.ts +17 -0
  14. package/dist/media/presentation-timeline-media-source.d.ts.map +1 -0
  15. package/dist/media/static-image-media-source.d.ts.map +1 -1
  16. package/dist/post-processing/default-tracking-worker.d.ts +3 -0
  17. package/dist/post-processing/default-tracking-worker.d.ts.map +1 -0
  18. package/dist/post-processing/detection-post-processing-pipeline.d.ts +7 -0
  19. package/dist/post-processing/detection-post-processing-pipeline.d.ts.map +1 -0
  20. package/dist/post-processing/embedded-tracking-worker.d.ts +2 -0
  21. package/dist/post-processing/embedded-tracking-worker.d.ts.map +1 -0
  22. package/dist/post-processing/tracking-worker-protocol.d.ts +29 -0
  23. package/dist/post-processing/tracking-worker-protocol.d.ts.map +1 -0
  24. package/dist/post-processing/tracking.worker.d.ts +2 -0
  25. package/dist/post-processing/tracking.worker.d.ts.map +1 -0
  26. package/dist/renderers/media-renderer-core.d.ts.map +1 -1
  27. package/dist/renderers/media-renderer-state.d.ts.map +1 -1
  28. package/dist/sessions/media-session-detections.d.ts.map +1 -1
  29. package/dist/sessions/media-session.d.ts +2 -2
  30. package/dist/sessions/media-session.d.ts.map +1 -1
  31. package/dist/tracking.worker.js +1509 -0
  32. package/dist/tracking.worker.js.map +1 -0
  33. package/dist/types/detection-post-processing.d.ts +62 -0
  34. package/dist/types/detection-post-processing.d.ts.map +1 -0
  35. package/dist/types/media-session.d.ts +57 -1
  36. package/dist/types/media-session.d.ts.map +1 -1
  37. package/dist/workers/worker-rpc-client.d.ts +2 -1
  38. package/dist/workers/worker-rpc-client.d.ts.map +1 -1
  39. package/node_modules/supervision-js-core/dist/detections/composite-detection-frame-source.d.ts.map +1 -1
  40. package/node_modules/supervision-js-core/dist/detections/memory-cold-detection-frame-store.d.ts.map +1 -1
  41. package/node_modules/supervision-js-core/dist/detections/projected-detection-frame-source.d.ts +22 -0
  42. package/node_modules/supervision-js-core/dist/detections/projected-detection-frame-source.d.ts.map +1 -0
  43. package/node_modules/supervision-js-core/dist/detections/writable-detection-frame-source.d.ts +2 -7
  44. package/node_modules/supervision-js-core/dist/detections/writable-detection-frame-source.d.ts.map +1 -1
  45. package/node_modules/supervision-js-core/dist/index.d.ts +11 -3
  46. package/node_modules/supervision-js-core/dist/index.d.ts.map +1 -1
  47. package/node_modules/supervision-js-core/dist/index.js +2289 -329
  48. package/node_modules/supervision-js-core/dist/index.js.map +1 -1
  49. package/node_modules/supervision-js-core/dist/post-processing/byte-track-tracker.d.ts +4 -0
  50. package/node_modules/supervision-js-core/dist/post-processing/byte-track-tracker.d.ts.map +1 -0
  51. package/node_modules/supervision-js-core/dist/post-processing/cbiou-tracker.d.ts +4 -0
  52. package/node_modules/supervision-js-core/dist/post-processing/cbiou-tracker.d.ts.map +1 -0
  53. package/node_modules/supervision-js-core/dist/post-processing/oc-sort-tracker.d.ts +4 -0
  54. package/node_modules/supervision-js-core/dist/post-processing/oc-sort-tracker.d.ts.map +1 -0
  55. package/node_modules/supervision-js-core/dist/post-processing/sort-tracker.d.ts +4 -0
  56. package/node_modules/supervision-js-core/dist/post-processing/sort-tracker.d.ts.map +1 -0
  57. package/node_modules/supervision-js-core/dist/post-processing/tracking.d.ts +9 -0
  58. package/node_modules/supervision-js-core/dist/post-processing/tracking.d.ts.map +1 -0
  59. package/node_modules/supervision-js-core/dist/types/detection-timeline.d.ts +113 -3
  60. package/node_modules/supervision-js-core/dist/types/detection-timeline.d.ts.map +1 -1
  61. package/node_modules/supervision-js-core/dist/types/detections.d.ts +33 -3
  62. package/node_modules/supervision-js-core/dist/types/detections.d.ts.map +1 -1
  63. package/node_modules/supervision-js-core/dist/types/media-rendering.d.ts +31 -0
  64. package/node_modules/supervision-js-core/dist/types/media-rendering.d.ts.map +1 -1
  65. package/node_modules/supervision-js-core/dist/types/post-processing.d.ts +148 -0
  66. package/node_modules/supervision-js-core/dist/types/post-processing.d.ts.map +1 -0
  67. package/node_modules/supervision-js-core/dist/utils/detection-frames.d.ts.map +1 -1
  68. package/node_modules/supervision-js-core/dist/utils/detection-projection.d.ts +20 -0
  69. package/node_modules/supervision-js-core/dist/utils/detection-projection.d.ts.map +1 -0
  70. package/node_modules/supervision-js-core/package.json +12 -5
  71. package/package.json +7 -2
@@ -0,0 +1,32 @@
1
+ import { MediaErrorKind } from "supervision-js-core";
2
+ /**
3
+ * A media failure with a stable, documented kind.
4
+ *
5
+ * Branch on `kind` instead of matching decoder, demuxer, or container message
6
+ * text. `message` stays diagnostic and may name vendor internals; applications
7
+ * own their user-facing copy. The originating failure is preserved on `cause`.
8
+ */
9
+ export declare class MediaSourceError extends Error {
10
+ readonly kind: MediaErrorKind;
11
+ constructor(kind: MediaErrorKind, message: string, options?: {
12
+ readonly cause?: unknown;
13
+ });
14
+ }
15
+ export declare function isMediaSourceError(value: unknown): value is MediaSourceError;
16
+ /**
17
+ * Classifies an arbitrary media failure into a `MediaSourceError`.
18
+ *
19
+ * Already-classified errors pass through so a kind chosen at the point of
20
+ * failure is never downgraded by a broader message match. Anything the
21
+ * heuristics cannot place stays representable as `Unknown` rather than being
22
+ * forced into a wrong kind.
23
+ */
24
+ export declare function toMediaSourceError(error: unknown, fallbackMessage?: string): MediaSourceError;
25
+ /**
26
+ * Failure kind of any caught media failure.
27
+ *
28
+ * A `MediaSourceError` reports the kind chosen where it failed. Anything else
29
+ * is classified from its message, and stays `Unknown` when no kind fits.
30
+ */
31
+ export declare function getMediaErrorKind(error: unknown): MediaErrorKind;
32
+ //# sourceMappingURL=media-errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media-errors.d.ts","sourceRoot":"","sources":["../../src/media/media-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAQrD;;;;;;GAMG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;gBAG5B,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE;CAMzC;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAE5E;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,OAAO,EACd,eAAe,SAAyB,GACvC,gBAAgB,CAUlB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,CAEhE"}
@@ -1 +1 @@
1
- {"version":3,"file":"media-source-state.d.ts","sourceRoot":"","sources":["../../src/media/media-source-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAEjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,wBAAgB,6BAA6B,IAAI,gBAAgB,CAkBhE;AAED,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,0BAA0B,GACnC,gBAAgB,CAkBlB"}
1
+ {"version":3,"file":"media-source-state.d.ts","sourceRoot":"","sources":["../../src/media/media-source-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AAEjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,wBAAgB,6BAA6B,IAAI,gBAAgB,CAmBhE;AAED,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,0BAA0B,GACnC,gBAAgB,CAmBlB"}
@@ -1,5 +1,36 @@
1
1
  import type { MediaRendererSource } from "#types/media-renderer";
2
+ /**
3
+ * Renderer-neutral metadata for one frame the browser actually presented.
4
+ *
5
+ * `mediaTime` is on the same timeline the session reports, so a host can
6
+ * correlate transport-side results with what is on screen. Every other field
7
+ * is optional because browsers differ in what `requestVideoFrameCallback`
8
+ * reports; absent fields are normal and must not break rendering. No DOM
9
+ * element or vendor object is exposed.
10
+ */
11
+ export type MediaStreamPresentedFrame = {
12
+ /** Presentation time on the session media timeline, in seconds. */
13
+ readonly mediaTime: number;
14
+ /** RTP timestamp the sender stamped this frame with, when reported. */
15
+ readonly rtpTimestamp?: number;
16
+ /** Frame width in pixels, when reported. */
17
+ readonly width?: number;
18
+ /** Frame height in pixels, when reported. */
19
+ readonly height?: number;
20
+ /** `performance.now()` time the user agent submitted the frame, when reported. */
21
+ readonly presentationTime?: number;
22
+ /** `performance.now()` time the frame is expected to be visible, when reported. */
23
+ readonly expectedDisplayTime?: number;
24
+ };
2
25
  export type MediaStreamRendererSourceOptions = {
26
+ /**
27
+ * Receives metadata for each presented frame, before the snapshot is taken.
28
+ *
29
+ * Called synchronously from the browser frame callback so wall-clock
30
+ * correlation stays accurate. Keep the handler cheap; a handler that throws
31
+ * is ignored and does not interrupt playback.
32
+ */
33
+ readonly onPresentedFrame?: (frame: MediaStreamPresentedFrame) => void;
3
34
  /** Maximum decoded snapshots retained while the renderer is catching up. */
4
35
  readonly maxBufferedFrames?: number;
5
36
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"media-stream-media-source.d.ts","sourceRoot":"","sources":["../../src/media/media-stream-media-source.ts"],"names":[],"mappings":"AAKA,O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;;OAKG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC;IACnD;;;;OAIG;IACH,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACxC,CAAC;AAaF;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,WAAW,EACnB,OAAO,GAAE,gCAAqC,GAC7C,mBAAmB,CAMrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"mediabunny-media-source.d.ts","sourceRoot":"","sources":["../../src/media/mediabunny-media-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEtD,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,WAAW,EAAE,CAAC;IAC1C,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAClB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACnC,CAAC;IACF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAID,wBAAsB,yBAAyB,CAC7C,WAAW,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,GAAG,0BAA0B,GAC/D,OAAO,CAAC,kBAAkB,CAAC,CA+F7B;AAYD,wBAAgB,mCAAmC,CACjD,WAAW,EAAE,0BAA0B,GACtC,mBAAmB,CAMrB"}
1
+ {"version":3,"file":"mediabunny-media-source.d.ts","sourceRoot":"","sources":["../../src/media/mediabunny-media-source.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEtD,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,WAAW,EAAE,CAAC;IAC1C,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAClB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACnC,CAAC;IACF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAID,wBAAsB,yBAAyB,CAC7C,WAAW,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,GAAG,0BAA0B,GAC/D,OAAO,CAAC,kBAAkB,CAAC,CA6F7B;AAkCD,wBAAgB,mCAAmC,CACjD,WAAW,EAAE,0BAA0B,GACtC,mBAAmB,CAMrB"}
@@ -0,0 +1,17 @@
1
+ import type { DecodedMediaSource } from "#media/media-source";
2
+ /**
3
+ * Normalizes a decoded media source onto a zero-based presentation timeline.
4
+ *
5
+ * Media trimmed through an edit list — B-frame pre-roll is the common case —
6
+ * carries a few decodable samples ahead of presentation time zero, and the
7
+ * container reports a negative first timestamp for them. Those samples are not
8
+ * meant to be presented, but a renderer that starts its clock at the reported
9
+ * first timestamp would show negative session time and would look for
10
+ * detections outside `[0, duration]`, where no producer writes them.
11
+ *
12
+ * This reports the presentation start as the first timestamp, drops samples
13
+ * that end before zero, and presents the sample straddling zero at zero.
14
+ * Sources that already start at or after zero are returned unchanged.
15
+ */
16
+ export declare function normalizeMediaSourcePresentationTimeline(source: DecodedMediaSource): DecodedMediaSource;
17
+ //# sourceMappingURL=presentation-timeline-media-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presentation-timeline-media-source.d.ts","sourceRoot":"","sources":["../../src/media/presentation-timeline-media-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAGnB,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wCAAwC,CACtD,MAAM,EAAE,kBAAkB,GACzB,kBAAkB,CAUpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"static-image-media-source.d.ts","sourceRoot":"","sources":["../../src/media/static-image-media-source.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,MAAM,MAAM,iBAAiB,GACzB,gBAAgB,GAChB,WAAW,GACX,iBAAiB,GACjB,eAAe,GACf,UAAU,CAAC;AAEf,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,IAAI,CACF,OAAO,EAAE,wBAAwB,GAAG,iCAAiC,EACrE,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACd,IAAI,CAAC;CACT;AAED,iFAAiF;AACjF,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,iBAAiB,GAAG,eAAe,GAC1C,mBAAmB,CAkBrB;AAED,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,MAAM,EACX,OAAO,GAAE;IAAE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO,GAC9C,mBAAmB,CAMrB"}
1
+ {"version":3,"file":"static-image-media-source.d.ts","sourceRoot":"","sources":["../../src/media/static-image-media-source.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAIjE,MAAM,MAAM,iBAAiB,GACzB,gBAAgB,GAChB,WAAW,GACX,iBAAiB,GACjB,eAAe,GACf,UAAU,CAAC;AAEf,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,IAAI,CACF,OAAO,EAAE,wBAAwB,GAAG,iCAAiC,EACrE,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACd,IAAI,CAAC;CACT;AAED,iFAAiF;AACjF,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,iBAAiB,GAAG,eAAe,GAC1C,mBAAmB,CAwBrB;AAED,wBAAgB,yBAAyB,CACvC,GAAG,EAAE,MAAM,EACX,OAAO,GAAE;IAAE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO,GAC9C,mBAAmB,CAMrB"}
@@ -0,0 +1,3 @@
1
+ import type { DetectionPostProcessingWorkerFactory } from "#types/detection-post-processing";
2
+ export declare function createDefaultDetectionPostProcessingWorkerFactory(): DetectionPostProcessingWorkerFactory;
3
+ //# sourceMappingURL=default-tracking-worker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-tracking-worker.d.ts","sourceRoot":"","sources":["../../src/post-processing/default-tracking-worker.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,kCAAkC,CAAC;AAK7F,wBAAgB,iDAAiD,IAAI,oCAAoC,CAYxG"}
@@ -0,0 +1,7 @@
1
+ import { type DetectionPostProcessingPipeline, type DetectionPostProcessingPipelineOptions } from "#types/detection-post-processing";
2
+ /**
3
+ * Creates an ordered, bounded stream processor for detections arriving out of
4
+ * order. Stateful processors run serially; the renderer remains independent.
5
+ */
6
+ export declare function createDetectionPostProcessingPipeline(options: DetectionPostProcessingPipelineOptions): DetectionPostProcessingPipeline;
7
+ //# sourceMappingURL=detection-post-processing-pipeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detection-post-processing-pipeline.d.ts","sourceRoot":"","sources":["../../src/post-processing/detection-post-processing-pipeline.ts"],"names":[],"mappings":"AAkBA,OAAO,EAIL,KAAK,+BAA+B,EACpC,KAAK,sCAAsC,EAE5C,MAAM,kCAAkC,CAAC;AAmB1C;;;GAGG;AACH,wBAAgB,qCAAqC,CACnD,OAAO,EAAE,sCAAsC,GAC9C,+BAA+B,CAkNjC"}
@@ -0,0 +1,2 @@
1
+ export declare const EMBEDDED_TRACKING_WORKER_SOURCE = "__SUPERVISION_JS_EMBEDDED_TRACKING_WORKER_SOURCE__";
2
+ //# sourceMappingURL=embedded-tracking-worker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embedded-tracking-worker.d.ts","sourceRoot":"","sources":["../../src/post-processing/embedded-tracking-worker.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,+BAA+B,uDACU,CAAC"}
@@ -0,0 +1,29 @@
1
+ import type { TrackingAssignment, TrackingDetectionPostProcessor, TrackingProjection } from "supervision-js-core";
2
+ import type { WorkerRpcMessage } from "#workers/worker-rpc-client";
3
+ export type TrackingWorkerRequest = TrackingWorkerConfigureRequest | TrackingWorkerProcessRequest | TrackingWorkerResetRequest;
4
+ export interface TrackingWorkerConfigureRequest extends WorkerRpcMessage {
5
+ readonly type: "configure";
6
+ readonly processor: TrackingDetectionPostProcessor;
7
+ }
8
+ export interface TrackingWorkerProcessRequest extends WorkerRpcMessage {
9
+ readonly type: "process";
10
+ readonly detections: readonly TrackingProjection[];
11
+ readonly frameIndex: number;
12
+ }
13
+ export interface TrackingWorkerResetRequest extends WorkerRpcMessage {
14
+ readonly type: "reset";
15
+ }
16
+ export type TrackingWorkerResponse = TrackingWorkerSuccessResponse | TrackingWorkerErrorResponse;
17
+ export interface TrackingWorkerSuccessResponse extends WorkerRpcMessage {
18
+ readonly type: "success";
19
+ readonly activeTrackCount?: number;
20
+ readonly assignments?: readonly TrackingAssignment[];
21
+ readonly confirmedTrackCount?: number;
22
+ readonly durationMs?: number;
23
+ }
24
+ export interface TrackingWorkerErrorResponse extends WorkerRpcMessage {
25
+ readonly type: "error";
26
+ readonly message: string;
27
+ }
28
+ export declare function isTrackingWorkerResponse(value: unknown): value is TrackingWorkerResponse;
29
+ //# sourceMappingURL=tracking-worker-protocol.d.ts.map
@@ -0,0 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EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,sBAAsB,CAQjC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=tracking.worker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracking.worker.d.ts","sourceRoot":"","sources":["../../src/post-processing/tracking.worker.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"media-renderer-core.d.ts","sourceRoot":"","sources":["../../src/renderers/media-renderer-core.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,kBAAkB,EAInB,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,oBAAoB,EAE1B,MAAM,uBAAuB,CAAC;AAU/B,OAAO,KAAK,EACV,kBAAkB,EAClB,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AAEhC,MAAM,WAAW,0BAA0B;IACzC,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC1E,WAAW,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;CAC9E;AAED,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,oBAAoB,EAC7B,SAAS,EAAE,0BAA0B,GACpC,OAAO,CAAC,aAAa,CAAC,CAqmBxB"}
1
+ {"version":3,"file":"media-renderer-core.d.ts","sourceRoot":"","sources":["../../src/renderers/media-renderer-core.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EACV,kBAAkB,EAInB,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,oBAAoB,EAE1B,MAAM,uBAAuB,CAAC;AAU/B,OAAO,KAAK,EACV,kBAAkB,EAClB,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AAEhC,MAAM,WAAW,0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AAC,mBAAmB,EAAE,SAAS,uBAAuB,EAAE,CAAC;CAClE;AAED,wBAAsB,wBAAwB,CAAC,OAAO,EAAE;IACtD,QAAQ,CAAC,UAAU,EAAE,4BAA4B,GAAG,SAAS,CAAC;IAC9D,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;CAC5C,GAAG,OAAO,CAAC,yBAAyB,CAAC,CA2ErC"}
1
+ {"version":3,"file":"media-session-detections.d.ts","sourceRoot":"","sources":["../../src/sessions/media-session-detections.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAEV,oBAAoB,EACpB,4BAA4B,EAC7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAEV,4BAA4B,EAE5B,mBAAmB,EACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAGnE,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,eAAe,CAAC,EAAE,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;IACnE,QAAQ,CAAC,eAAe,CAAC,EACvB,oBAAoB,GAAG,4BAA4B,CAAC;IACtD,QAAQ,CAAC,gBAAgB,CAAC,EAAE,4BAA4B,CAAC;IACzD,QAAQ,CAAC,iBAAiB,EAAE,WAAW,CAAC,MAAM,EAAE,4BAA4B,CAAC,CAAC;IAC9E,QAAQ,CAAC,mBAAmB,EAAE,SAAS,uBAAuB,EAAE,CAAC;CAClE;AAED,wBAAsB,wBAAwB,CAAC,OAAO,EAAE;IACtD,QAAQ,CAAC,UAAU,EAAE,4BAA4B,GAAG,SAAS,CAAC;IAC9D,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;CAC5C,GAAG,OAAO,CAAC,yBAAyB,CAAC,CA4ErC"}
@@ -1,4 +1,4 @@
1
- import type { MediaSession, MediaSessionOptions } from "#types/media-session";
1
+ import type { LiveMediaSession, MediaSessionOptions } from "#types/media-session";
2
2
  /**
3
3
  * Creates a renderer-owned media session for one browser media item.
4
4
  *
@@ -6,5 +6,5 @@ import type { MediaSession, MediaSessionOptions } from "#types/media-session";
6
6
  * Add detections, presentation styles, interaction, normalization, or buffering
7
7
  * options only when the host application needs them.
8
8
  */
9
- export declare function createMediaSession(options: MediaSessionOptions): Promise<MediaSession>;
9
+ export declare function createMediaSession(options: MediaSessionOptions): Promise<LiveMediaSession>;
10
10
  //# sourceMappingURL=media-session.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"media-session.d.ts","sourceRoot":"","sources":["../../src/sessions/media-session.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,YAAY,EAIZ,mBAAmB,EAEpB,MAAM,sBAAsB,CAAC;AAkB9B;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,YAAY,CAAC,CAiTvB"}
1
+ {"version":3,"file":"media-session.d.ts","sourceRoot":"","sources":["../../src/sessions/media-session.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,gBAAgB,EAKhB,mBAAmB,EAEpB,MAAM,sBAAsB,CAAC;AAoB9B;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,gBAAgB,CAAC,CAof3B"}