Add targetPacketCount parameter to computePacketStats

This commit is contained in:
Vanilagy
2025-06-18 13:19:05 +02:00
parent befab215b4
commit d5671fd8ad
3 changed files with 35 additions and 12 deletions
+2 -2
View File
@@ -22,8 +22,8 @@ if (videoTrack) {
videoTrack.displayHeight; // in pixels
videoTrack.rotation; // in degrees clockwise
// Compute FPS (can be expensive)
const packetStats = await videoTrack.computePacketStats();
// Estimate frame rate (FPS)
const packetStats = await videoTrack.computePacketStats(100);
const averageFrameRate = packetStats.averagePacketRate;
}