chaimu
v1.0.3
Published
✨ Chaimu is an audio player that synchronizes audio with video
Downloads
491
Readme
Chaimu is an audio player that synchronizes audio with video.
Usage example
A simple usage example:
import Chaimu from "chaimu";
const videoEl = document.querySelector("video");
const chaimu = new Chaimu({
url: "https://s3.toil.cc/vot/translated.mp3",
video: videoEl,
});
await chaimu.init();
Using this code, you will link the video to the audio.
If AudioContext is reached, you will be able to use advanced audio volume control.
If you want to use a classic player (via audio element), specify preferAudio
param:
...
const chaimu = new Chaimu({
...
preferAudio: true
});
Demo
Install
Installation via Bun:
bun add vot.js
Installation via NPM:
npm install vot.js
Build
To build, you must have:
Don't forget to install the dependencies:
bun install
Run build:
bun build:bun