@waveform-playlist/playout 12.5.1 → 12.5.2

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/index.d.mts CHANGED
@@ -392,8 +392,10 @@ interface SoundFontToneTrackOptions {
392
392
  * → Panner → muteGain → effects/destination
393
393
  */
394
394
  declare class SoundFontToneTrack implements PlayableTrack {
395
- /** Rate-limit missing sample warnings — one per class lifetime */
396
- private static _missingSampleWarned;
395
+ /** Rate-limit missing sample warnings — one per track instance (a page-
396
+ * lifetime static would silence diagnostics for unrelated later tracks
397
+ * and soundfont swaps). */
398
+ private _missingSampleWarned;
397
399
  private scheduledClips;
398
400
  private activeSources;
399
401
  private soundFontCache;
@@ -627,24 +629,20 @@ declare function closeGlobalAudioContext(): Promise<void>;
627
629
  /**
628
630
  * Get or create a MediaStreamAudioSourceNode for the given stream
629
631
  *
632
+ * Automatic cleanup fires when the stream's tracks end remotely (device
633
+ * unplugged, remote peer stopped). NOTE: a LOCAL `track.stop()` does NOT
634
+ * fire the track-level 'ended' event (per spec) — call
635
+ * releaseMediaStreamSource() when tearing a stream down yourself.
636
+ *
630
637
  * @param stream - The MediaStream to create a source for
631
638
  * @returns MediaStreamAudioSourceNode that can be connected to multiple nodes
632
- *
633
- * @example
634
- * ```typescript
635
- * const source = getMediaStreamSource(stream);
636
- *
637
- * // Multiple consumers can connect to the same source
638
- * source.connect(analyserNode); // For VU meter
639
- * source.connect(workletNode); // For recording
640
- * ```
641
639
  */
642
640
  declare function getMediaStreamSource(stream: MediaStream): MediaStreamAudioSourceNode;
643
641
  /**
644
642
  * Manually release a MediaStreamSource
645
643
  *
646
- * Normally you don't need to call this - cleanup happens automatically
647
- * when the stream ends. Only call this if you need to force cleanup.
644
+ * Required after a local `track.stop()` (which fires no 'ended' event);
645
+ * remote-ended streams clean up automatically.
648
646
  *
649
647
  * @param stream - The MediaStream to release the source for
650
648
  */
@@ -658,10 +656,10 @@ declare function releaseMediaStreamSource(stream: MediaStream): void;
658
656
  declare function hasMediaStreamSource(stream: MediaStream): boolean;
659
657
 
660
658
  /**
661
- * Fade utilities — re-exports from @waveform-playlist/core
662
- * plus Tone.js-specific helpers
659
+ * Tone.js-specific fade helpers. Pure fade utilities (curves, applyFadeIn/
660
+ * applyFadeOut) live in @waveform-playlist/core — import them from there
661
+ * directly (repo rule: no cross-package re-exports).
663
662
  */
664
-
665
663
  declare function getUnderlyingAudioParam(signal: unknown): AudioParam | undefined;
666
664
 
667
665
  interface ToneAdapterOptions {
package/dist/index.d.ts CHANGED
@@ -392,8 +392,10 @@ interface SoundFontToneTrackOptions {
392
392
  * → Panner → muteGain → effects/destination
393
393
  */
394
394
  declare class SoundFontToneTrack implements PlayableTrack {
395
- /** Rate-limit missing sample warnings — one per class lifetime */
396
- private static _missingSampleWarned;
395
+ /** Rate-limit missing sample warnings — one per track instance (a page-
396
+ * lifetime static would silence diagnostics for unrelated later tracks
397
+ * and soundfont swaps). */
398
+ private _missingSampleWarned;
397
399
  private scheduledClips;
398
400
  private activeSources;
399
401
  private soundFontCache;
@@ -627,24 +629,20 @@ declare function closeGlobalAudioContext(): Promise<void>;
627
629
  /**
628
630
  * Get or create a MediaStreamAudioSourceNode for the given stream
629
631
  *
632
+ * Automatic cleanup fires when the stream's tracks end remotely (device
633
+ * unplugged, remote peer stopped). NOTE: a LOCAL `track.stop()` does NOT
634
+ * fire the track-level 'ended' event (per spec) — call
635
+ * releaseMediaStreamSource() when tearing a stream down yourself.
636
+ *
630
637
  * @param stream - The MediaStream to create a source for
631
638
  * @returns MediaStreamAudioSourceNode that can be connected to multiple nodes
632
- *
633
- * @example
634
- * ```typescript
635
- * const source = getMediaStreamSource(stream);
636
- *
637
- * // Multiple consumers can connect to the same source
638
- * source.connect(analyserNode); // For VU meter
639
- * source.connect(workletNode); // For recording
640
- * ```
641
639
  */
642
640
  declare function getMediaStreamSource(stream: MediaStream): MediaStreamAudioSourceNode;
643
641
  /**
644
642
  * Manually release a MediaStreamSource
645
643
  *
646
- * Normally you don't need to call this - cleanup happens automatically
647
- * when the stream ends. Only call this if you need to force cleanup.
644
+ * Required after a local `track.stop()` (which fires no 'ended' event);
645
+ * remote-ended streams clean up automatically.
648
646
  *
649
647
  * @param stream - The MediaStream to release the source for
650
648
  */
@@ -658,10 +656,10 @@ declare function releaseMediaStreamSource(stream: MediaStream): void;
658
656
  declare function hasMediaStreamSource(stream: MediaStream): boolean;
659
657
 
660
658
  /**
661
- * Fade utilities — re-exports from @waveform-playlist/core
662
- * plus Tone.js-specific helpers
659
+ * Tone.js-specific fade helpers. Pure fade utilities (curves, applyFadeIn/
660
+ * applyFadeOut) live in @waveform-playlist/core — import them from there
661
+ * directly (repo rule: no cross-package re-exports).
663
662
  */
664
-
665
663
  declare function getUnderlyingAudioParam(signal: unknown): AudioParam | undefined;
666
664
 
667
665
  interface ToneAdapterOptions {