Skip to content

Commit 61b2068

Browse files
kixelatedclaude
andauthored
fix: update sync timestamp in audio legacy decoder (#1250)
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6035cb3 commit 61b2068

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

js/watch/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@moq/watch",
33
"type": "module",
4-
"version": "0.2.3",
4+
"version": "0.2.4",
55
"description": "Watch Media over QUIC broadcasts",
66
"license": "(MIT OR Apache-2.0)",
77
"repository": "github:moq-dev/moq",

js/watch/src/audio/decoder.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,10 @@ export class Decoder {
228228
const { frame } = next;
229229
if (!frame) continue;
230230

231+
// Mark that we received this frame right now.
232+
const timestamp = Time.Milli.fromMicro(frame.timestamp as Time.Micro);
233+
this.source.sync.received(timestamp, "audio");
234+
231235
this.#stats.update((stats) => ({
232236
bytesReceived: (stats?.bytesReceived ?? 0) + frame.data.byteLength,
233237
}));

0 commit comments

Comments
 (0)