mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-03 13:53:53 +02:00
fix lint error
This commit is contained in:
+5
-2
@@ -263,7 +263,10 @@ export class Conversion {
|
|||||||
if (options.video?.rotate !== undefined && ![0, 90, 180, 270].includes(options.video.rotate)) {
|
if (options.video?.rotate !== undefined && ![0, 90, 180, 270].includes(options.video.rotate)) {
|
||||||
throw new TypeError('options.video.rotate, when provided, must be 0, 90, 180 or 270.');
|
throw new TypeError('options.video.rotate, when provided, must be 0, 90, 180 or 270.');
|
||||||
}
|
}
|
||||||
if (options.video?.fps !== undefined && (typeof options.video.fps !== 'number' || isNaN(options.video.fps) || options.video.fps <= 0)) {
|
if (
|
||||||
|
options.video?.fps !== undefined
|
||||||
|
&& (typeof options.video.fps !== 'number' || isNaN(options.video.fps) || options.video.fps <= 0)
|
||||||
|
) {
|
||||||
throw new TypeError('options.video.fps, when provided, must be a positive number.');
|
throw new TypeError('options.video.fps, when provided, must be a positive number.');
|
||||||
}
|
}
|
||||||
if (options.audio !== undefined && (!options.audio || typeof options.audio !== 'object')) {
|
if (options.audio !== undefined && (!options.audio || typeof options.audio !== 'object')) {
|
||||||
@@ -600,7 +603,7 @@ export class Conversion {
|
|||||||
sample.close();
|
sample.close();
|
||||||
} else {
|
} else {
|
||||||
while (relativeToStartTimestamp >= outputTimestamp) {
|
while (relativeToStartTimestamp >= outputTimestamp) {
|
||||||
const sample = new VideoSample(canvas, {
|
const sample = new VideoSample(canvas, {
|
||||||
timestamp: outputTimestamp,
|
timestamp: outputTimestamp,
|
||||||
duration: frameDuration,
|
duration: frameDuration,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user