From ae0266df52b1930320a4f04824c757a689746107 Mon Sep 17 00:00:00 2001 From: Vanilagy <1696106+Vanilagy@users.noreply.github.com> Date: Mon, 11 Aug 2025 18:41:15 +0200 Subject: [PATCH] Clarify decode order thing for encoded packet sources --- src/media-source.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/media-source.ts b/src/media-source.ts index 2ae14db..3860552 100644 --- a/src/media-source.ts +++ b/src/media-source.ts @@ -158,7 +158,8 @@ export class EncodedVideoPacketSource extends VideoSource { } /** - * Adds an encoded packet to the output video track. + * Adds an encoded packet to the output video track. Packets must be added in *decode order*, while a packet's + * timestamp must be its *presentation timestamp*. B-frames are handled automatically. * * @param meta - Additional metadata from the encoder. You should pass this for the first call, including a valid * decoder config. @@ -788,7 +789,7 @@ export class EncodedAudioPacketSource extends AudioSource { } /** - * Adds an encoded packet to the output audio track. + * Adds an encoded packet to the output audio track. Packets must be added in *decode order*. * * @param meta - Additional metadata from the encoder. You should pass this for the first call, including a valid * decoder config.