Skip to content

Supplying an aspect ratio AND the transformation parameter causes poster URLs to fail #1087

Description

@eportis-cloudinary
cloudinary.videoPlayer("succeeds", {
  "cloud_name": "demo",
  "autoplay": false,
  "controls": true,
  "loop": false,
  "muted": false,
  "publicId": "dog",
  "showLogo": true,
  "width": "640",
  "height": "360",
  "aspectRatio": "640:360"
});

builds a poster image with URL https://res.cloudinary.com/demo/_applet_/video_service/elements/upload/ZG9n/poster?tx=ar_640%3A360%2Cc_limit%2Cw_1000&_s=vp (ar_640:360,c_limit,w_1000), which succeeds.

However,

cloudinary.videoPlayer("fails", {
  "cloud_name": "demo",
  "autoplay": false,
  "controls": true,
  "loop": false,
  "muted": false,
  "publicId": "dog",
  "transformation": [
    {
      "quality": "auto"
    }
  ],
  "showLogo": true,
  "width": "640",
  "height": "360",
  "aspectRatio": "640:360"
});

builds a poster image with URL https://res.cloudinary.com/demo/_applet_/video_service/elements/upload/ZG9n/poster?tx=q_auto%2Far_640%3A360%2Fc_limit%2Cw_1000&_s=vp (q_auto/ar_640:360/c_limit,w_1000) which returns x-cld-error: Crop mode scale requires specifying either width or height, because the ar transformation is slash-separated rather than comma-separated from the w_1000, so it becomes an independent scale operation without a width or height.

Test cases: https://codepen.io/editor/eeeps/pen/01a0a214-7f4d-79fb-b92d-0e022f701fac

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions