vimeo-video-element is a custom web component that encapsulates the Vimeo player, providing a JavaScript API that closely mirrors the standard HTML `HTMLMediaElement` interface. It is part of the `media-elements` monorepo by Mux and is currently at version 1.7.1, with recent updates focused on bug fixes and dependency management. The project maintains an active development pace with frequent minor releases. Key differentiators include its adherence to the native `<video>` API for familiar usage, seamless integration with `Media Chrome` components for UI, and its nature as a custom element, allowing for easy drop-in usage in various web frameworks or vanilla JavaScript. It ships with TypeScript types, enhancing developer experience and type safety.
npm install vimeo-video-elementVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to embed and interact with the `<vimeo-video>` custom element using basic HTML and JavaScript, including attributes for playback control and accessing the underlying Vimeo player API.
Always use the standard shareable Vimeo video URL. For unlisted videos, obtain the URL including the hash parameter from Vimeo's share options. Example: `https://vimeo.com/123456789?h=abcdef123`.
Configure Vimeo video privacy settings to 'Public', 'Unlisted', or explicitly whitelist your domain(s) for 'Specific Domains' embedding. Consult Vimeo's embed settings for details.
Always include the `muted` attribute when attempting autoplay (`<vimeo-video autoplay muted ...>`). Consider providing a UI element for users to initiate playback if autoplay is critical.
Refer to the `vimeo-video-element` documentation for supported properties and methods. For advanced interactions or behavior differing from native `<video>`, utilize the `player` object accessible via the `ready` promise for direct Vimeo player API access.
Ensure the `vimeo-video-element` script (or its containing bundle) is imported only once in your application. If using a CDN script, place it strategically to avoid re-execution.
Make sure the JavaScript import or `<script type="module">` tag for `vimeo-video-element` is placed either at the end of `<body>` or marked as `defer` in the `<head>` to ensure the element is defined before the browser attempts to parse and render it. For CDN usage, use `<script type="module" src="..."></script>`.
Review the video's privacy settings on Vimeo. Ensure embedding is allowed, either globally, for specific domains (if yours is whitelisted), or that the video is set to 'Unlisted' or 'Public'.
No dependency data recorded yet.