@maveio/components
v0.0.136
Published
privacy friendly (๐ช๐บ), iframe-less, video UI elements for videos hosted on mave.io
Downloads
393
Readme
components
Components are pre-built rich UI components that help you build your own video experiences across desktop and mobile (web). There is no need to run external iframes these days. This library leverages the power of webcomponents, which makes it fast and has a small footprint. You can create a (free) account on mave.io.
Install โข Usage โข Contributing โข Docs
Get started
Include the following in your site (and create an account):
<script
type="module"
src="https://cdn.video-dns.com/npm/@maveio/components/+esm"
></script>
and start using our components!
Install
If you want to use our component library locally within your project:
npm install @maveio/components
And either use the regular version
// include in your script.js
import { Player } from '@maveio/components';
// and use the component in your html
<mave-player embed="{embed id}"></mave-player>;
or use our React specific version:
import { Player } from '@maveio/components/react';
function App() {
return (
<>
<Player embed="{embed id}"></Player>
</>
);
}
export default App;
Usage
Player
Once you have uploaded your first video you can show your videos in different formats. The most common used component is <mave-player>
:
<mave-player embed="{embed id}"></mave-player>
You can either change the settings through our interface or provide it as attributes. To learn which attributes you can use to change the appearance of your player, go to our docs.
Clip
<mave-clip embed="{embed id}"></mave-clip>
We often find ourselves using simple .mp4
files, because we just want to show a simple video as interface element (just like an image). We provide just that, but using the power of mave (multiple renditions, codecs and analytics) without any UI on top to control the video. Useful as header, or on an e-commerce site to show products for instance.
List
<mave-list token="<token>">
<template>
<div slot="item-title"></div>
<mave-img></mave-img>
</template>
</mave-list>
A more complex example is <mave-list>
, which can be useful to show a collection of videos. Combined with our x-mave-pop
attribute, it can become pretty powerful.
Contributing
Localization
When defining msg()
run the following command: ./node_modules/.bin/lit-localize extract && ./node_modules/.bin/lit-localize build