luwes / lite-vimeo-embed

🎥 A faster Vimeo embed.
https://lite-vimeo-embed.vercel.app
148 stars 23 forks source link

Fix for unlisted videos with 2 parameters for ID #23

Closed neurotools closed 7 months ago

neurotools commented 7 months ago

There are videos on Vimeo that are with 2 parameters in the URL.

These are "Unlisted" videos (Available on Plus and higher plans), that has the video ID, a slash and then a privacy hash.

More info: https://www.denisbouquet.com/vimeo-url-2-strings-unlisted-hash-videos-with-2-ids/

I changed the script in order to detect if the parameter has a "/" (slash) in it, and split the two parameters, then join them as follows: "parameter1?h=parameter2", encoding each parameter, or... if it has only one parameter, continue as before, encoding the single parameter.

vercel[bot] commented 7 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lite-vimeo-embed ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 24, 2024 6:18pm
neurotools commented 7 months ago

Needs more work... Sorry!