MCPcopy Create free account
hub / github.com/Wscats/chrome-devtools-cli / checkFrames

Function checkFrames

src/__tests__/MediaStreamRecorder.js:2415–2435  ·  view source on GitHub ↗
(frames)

Source from the content-addressed store, hash-verified

2413 // sums the lengths of all the frames and gets the duration
2414
2415 function checkFrames(frames) {
2416 if (!frames[0]) {
2417 postMessage({
2418 error: 'Something went wrong. Maybe WebP format is not supported in the current browser.'
2419 });
2420 return;
2421 }
2422
2423 var width = frames[0].width,
2424 height = frames[0].height,
2425 duration = frames[0].duration;
2426
2427 for (var i = 1; i < frames.length; i++) {
2428 duration += frames[i].duration;
2429 }
2430 return {
2431 duration: duration,
2432 width: width,
2433 height: height
2434 };
2435 }
2436
2437 function numToBuffer(num) {
2438 var parts = [];

Callers 1

ArrayToWebMFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected