Cloudinary Video Player
Aspect ratio & crop mode
fill - crops to fit aspect ratio
pad - letterboxes to fit
smart with 9:16 (portrait)
Full documentation
Example Code:
// Fill - crops to fit aspect ratio (no distortion)
player.source({
publicId: 'sea_turtle',
aspectRatio: '1:1',
cropMode: 'fill'
});
// Pad - letterboxes to fit (no distortion)
player.source({
publicId: 'sea_turtle',
aspectRatio: '4:3',
cropMode: 'pad',
cropPadColor: 'blue'
});
// Portrait (9:16) - smart crop
player.source({
publicId: 'sea_turtle',
aspectRatio: '9:16',
cropMode: 'smart'
});