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

@videomatik/editor

v0.2.0

Published

Videomatik Editor as an Embeddable component

Downloads

370

Readme

Videomatik Editor SDK

This module provides access to Videomatik's Editor to be able to make some operations for videomatik through a video editor.

Installation

npm install --save @videomatik/editor

Clipper

Usage

Considering you have the follow div on your HTML:

<div id="video-clipper"></div>

You can create a video clipper using the following code:

import { Clipper } from '@videomatik/editor'

const clipper = new Clipper('#video-clipper', {
  video: 'https://storage.videomatik.com.br/videomatik-sheet/a426c1ce128.mp4',
  clips: [
    {start: 10, end: 20, selected: true},
    {start: 40, end: 60, selected: false},
    {start: 80, end: 120, selected: true},
  ],
})

This will create a new video clipper using the preset video and clips in the timeline

Events

You can listen to events and check when the editor's state was updated with the following methods:

clipper.on('ready', () => {
  console.log('The player was successfully mounted and finished loading')
})

clipper.on('change', ({ clips }) => {
  console.log('User has changed the clips to:', clips)
})

Cropper

Usage

Considering you have the follow div on your HTML:

<div id="video-cropper"></div>

You can create a video cropper using the following code:

import { Cropper } from '@videomatik/editor'

const cropper = new Cropper('#video-cropper', {
  video: 'https://storage.videomatik.com.br/videomatik-sheet/a426c1ce128.mp4',
  // Optional
  crops: [],
})

This will create a new video cropper using the preset video and clips in the timeline

Events

You can listen to events and check when the editor's state was updated with the following methods:

cropper.on('ready', ({ crops }) => {
  console.log('The player was successfully mounted and finished loading, the default crops are:', crops)
})

cropper.on('change', ({ crops }) => {
  console.log('User has changed the crops to:', crops)
})

Subtitle

Usage

Considering you have the follow div on your HTML:

<div id="video-subtitle"></div>

You can create a subtitle editor using the following code:

import { Subtitle } from '@videomatik/editor'

const subtitle = new Subtitle('#video-Subtitle', {
  video: 'https://storage.videomatik.com.br/videomatik-sheet/a426c1ce128.mp4',
  subtitles: {
    // Optional
    style: {
      "MarginV": 324,
      "Outline": 6.9,
      "Fontname": "Poppins Bold",
    },
    // Optional
    transcription: [
      {
        "end": 1.411,
        "start": 0.189,
        "words": [
          {
            "end": 0.93,
            "word": "Gente,",
            "index": 0,
            "score": 0.751,
            "start": 0.189,
            "endTime": "00:00:00,930",
            "startTime": "00:00:00,189"
          },
          {
            "end": 1.411,
            "word": "ciúme",
            "index": 1,
            "score": 0.685,
            "start": 1.01,
            "endTime": "00:00:01,411",
            "startTime": "00:00:01,010"
          }
        ],
        "length": 11,
        "endTime": "00:00:01,411",
        "startTime": "00:00:00,189"
      },
    ]
  },
})

This will create a new subtitle editor using the preset video and subtitle transcription

Events

You can listen to events and check when the editor's state was updated with the following methods:

subtitles.on('ready', ( subtitles ) => {
  console.log('The player was successfully mounted and finished loading, the default subtitles are:', subtitles)
})

subtitles.on('change', ( subtitles ) => {
  console.log('User has changed the subtitles to:', subtitles)
})

Developing

To develop and test this library, you can run:

npm run dev

This will setup building, auto-rebuilding the library once you any code is changed

npm run server

This will run a server and display the project at: http://localhost:8080/demos/

If you wish to test the library, refer to the index.html page and change it to what you want to test.

You can use __editorURL special parameter to change the intended editor iframe URL to the one on your dev server

Support

Please read the API documentation available on Videomatik's website or contact the developers through our Discord server (invite link available at our website).