Skip to content
/ vot.js Public

An unofficial library for interacting with Yandex VOT API, providing easy-to-use methods and enhanced functionality.

License

Notifications You must be signed in to change notification settings

FOSWLY/vot.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5f64775 · Apr 11, 2025
Nov 20, 2024
Apr 10, 2025
Jul 24, 2024
Apr 10, 2025
Apr 11, 2025
Mar 7, 2025
Apr 10, 2025
Nov 20, 2024
Nov 20, 2024
Jan 27, 2025
Jun 5, 2024
Jan 27, 2025
Jun 5, 2024
Jan 28, 2025
Jan 28, 2025
Nov 20, 2024
Mar 24, 2025
Apr 11, 2025
Nov 20, 2024
Apr 6, 2025
Nov 20, 2024
Nov 20, 2024

Repository files navigation

vot.js

GitHub Actions npm ru en

An unofficial library for interacting with the Yandex VOT API, which supports working with JavaScript, TypeScript, and also has built-in parted types for Typebox.

The library supports working with worker servers, to do this, you need to create a VOTWorkerClient client and specify the domain of the worker server, for example vot-worker.toil.cc.

Warning

The library was created exclusively for research purposes and isn't intended for commercial use. All rights to the original software belong to their respective right holders. The library isn't affiliated with the original rights holders

Installation

To work with Node, Bun, or other runtimes, install the @vot.js/node:

bun install @vot.js/node

To develop browser extensions, install the @vot.js/ext:

bun install @vot.js/ext

If you only need part of the functionality, use the @vot.js/core and @vot.js/shared

Getting started

To start working with the API, you need to create a VOT Client. This can be done using the line provided below.

Standard Client:

const client = new VOTClient();

const videoData = await client.getVideoData("https://youtu.be/LK6nLR1bzpI");

const result = await client.translateVideo({ videoData });

Proxying via vot-worker:

const client = new VOTWorkerClient({
  host: "vot-worker.toil.cc",
});

You can see more code examples here

Limitations

  1. The library can't translate videos longer than 4 hours

Build

To build, you must have:

  • Bun
  • Protoc (if you are building with the update of the .proto file)

Don't forget to install the dependencies:

bun install

Start building:

bun build:all

Build without updating proto and without generating docs:

bun build:skip-proto

Tests

The library has minimal test coverage to check its performance.

Run the tests:

bun test