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

vue-video-annotation

v1.0.2

Published

Vue3 component that allows adding annotations to videos by free drawing or adding shapes like circles, squares, and arrows.

Downloads

98

Readme

Vue Video Annotation

Downloads Version

Vue3 component that allows adding annotations to videos by free drawing or adding shapes like circles, squares, and arrows.

📦 Installation

NPM

npm install --save vue-video-annotation

🚀 Usage in Vue3 Components

<template>
  <VideoAnnotationPlayer :annotations="annotations"
    @annotation-add="onAnnotationAdd">
    <template v-slot:videoContent>
      <source type="video/mp4" src="https://www.dropbox.com/s/xvjem6er1pp1usy/MicrosoftInclusiveHiring.mp4?raw=1">

      <source type="video/webm" src="https://www.dropbox.com/s/bmki1sn54o4m3xt/MicrosoftInclusiveHiring.webm?raw=1">

      <track kind="subtitles" label="中文字幕" srclang="zh" src="https://www.dropbox.com/s/ipnbojfe0jtz5n7/MicrosoftInclusiveHiringCHT.vtt?raw=1" default>
    </template>
  </VideoAnnotationPlayer>
</template>
<script>
  import { VideoAnnotationPlayer, Annotation } from 'vue-video-annotation'

  export default defineComponent({
    components: {
        VideoAnnotationPlayer
    },
    setup() {
        let annotations = ref<Annotation[]>([]);

        const onAnnotationAdd = (annotation: Annotation) => {
            annotations.value.push(annotation);
        }

        return {
            annotations
        }
    }
  })
</script>
import { createApp } from 'vue'
import App from './App.vue'

//Import the style
import 'vue-video-annotation/dist/style.css'

const app = createApp(App);
app.mount('#app');

🔧 Properties

| Property | Type | Description | Default | |-----------------------|---------|-------------------------------------------------------------|-------------------------------------| | src | String | Video url to be used | | | poster | String | Image url to be used before video start | | | autoPlay | Boolean | Boolean to enable autoplay | false | | showFullscreenButton | Boolean | Show/Hide fullscreen button | true | | showLoopButton | Boolean | Show/Hide loop button | true | | constrolsTimeout | Number | Value to control the timout of the controls | 3000 seconds | | strokeWidth | Number | Stroke width for annotations | 5 | | showAnnotationControls| Boolean | Show/Hide annotation controls | true | | annotations | Annotation[] | Array of annoataions to be used to add/import | [] required | | colors | String[]| Array of colors to be used by the player | ['#000000', '#FFFFFF', '#F44336', '#E91E63', '#9C27B0', '#673AB7', '#3F51B5', '#2196F3', '#00BCD4', '#009688', '#4CAF50', '#8BC34A', '#CDDC39', '#FFEB3B', '#FFC107', '#FF9800', '#FF5722', '#795548', '#9E9E9E', '#607D8B'] |

🔧 Events

| Event | Description | Example | |---------------|------------------------------------------------|-------------------------------| | annotationAdd | Fired after an annotation be drawn | @annotation-add="doSomething"| | annotationSelected | Fired after an annotation be selected | @annotation-selected="doSomething" |