npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

videojs-playlist-ui

v5.0.0

Published

A user interface for the videojs-playlist API

Downloads

7,320

Maintainers

areis10areis10vmnavarrovmnavarrodkingstondkingstonalfredo-reyesalfredo-reyesjterranovajterranovapradeep.vernekarpradeep.vernekarjfloresbcjfloresbcmlopez.bmlopez.bvasu.pvasu.pttabrilla-bcttabrilla-bcmsivallsmsivallssstevanussstevanusrwbarber2rwbarber2kaustubh-thube-brightcovekaustubh-thube-brightcoverwingerrwingerbcc-bfranklinbcc-bfranklinapenigalapatiapenigalapatilmaultsbylmaultsbysravan.pbrsravan.pbragrojas-bcagrojas-bcijunaidfijunaidfmgoncalvesmgoncalvesmfregozomfregozoareveloarevelomadhu_gmadhu_ghugocjimhugocjimdaniel_camposdaniel_camposkevin.schickkevin.schickm.morrisonm.morrisonuomaruomarabarstowbcabarstowbcsbarathansbarathankpandiyarajankpandiyarajanrburnhamrburnhamimoronesimoroneswalterseymourbcwalterseymourbcddashkevichddashkevichalbertogomezalbertogomezgestrada-brgestrada-bramillerbrightcoveamillerbrightcovelvohralvohramcho-bcmcho-bcawaldronawaldronfsalazarbcfsalazarbcdawnpackodawnpackoldominguezldominguezbc-srimron-soutterbc-srimron-soutterrsilva_brightcoversilva_brightcovejoeyleshjoeyleshlmelchorx1lmelchorx1juan-sanchezjuan-sanchezeolveraeolveracloewer_bccloewer_bccarredondocarredondobrianhsubrianhsuniklagbrightcoveniklagbrightcovetsraveling_bctsraveling_bcbcbcliffordbcbcliffordbc-acgarciabc-acgarciaadavila1adavila1vaishalijayaramanvaishalijayaramankreynoldskreynoldsbgs-devopsbgs-devopsalbinjohnsonalbinjohnsonrtezerartezerabcmneilbcmneilrandresfrandresfv.kozlov_bcv.kozlov_bcnagendra_mnagendra_mmichaelmccarthybcmichaelmccarthybcponeill-bcovponeill-bcovmdeltorobcovmdeltorobcovjmohneycovejmohneycoveinbc01inbc01aperezbrightcoveaperezbrightcoveireyes94ireyes94brightcove-adminbrightcove-admintedktedkabradley-brightcoveabradley-brightcovebc-alivebc-alivelasanchezclasanchezcmarguinbcmarguinbcbrightcove-userbrightcove-userkmasonkmasoncbarstowcbarstowhikehhikehmyerramallamyerramallapdiaspdiasjwhisenantjwhisenantebertaudebertaudoespinosacoespinosacdsalnikovdsalnikovsharanya.muruganandamsharanya.muruganandamvikaskumar.gajulavikaskumar.gajulaxgarcia_npmxgarcia_npmjguerrajguerrarjunerjunejonbwalshjonbwalshkhaiphamkhaiphamwswanbeckwswanbeckgastafurovgastafurovadalwaniadalwaniekelson-bcoveekelson-bcovesysengsysengmcarreiromcarreiroelbadawimustafaelbadawimustafahwoodburyhwoodburyjblakerjblakerbcmauleonbcmauleonpaco_oblea_bcpaco_oblea_bcjsepulvedajsepulvedabiswaranjanbiswaranjanbarroyobarroyobmartinezbmartinezbc-jcarlsonbc-jcarlsoneledezmaeledezmajcuetojcuetoerodrigueserodriguespsousapsousamarcogaraymarcogarayjavibrightjavibrightbcpsalasbcpsalasetobinetobinackbabeackbabecvillasenorcvillasenoromartinezomartinezmgonzalez_bcmgonzalez_bcpdohertybcovpdohertybcovmuthukumar.bcmuthukumar.bcbzizmondbzizmondjmpmacedojmpmacedoscorreiascorreialescorciolescorciocavieiracavieiraarunjeyaprasadarunjeyaprasadbvilvanathanbvilvanathananand.gangadharananand.gangadharanrociosantosrociosantosagarciabcovagarciabcovattinderattinderlauralopezlauralopezskumar85skumar85hrodriguez2hrodriguez2jasilvaantoniojasilvaantoniopalvarezbcpalvarezbcericramosericramoscarlosabajocarlosabajoingrid.s.cruzingrid.s.cruzluis_fernando_lopez_ruizluis_fernando_lopez_ruizvishal64vishal64tresa.bajitresa.bajiluis.garcia.brightcoveluis.garcia.brightcoverodrigofdzrodrigofdzpgutierrezgilpgutierrezgilharish17harish17jjeyaprakashjjeyaprakashrrajendran1698rrajendran1698jlomelijlomelisjimenezsjimenezrwenger_brightcoverwenger_brightcoverujordanrujordanstuartmhstuartmhjherrerabcovjherrerabcovmshiwalmshiwalptamizhptamizhakamalakkannanakamalakkannanroman-bcroman-bctnwannatnwannabsahlas.npmbsahlas.npmdherrera1109dherrera1109hswaminathanhswaminathanechengbcechengbcsbarrettbcsbarrettbcmisteroneillmisteroneilldmlapdmlapgkatsevgkatsevsaxena-gauravsaxena-gauravbrandonocaseybrandonocasey

Readme

videojs-playlist-ui

NPM

A playlist video picker for video.js and videojs-playlist

Maintenance Status: Stable

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.css" rel="stylesheet">

<!-- Your player will be created here: -->
<video-js data-setup='{}' controls></video-js>

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

<!-- 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>
  // Initialize the player
  const player = videojs(document.querySelector('video-js'));

  // Initialize the plugin and render the playlist
  player.playlistUi();
</script>

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

Root Element

Before this plugin will work at all, it needs an element in the DOM to which to attach itself. There are three ways to find or provide this element.

NOTE: In v2.x of this plugin, the root element was expected to be a list element (i.e., <ol> or <ul>). As of v3.x, the plugin creates a list; so, this root element must be a non-list container element (e.g., <div>).

Using Automatic Discovery (default, example)

By default, the plugin will search for the first element in the DOM with the vjs-playlist class.

To defend against problems caused by multiple playlist players on a page, the plugin will only use an element with the vjs-playlist class if that element has not been used by another player's playlist.

Using a Custom Class (example)

A custom className option can be passed to override the class the plugin will search for to find the root element. The same defense against multiple playlist players is reused in this case.

player.playlistUi({
  className: 'hello-world'
});

Using a Custom Element (example)

A custom element can be passed using the el option to explicitly define a specific root element.

player.playlistUi({
  el: document.getElementById('hello-world')
});

Other Options

The options passed to the plugin are passed to the internal PlaylistMenu video.js Component; so, you may pass in any option that is accepted by a component.

In addition, the options object may contain the following specialized properties:

className

Type: string Default: "vjs-playlist"

As mentioned above, 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 the player is playing when switching playlist items, continue playing. If paused, stay paused.

When this boolean is set to true, clicking on the playlist menu items will always play the video.

Playlists and Advertisements

The PlaylistMenu 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.