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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@160over90/vue-plyr-video

v0.5.0

Published

Vue wrapper for the Plyr video player. Only supports the video player and not the audio player.

Readme

PlyrVideo

Features

Vue wrapper for the Plyr video player. Only supports the video player and not the audio player.

If you do not have yarn you can download it here.

Instructions for global registration

yarn add @160over90/vue-plyr-video

Include in main.js (app entry point)

import PlyrVideo from '@160over90/vue-plyr-video';

Vue.use(PlyrVideo);

Instructions for editing this package

yarn install

Compiles and hot-reloads for development

yarn run serve

Examples

The simplest example. Creates a player for the video in the link using all the default settings.

<PlyrVideo videoUrl="https://www.youtube.com/watch?v=WaawXXqXExo"/>

An example using an event to trigger a method when the Plyr video is ready.

<PlyrVideo
  videoUrl="https://www.youtube.com/watch?v=WaawXXqXExo"
  @ready="ready"
/>
...
methods: {
  ready() {
    // Do something
  },
},

Similar to the previous example with access to the DOM event. To get access to the original DOM event, use the special $event variable.

<PlyrVideo
  videoUrl="https://www.youtube.com/watch?v=WaawXXqXExo"
  @ready="ready($event)"
/>
...
methods: {
  ready(event) {
    console.log('ready', event);
  },
},

Events

All Plyr events have been implemented. For a list of events, reference the Plyr documentation.

Props

All Plyr options can be passed as a prop. For a list of options, reference the Plyr documentation. Below are all props that aren't Plyr options.

videoUrl (String, Required) The URL for a video. Options are a YouTube URL, Vimeo URL, or a self-hosted URL/path.

poster (String, Default: undefined) The URL for the poster image.

type (String, Default: undefined) For videos not hosted using Vimeo or YouTube, this is the type attribute on the video element. If applicable, this option is recommended. Example: 'video/mp4'

background (Boolean, Default: false) A group of presets to easily use a video as a background video. All controls are removed, autoplay is enabled, click to play is disabled, fullscreen functionality is completely disabled, looping is enabled, and the video is muted. Specific settings are below and cannot be overridden.

controls: [],
autoplay: true,
clickToPlay: false,
fullscreen: { enabled: false, fallback: false, iosNative: false },
loop: true,
muted: true,

Methods

Most Plyr methods have been implemented. For a list of methods, reference the Plyr documentation. There are some changes to using the fullscreen method names detailed below. Also, the callback methods have not been implemented. Instead, use the Vue event hooks to achieve the same functionality.

The method fullscreen.enter() can be used with enterFullscreen(). The method fullscreen.exit() can be used with exitFullscreen(). The method fullscreen.toggle() can be used with toggleFullscreen().

Polyfill

Plyr uses ES6 which isn't supported in all browsers quite yet. This means some features will need to be polyfilled to be available otherwise you'll run into issues. We've elected to not burden the 90% of users that do support these features with extra JS and instead leave polyfilling to you to work out based on your needs. The easiest method I've found is to use polyfill.io which provides polyfills based on user agent. This is the method the demo uses.

<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>

License

MIT