hvml

0.0.3 • Public • Published

hvml

HVML Parser for Node.js

Build Status Code Coverage Downloads per month (NPM)

HVML (Hypervideo Markup Language) is a video metadata vocabulary. It covers three main classes of metadata:

  • Technical details, like the available resolutions or codecs of a media file;
  • Artistic details, like who appears in a given movie or what awards it has won; and
  • Interactive UI instructions for compatible video players such as RedBlue.

HVML is designed to be human-friendly enough to write by hand in most cases. This library is not required in order to use it; it just provides an imperative API for working with it programmatically.

Installation

yarn add hvml

or

npm install hvml

Example Usage

const { HVML, Video } = require( 'hvml' );

const hvml = new HVML( './hvml.xml' );
hvml.ready.then( () => {
  // Instance methods available now
  console.log( hvml.toJson() );
} );

const video = new Video( {
  "type": ["personal", "documentary"],
  "lang": "en-US",
  "id": "welcome-to-my-channel",
} );
video.setTitle( 'Welcome to My Channel!' );
video.setTitle( 'チャンネルへようこそ!', 'ja' );
// The Video types `personal` and `documentary` combine
// to create an implicit "vlog episode" semantic.
console.log( video.isVlogEpisode() ); // true

API

See the GitHub README for details.

Package Sidebar

Install

npm i hvml

Weekly Downloads

1

Version

0.0.3

License

LGPL-3.0-or-later

Unpacked Size

57.1 kB

Total Files

10

Last publish

Collaborators

  • hguiney