Vime

Customizable, extensible, accessible and framework agnostic media player. M...

README

🎉  Vime is merging into Vidstack! Read more 🎉
<img
  width="150"
  src="https://raw.githubusercontent.com/vime-js/vime/master/static/identity/vime.png"
  alt="Vime Logo"
/>

Vime is a customizable, extensible, accessible and framework agnostic media player.
[![package-badge]][package] [![license-badge]][license] [![semantic-release-badge]][semantic-release]
![Release][release-badge] [![docs-badge]][docs] [![jsdelivr-badge]][jsdelivr] [![discord-badge]][discord]

<img
  src="https://raw.githubusercontent.com/vime-js/vime/master/static/player/video.png"
  alt="Vime 2 - Video Player Screenshot"
/>

✨ Features


- 🎥  Multi-provider support (HTML5, HLS, YouTube, Vimeo etc.).
- 👑  One API to rule them all! Don't re-learn anything the next time you need a player.
- ♾️  Avoid cross-browser differences on media related APIs, such as fullscreen and picture-in-picture.
- 👐  [Accessible][accessibility] to all via ARIA roles/states/properties and keyboard support.
- 🌎  I18N support.
- 🖥  Designed with both mobile and desktop in mind.
- 👌  Touch input friendly.
- 🎨  Style anything you want with [CSS variables][css-vars]. Default [light][light-theme] and
  [dark][dark-theme] themes are included.
- 🏎️  Performant with [preconnections][preconnections] + [lazy loading][lazy-loading] of components
  and media out of the box.
- 🧩  Easily build your own components and extend Vime.
- 🗑️  Lightweight - 25kB (gzip) standalone, and 47kB with the default Vime UI.
- ️🧰  Awesome default custom UI's for audio/video/live media.
- 🛠  Comprehensive [player API][player-api] with a heap of properties, methods and events.
- 💪  Built with TypeScript so you can enjoy completely typed components.
- 🏠  Feel right at home with HTML/CSS/JS thanks to web components.
- 🏗️  Framework specific bindings for React, Vue, Svelte, Stencil and Angular.

[web-components]: https://developer.mozilla.org/en-US/docs/Web/Web_Components
[accessibility]: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA
[css-vars]: https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties
[light-theme]: https://github.com/vime-js/vime/blob/master/src/themes/light.css
[dark-theme]: https://github.com/vime-js/vime/blob/master/src/themes/default.css
[player-api]: https://vimejs.com/components/core/player
[preconnections]: https://css-tricks.com/using-relpreconnect-to-establish-network-connections-early-and-increase-performance
[lazy-loading]: https://www.imperva.com/learn/performance/lazy-loading

🍭 Examples


The examples below are using web components but there are bindings for React, Vue, Svelte, Stencil
and Angular. If you want to see how they look check out our Demo.

  1. ``` html
  2. <vm-player autoplay muted>
  3.   <vm-video poster="/media/poster.png" cross-origin>
  4.     
  5.     <source data-src="/media/video.mp4" type="video/mp4" />
  6.     <track
  7.       default
  8.       kind="subtitles"
  9.       src="/media/subs/en.vtt"
  10.       srclang="en"
  11.       label="English"
  12.     />
  13.   </vm-video>
  14. <vm-default-ui />
  15. </vm-player>
  16. ```

_Native UI?_

  1. ``` html
  2. <vm-player autoplay muted controls>
  3.   <vm-audio cross-origin>
  4.     <source data-src="/media/audio.mp3" type="audio/mp3" />
  5.   </vm-audio>
  6. </vm-player>
  7. ```

_Custom UI?_

  1. ``` html
  2. <vm-player autoplay muted style="--vm-player-theme: #1873d3">
  3.   
  4.   <vm-youtube video-id="DyTCOwB0DVw" />
  5. <vm-ui>
  6.     <vm-click-to-play />
  7.     <vm-captions />
  8.     <vm-poster />
  9.     <vm-spinner />
  10.     <vm-default-settings />
  11.     <vm-controls pin="bottomLeft" active-duration="2750" full-width>
  12.       <!-- 
  13.         These are all predefined controls that you can easily customize. You could also build 
  14.         your own controls completely from scratch.
  15.       -->
  16.       <vm-playback-control tooltip-direction="right" />
  17.       <vm-volume-control />
  18.       <vm-time-progress />
  19.       <vm-control-spacer />
  20.       <vm-caption-control />
  21.       <vm-pip-control keys="p" />
  22.       <vm-settings-control />
  23.       <vm-fullscreen-control keys="f" tooltip-direction="left" />
  24.     </vm-controls>
  25.   </vm-ui>
  26. </vm-player>
  27. ```

🏗️ Frameworks


There are framework specific bindings for:

- Vue

Keep in mind, that at its core Vime is still simply web components. Even if your framework is
not mentioned in the list above, it most likely still supports Vime natively. You can check
here if your framework has complete support for
web components.

There are also examples for loading and using Vime with:


🖥️ Browsers


Vime is forward thinking and built for the modern web. All
ES6 Compatible browsers are supported, some of which are
listed below.

- Edge 79+
- Firefox 68+
- Chrome 61+
- Safari 11+
- iOS Safari 11+
- Opera 48+

🎥 Providers


- [HTML5][provider-file]
- [HLS][provider-hls]
- [Dash][provider-dash]
- [YouTube][provider-youtube]
- [Vimeo][provider-vimeo]
- [Dailymotion][provider-dailymotion]

[provider-hls]: https://vimejs.com/components/providers/hls
[provider-dash]: https://vimejs.com/components/providers/dash
[provider-file]: https://vimejs.com/components/providers/file
[provider-youtube]: https://vimejs.com/components/providers/youtube
[provider-vimeo]: https://vimejs.com/components/providers/vimeo
[provider-dailymotion]: https://vimejs.com/components/providers/dailymotion

📖 Documentation


Documentation can be found at https://vimejs.com.

🙋 Support


Feel free to join our [Discord channel][discord] if you'd like help with anything related to Vime.
Please remember to be respectful and patient as this is a community driven project.

🔨 Contributing


If you'd like to contribute and help in building a better media player for the web, then everything
you need to get started can be found in the Contributing Guide.

❤️ Sponsors


A huge thanks to our sponsors who support open-source projects like Vime.

  <img
    width="100%"
    alt="mux"
    src="./static/sponsors/mux.png"
  />
  <img
    width="100%"
    alt="vercel"
    src="./static/sponsors/vercel.png"
  />
  <img
    width="100%"
    alt="cypress"
    src="./static/sponsors/cypress.png"
  />

[package]: https://www.npmjs.com/package/@vime/core
[package-badge]: https://img.shields.io/npm/v/@vime/core
[license]: https://github.com/vime-js/vime/blob/master/LICENSE
[license-badge]: https://img.shields.io/github/license/vime-js/vime?color=blue
[docs]: https://vimejs.com
[docs-badge]: https://img.shields.io/badge/docs-https://vimejs.com-green
[semantic-release]: https://github.com/semantic-release/semantic-release
[semantic-release-badge]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
[jsdelivr]: https://www.jsdelivr.com/package/npm/@vime/core
[jsdelivr-badge]: https://data.jsdelivr.com/v1/package/npm/@vime/core/badge?style=rounded
[release-badge]: https://github.com/vime-js/vime/workflows/Release/badge.svg?branch=master
[discord]: https://discord.com/invite/7RGU7wvsu9
[discord-badge]: https://img.shields.io/badge/chat-on%20discord-7389D8