diff --git a/docs/guide/rts.md b/docs/guide/rts.md index 2cdc62175..9b071b46e 100644 --- a/docs/guide/rts.md +++ b/docs/guide/rts.md @@ -16,7 +16,8 @@ Header { } Body { - primary uint8 base; + uint32 time; + uint8 base; } ``` diff --git a/src/core/streams/rts.ts b/src/core/streams/rts.ts index 438ca1d18..2d9b0d0e9 100644 --- a/src/core/streams/rts.ts +++ b/src/core/streams/rts.ts @@ -33,6 +33,7 @@ export class RtsmReadStream extends ReadStream { body() { return { + time: this.uint32(), base: this.uint8(), }; } @@ -56,6 +57,7 @@ export class RtsmWriteStream extends WriteStream { } body(base: number) { + this.uint32(Math.round(Date.now() / 1000)); this.uint8(base); } }