Socket
Socket
Sign inDemoInstall

videojs-playlist-ui

Package Overview
Dependencies
Maintainers
3
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

videojs-playlist-ui

A playlist video picker for video.js


Version published
Weekly downloads
2.6K
decreased by-3.56%
Maintainers
3
Weekly downloads
 
Created
Source

Build Status

Video.js Playlist UI

A playlist video picker for video.js

Getting Started

Include the plugin script in your page, and a placeholder list element with the class vjs-playlist to house the playlist menu:

<!-- Include the playlist menu styles somewhere in your page: -->
<link href="videojs-playlist-ui.vertical.css" rel="stylesheet">

<!-- The playlist menu will be built automatically in here: -->
<ol class="vjs-playlist"></ol>

<!-- Include video.js, the videojs-playlist plugin and this plugin: -->
<script src="video.js"></script>
<script src="videojs-playlist.js"></script>
<script src="videojs-playlist-ui.js"></script>

<script>
  // Now you can initialize the plugin and build the playlist whenever
  // you're ready!
  videojs(document.querySelector('video')).playlistUi();
</script>

There's also a working example of the plugin you can check out if you're having trouble.

Documentation

Plugin Options

You may pass in an options object to the plugin upon initialization. The PlaylistMenu is a regular video.js Component so you may pass in any option that is accepted by Components. In addition, this object may contain this specialized property:

className

Type: string Default: "vjs-playlist"

The name of the class to search for to populate the playlist menu.

playOnSelect

Type: Boolean Default: false

The default behavior is that the play state is expected to stay the same between videos, if playing continue playing and if paused stay paused when playlist menu items are clicked. When this boolean is set to true, clicking on the playlist menu items will always play the video.

Playlists and Advertisements

The Playlist Menu automatically adapts to ad integrations based on videojs-contrib-ads. When a linear ad is being played, the menu will darken and stop responding to click or touch events. If you'd prefer to allow your viewers to change videos during ad playback, you can override this behavior through CSS. You will also need to make sure that your ad integration is properly cancelled and cleaned up before switching-- consult the documentation for your ad library for details on how to do that.

Release History

  • 0.1.0: Initial release

Keywords

FAQs

Package last updated on 06 Aug 2015

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc