Add VideoSample and AudioSample abstractions

This commit is contained in:
David Payr
2025-03-13 21:46:39 +01:00
parent d833b5ef31
commit 6eb5c02591
12 changed files with 1571 additions and 873 deletions
+2 -2
View File
@@ -40,11 +40,11 @@ export class EncodedPacket {
}
get microsecondTimestamp() {
return Math.floor(SECOND_TO_MICROSECOND_FACTOR * this.timestamp);
return Math.trunc(SECOND_TO_MICROSECOND_FACTOR * this.timestamp);
}
get microsecondDuration() {
return Math.floor(SECOND_TO_MICROSECOND_FACTOR * this.duration);
return Math.trunc(SECOND_TO_MICROSECOND_FACTOR * this.duration);
}
toEncodedVideoChunk() {