To embed a Vimeo video as a background video, I see in this code pen:
https://codepen.io/BRacicot/pen/JpLmqo
that video source url is an special type with "external" word:
https://player.vimeo.com/external/243924757.hd.mp4?s=1fc7fe8bd116cdd9c9c3e639ddbae75f2f4f8f2e&profile_id=174
How can I get this url type from my own videos?
You can click the link button in the upper right corner of the edit page to copy the link to your video and share it with others. If you share the link or via social, or embed the video, you would need to provide the password to your recipients directly.
To retrieve the Vimeo URL:Open the video on Vimeo. Click the Share icon. Copy the video's Link URL.
To access your video URL from your Video Library, click the three dots to the right of the video you want to share. After that, click “Copy Link.” This copies your video link directly to your clipboard. From here, you can share it to a social network or as a link anywhere online.
That "external" link is returned in the video response, along with download links.
To get the direct file links for videos on your account, make an authenticated request to GET https://api.vimeo.com/videos/[video_id]
. Two keys are returned in the response: files
and download
. The files
key contains links and related metadata to all the files for the requested video. These links are meant for use with external/third-party media players and do not expire. The download
key contains links to the files as well as the expiration time and related metadata for those links.
Both the files and download links are HTTP 302 redirects to the actual video file resources. The location of the actual video file resources expires every few hours, so make sure you always use the redirect links exactly as provided.
Be sure that your requests are authenticated with a token that has the video_files
scope. If you authenticate with a token that does not have video_files
scope, the video response will not contain files
or download
metadata. Vimeo API authentication docs are found here:
https://developer.vimeo.com/api/authentication#understanding-auth-workflows
Also be aware that these video file links are only returned for Vimeo Pro, Premium, and Business members:
https://help.vimeo.com/hc/en-us/articles/224823567-Third-party-player-links
Finally, note that you may not need all of this, as the embedded Vimeo Player can be used as a chromeless background video player:
https://help.vimeo.com/hc/en-us/articles/115011183028-Embedding-background-and-chromeless-videos
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With