Merge branch 'wav-duration-fix' into dev

This commit is contained in:
daniel-c-harvey
2026-06-07 15:10:58 -04:00
+4 -2
View File
@@ -140,9 +140,11 @@ export class AudioPlayer {
this.scheduler.addBuffer(result.buffer);
}
// Update duration estimate
// Update duration estimate — set once only; reinitializeFromOffset does not
// reset this.duration, so after a seek-beyond-buffer the synthesised header's
// shorter DataSize cannot overwrite the original full-track duration.
const estimatedDuration = this.streamDecoder.getEstimatedDuration();
if (estimatedDuration) {
if (estimatedDuration && this.duration === 0) {
this.duration = estimatedDuration;
}