cloudinary-community / svelte-cloudinary

⚡️ High-performance image delivery and uploading at scale in Svelte powered by Cloudinary.
https://svelte.cloudinary.dev/
MIT License
28 stars 14 forks source link

[Feature] Use getVideoPlayerOptions to support CldVideoPlayer #111

Closed colbyfayock closed 1 month ago

colbyfayock commented 4 months ago

Feature Request

Is your feature request related to a problem? Please describe.

getVideoPlayer options was released as a function available in the @cloudinary-util/url-loader package allowing us to maintain the logic to support the component in a shared module.

Using it is as simple as passing the options / props directly to the function, returning the options that will then be passed to the player.

const playerOptions = getVideoPlayerOptions(props, config);
videoPlayer(videoRef.current, playerOptions);

An additional argument is the config object, which is shaped as ConfigOptions, currently being used in the library.

Next Cloudinary: https://github.com/cloudinary-community/next-cloudinary/pull/478

Cloudinary Util: https://github.com/cloudinary-community/cloudinary-util/pull/157

ghostdevv commented 1 month ago

Will be released in #112