cloudinary-community / cloudinary-util

https://cloudinary-util.vercel.app
MIT License
12 stars 19 forks source link

Fixes undefined aspect ratio `undefined:undefined` with no width or height #177

Closed colbyfayock closed 3 months ago

colbyfayock commented 3 months ago

Description

When using getVideoPlayerOptions without a width or height, the returned options object would include an aspect ratio as undefined:undefined.

This checks to see the existence of the width and height values before trying to use them in the aspect ratio.

Issue Ticket Number

Fixes #176

https://github.com/cloudinary-community/next-cloudinary/issues/499

Type of change

Checklist