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

Extend Fields which are requested from vimeo #3

Closed
miller-design opened this issue Apr 10, 2024 · 6 comments
Closed

Extend Fields which are requested from vimeo #3

miller-design opened this issue Apr 10, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@miller-design
Copy link

Hi there,

Is there any option or plan to allow a user when setting up the plugin to specify/select what data they want to retrieve from Vimeo?

As a use case, we need the duration value to be available for all videos and we only need to return the source files to be returned.

Cheers

@marco-land marco-land self-assigned this Apr 10, 2024
@marco-land marco-land added the enhancement New feature or request label Apr 10, 2024
@marco-land
Copy link
Owner

marco-land commented Apr 10, 2024

Hi Miller, that is a good point. At the moment the only fields that are requested are play,pictures,files,name but I will include an option to extend the fields. I think for your use case you'd need the video field (Vimeo docs).

@marco-land
Copy link
Owner

I've just added field options to 1.0.1:

// … your schema
defineField({
  title: 'Vimeo',
  name: 'vimeo',
  type: 'vimeo',
  // Optional: Extend the default fields, see below for more information
  options: {
    fields: ['metadata'],
  },
})

@miller-design
Copy link
Author

Hi Marco,

Thank you so much for looking into this it's greatly appreciated.

One thing that I have come across while testing this updated option out is that I can't seem to get anything to return from "video" when I add it to my fields options array.

Your example of metadata works as I tested including and excluding it when I set the field options. However when I was checking over the response page I couldn't see a response of metadata in the list.

eg this is how I'm defining my field:
defineField({ title: 'Short Loop Video', name: 'shortLoop', type: 'vimeo', options: { fields: ['metadata', 'video'] } }),
I have also tested creating a new API key in case I may have limited my access but I still didn't have any luck with retrieving any additional data. I have also tested the following options which also didn't return any data: location, project and text track

Cheers,
Jack

@marco-land
Copy link
Owner

marco-land commented Apr 23, 2024

Hi Jack,

sorry, I did not mention this in my earlier response: I was wrong to add the video field for the duration.
Basically, this should be the full list of fields.

So, for storing the video‘s duration I just tested it like this and it worked:

options: {
  fields: ['duration'],
},

Can you check if that works for you, too?

@miller-design
Copy link
Author

Hi Marco,

Awesome stuff I'll test this out shortly.

Currently having an issue with caching on my requests so I can't say at the moment if the above will work.

Cheers,
Jack

@miller-design
Copy link
Author

Hi Marco,

just to confirm that using:

options: {
  fields: ['duration'],
}

does indeed allow me to access the duration value.

Thanks again for making this update.

Cheers,
Jack

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

No branches or pull requests

2 participants