Socket
Socket
Sign inDemoInstall

media-playlist

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    media-playlist

Play through a set of video and audio elements.


Version published
Weekly downloads
55
increased by48.65%
Maintainers
1
Install size
7.43 kB
Created
Weekly downloads
 

Readme

Source

<media-playlist>

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

Example

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

<media-playlist loop>
  <media-playlist-item type="video" src="" controls></media-playlist-item>
  <media-playlist-item type="audio" src="" controls></media-playlist-item>
  <media-playlist-item type="video" src="" controls></media-playlist-item>
</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 :thumbsup:, and best for registering web components quickly.

<head>
  <script type="module" src="https://unpkg.com/media-playlist@0.1"></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.

Keywords

FAQs

Last updated on 03 Feb 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc