web-media-js

A library for creating Awesome HTML media web components

Usage no npm install needed!

<script type="module">
  import webMediaJs from 'https://cdn.skypack.dev/web-media-js';
</script>

README

Media JS

Media Js is a Javascript library for adding awesome HTMLMediaElement web components in an easy way.

Installation

You can add media js through a the cdn by adding this to your link to your website

<!-- unpkg CDN --> 
<script src="https://cdn.jsdelivr.net/npm/web-media-js/dist/web-media-js.production.js" cross-origin ></script>

If you are using are using npm or yarn you can install it by running the following commands

# yarn
yarn add web-media-js

# npm
npm i web-media-js

Usage

To use web-media-js when you have loaded the cdn all you have to do is add the web-media-js custom tags provided:

code

<media-video src='/assets/video.mp4'></media-video>

This will produce a video component into your webpage.

You can also access it from Javascript

// as global object
const myVideo = new WebMedia.MediaJsVideo(...attributes)

// using node
import { MediaJsVideo } from "web-media-js";

Contributing

To contribute you can clone it on Github and then start the development server and begin coding. This is done like this:

## Clone the repository
git clone https://github.com/jim-junior/web-media-js.git

Then install the dependencies

## yarn
yarn install

## npm
npm install

After that you can begin the dev server

yarn run serve