Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thumbnail output with many frames reduced to single object without url references #23

Open
jcart opened this issue Jul 8, 2015 · 1 comment

Comments

@jcart
Copy link

jcart commented Jul 8, 2015

The issue originates when you have define the "number" parameter on a thumbnail format. When retrieing job record, you will only ever see there is a single thumbnail for that group.

[
        {
            "label": "150_160",
            "number": "30",
            "aspect_mode": "crop",
            "height": "150",
            "width": "160"
        }
]

This comes from the fact that when parsing the thumbnails from the response, you are overwriting the previous thumbnail with the same group label.

In Services_Zencoder_Job

private function _create_thumbnails($thumbnails = array())
{
    foreach($thumbnails as $thumb_attrs) {

        if(!empty($thumb_attrs->group_label)) {
            $this->thumbnails[$thumb_attrs->group_label] = new Services_Zencoder_Thumbnail($thumb_attrs);
        } else {
            $this->thumbnails[] = new Services_Zencoder_Thumbnail($thumb_attrs);
        }
    }
}

The reason why this is a problem is you may need to retrieve the urls for the thumbnails. This will only ever produce a single url, when in fact I should have 30 here.

I'm not sure what the ideal solutions are here.

  1. Multi-dimensional array based on group label. This seems convinient, but probably a BC break.
  2. No grouping based on label. All thumbnails will be at the same level. This would require more the user to find certain images in their own libraries. I don't think this is a BC break.

Thoughts?

@jcart jcart changed the title Multiple thumbnail with many frames reduced to single object without url references Thumbnail output with many frames reduced to single object without url references Jul 8, 2015
@svilborg
Copy link

Any updates on this issue ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants