Carl Sala
Carl Sala

Reputation: 51

How to convert a Vimeo playlist into an array of video addresses?

I have a playlist (showcase) on Vimeo and I'd like to present the videos on my site but differently than how their 'embed' code does it. If possible I'd like to get to a point where I can query the playlist and generate an array of video links so I can apply my own styles and code to them. Is this technically possible somehow?

Upvotes: 1

Views: 904

Answers (1)

Kyle Venn
Kyle Venn

Reputation: 8038

You'd have to handle all the UI yourself, but using the Vimeo API, you'll be able to get the list of Videos within the playlist (AKA Showcase).

You'd make a GET to https://api.vimeo.com/albums/{album_id}/videos. This will return you a list of video objects within the showcase. You can see all the fields on video in my link above.

But some options you could leverage (based on your need)

  • video.link: The URL that you could put in the browser to get to your video on Vimeo.com
  • video.embed.html: This is the HTML for a single iframe to your video (within the Vimeo Player). You could create your own "playlist" by stacking these embeds or laying them out however you want.
  • video.files[0].link: A link to an actual mp4 file which you can do really whatever you want with. This is only available if you own the video (aka it belongs to the account that authenticated the API request you made)

Let me know if this was helpful - I'm happy to chat more in the comments.

Upvotes: 1

Related Questions