Skip to content

Commit

Permalink
chore: map size qualities
Browse files Browse the repository at this point in the history
  • Loading branch information
marcomontalbano committed Jun 16, 2024
1 parent 29ed2e4 commit ac94166
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions netlify/functions/cloudinary/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,19 @@ const { USE_HIGH_QUALITY = false } = process.env;

const useHighQuality = () => USE_HIGH_QUALITY === 'true';

const QUALITY = {
NTSC: 240,
NHD: 360,
SD: 480,
HD: 720,
FHD: 1080,
QHD: 1440,
UHD4K: 2160,
};

async function create(source: string, video: VideoProvider, options?: Options) {
const highQualitySize = 720;
const lowQualitySize = 500;
const highQualitySize = QUALITY.HD;
const lowQualitySize = QUALITY.SD;

// https://cloudinary.com/documentation/image_transformations#adjusting_image_quality
const highQuality = [{ height: highQualitySize }];
Expand Down

0 comments on commit ac94166

Please sign in to comment.