mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 19:03:46 +02:00
Add targetPacketCount parameter to computePacketStats
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user