@cliff-studio/sanity-plugin-bunny-input 1.0.8 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18493,8 +18493,8 @@ function getThumbnailUrl(cdnHostname, videoId) {
18493
18493
  function getPlaybackUrl(cdnHostname, videoId) {
18494
18494
  return `https://${cdnHostname}/${videoId}/playlist.m3u8`;
18495
18495
  }
18496
- function getMp4Url(cdnHostname, videoId, availableResolutions = []) {
18497
- const parsedResolutions = (Array.isArray(availableResolutions) ? availableResolutions : []).map((resolution) => Number.parseInt(String(resolution).replace(/p$/i, ""), 10)).filter((resolution) => Number.isFinite(resolution)), bestResolution = parsedResolutions.length ? Math.max(...parsedResolutions) : 720;
18496
+ function getMp4Url(cdnHostname, videoId, availableResolutions = "") {
18497
+ const parsedResolutions = (availableResolutions || "").split(",").map((s) => Number.parseInt(String(s.trim()).replace(/p$/i, ""), 10)).filter((n) => Number.isFinite(n)), bestResolution = parsedResolutions.length ? Math.max(...parsedResolutions) : 720;
18498
18498
  return `https://${cdnHostname}/${videoId}/play_${bestResolution}p.mp4`;
18499
18499
  }
18500
18500
  function createHeaders(config, includeJsonContentType = !1, useDirectApi = !1) {