init commit
This commit is contained in:
18
remotion/node_modules/@remotion/media-parser/dist/find-last-keyframe.js
generated
vendored
Normal file
18
remotion/node_modules/@remotion/media-parser/dist/find-last-keyframe.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.findLastKeyframe = findLastKeyframe;
|
||||
function findLastKeyframe({ keyframes, timeInSeconds, }) {
|
||||
let bestKeyframe = null;
|
||||
for (const keyframe of keyframes) {
|
||||
if (keyframe.presentationTimeInSeconds > timeInSeconds &&
|
||||
keyframe.decodingTimeInSeconds > timeInSeconds) {
|
||||
break;
|
||||
}
|
||||
if (bestKeyframe === null ||
|
||||
keyframe.presentationTimeInSeconds >
|
||||
bestKeyframe.presentationTimeInSeconds) {
|
||||
bestKeyframe = keyframe;
|
||||
}
|
||||
}
|
||||
return bestKeyframe;
|
||||
}
|
||||
Reference in New Issue
Block a user