Skip to content

A custom element for playing through a set of audio and video elements.

License

Notifications You must be signed in to change notification settings

cjpillsbury/media-playlist

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

<media-playlist>

A custom element for playing through a set of audio and video elements.

Example

<html>
<head>
  <script type="module" src="https://unpkg.com/media-playlist"></script>
</head>
<body>

<media-playlist loop>
  <video src="" controls></video>
  <audio src="" controls></audio>
  <video src="" controls></video>
</media-playlist>

</body>
</html>

Installing

<media-playlist> is packaged as a javascript module (es6) only, which is supported by all evergreen browsers and Node v12+.

Loading into your HTML using <script>

Note the type="module", that's important.

Modules are always loaded asynchronously by the browser, so it's ok to load them in the head 👍, and best for registering web components quickly.

<head>
  <script type="module" src="https://unpkg.com/media-playlist"></script>
</head>

Adding to your app via npm

npm install media-playlist --save

Or yarn

yarn add media-playlist

Include in your app javascript (e.g. src/App.js)

import 'media-playlist';

This will register the custom elements with the browser so they can be used as HTML.

About

A custom element for playing through a set of audio and video elements.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 78.4%
  • HTML 21.6%