Socket
Socket
Sign inDemoInstall

captions-control

Package Overview
Dependencies
14
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    captions-control

Library for modifying vtt subtitles.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
65.2 MB
Created
Weekly downloads
 

Readme

Source

Library for modifying vtt subtitles.

const captions_control = require("captions_control")
captions_control.FFMPEG_PATH = "" 
// If you are using convert then set this to a ffmpeg executable

captions_control.convert(text, type?) 
// text may be a file, or a string. 
// If it is a string then you should specify type as the text's extension (srt, ect)
// Returns a string of the text converted to the vtt format

captions_control.style(text, style, start?, end?) 
// Gives CSS to the subtitles. style is a array of CSS. 
// start should be the second it starts giving the CSS to the cues.
// end should be the second it finishes giving the CSS to the cues.
// Example of style array: ["color: red"]

captions_control.trim(text, modify_time, start?, end?)
// Trims the video so only the seconds in between
// Start and end will be visible.
// If modify_time is true, it will substract the time and start
// So it considers the new cues the start

captions_control.position(text, position, start?, end?)
// Changes the position of the cues in between
// Start and end
// Example of position array: ["line:63%", "position:72%" ,"align:start"]
// Learn more here: https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API

FAQs

Last updated on 24 Apr 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc