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

@tryangled/vue-video

v1.0.0

Published

vue plugin to create a text area to take the URL of a youtube/vimeo video and return the actual link to the video. It will also validate if the video exsists.

Downloads

8

Readme

@tryangled/vue-video youtube and vimeo component for Vue.js

TL;DR

Component to take as input Youtube and/or Vimeo urls and return the correct video url, type (youtube/vimeo), valid/invalid and thumbnail url.

  • Demo Link - https://ve1jk.csb.app/

Features

  • Lightweight (<6KB gzipped)
  • Dependency free
  • Mobile support
  • Returns an array of videos
  • Retreives the thumbnail of the video

Usage

A. Globally

import Vue from 'vue'
import vue-video from '@tryangled/vue-video'

// register component <vue-video>
Vue.use(vue-video)

B. Use as component: https://codesandbox.io/embed/vue-video-sample-app-ve1jk?fontsize=14

<template>
  <div>
    <vue-video
      thumbWidthPX="100"
      urlInputBorder="blue"
      urlInputTextColor="green"
      urlInputPlaceholderText="Add Youtube / Vimeo Link"
      urlInputTextHeightPX="30"
      limitVideoTo="3"
      @VideoDeleted="onVideoDeleted"
      @thumbnailClick="onThumbClicked"
      @VideoAdded="onVideoAdded"
      @VideoUrlError="onVideoUrlError"
    ></vue-video>
  </div>
</template>

<script>
  import {vueVideo} from '@tryangled/vue-video'

  export default {
    data () {
      return {
        }
      },
    methods: {
      onVideoDeleted(value) {
        //write your code here
        console.log(value.position);
        console.log(value.videos);
        console.log(value.video);
        },
      onThumbClicked(url) {
        //write your code here
        console.log(url);
        },
      onVideoAdded(value) {
        //write your code here
        console.log(value.videos);
        console.log(value.video);
        },
      onVideoUrlError(url) {
        //write your code here
        console.log(url);
        }
      }
    }
</script>

Custom attributes

| Attribute | Required | Type | Default | Description | |-------------------------|----------|---------|---------------------------------|------------------------------| | thumbWidthPX | optional | String | "100" | Thumbnail Width in px | | urlInputBorder | optional | String | "gray" | Input Border Color | | urlInputTextColor | optional | String | "black" | Input Text Color | | urlInputPlaceholderText | optional | String | "Video link (Youtube or Vimeo)" | Input placeholder Text | | urlInputTextHeightPX | optional | String | "30" | Input Height in px | | limitVideoTo | optional | String | "-1" | Limit of videos ("-1" = unlimited) |

Event handlers

| Event handler | Parameter | Type | Description | |----------------|---------------------------|-------------------------------------------------------------------------------------|---------------------------------|------------------------------| | VideoDeleted | {position, video, videos} | {String, {Url, isValid, thumbUrl, type}, [{Url, isValid, thumbUrl, type}, ... ]} | event triggered when a video is deleted from the list | | thumbnailClick | videoUrl | String | event triggered when a thumbnail is clicked, parameter passed is the video URL | | VideoAdded | {video, videos} | {{Url, isValid, thumbUrl, type}, [{Url, isValid, thumbUrl, type}, ... ]} | event triggered when a valid video is added to the list | | VideoUrlError | url | String | event triggered when the url entered cannot be resolved to a valid youtube / vimeo url |

References

  • https://developer.vimeo.com/api/guides/start