0.1.3 • Published 5 months ago

artplayer-plugin-assjs v0.1.3

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

artplayer-plugin-assjs

artplayer-plugin-assjs is a plugin for loading ASS subtitles without webAssembly in Artplayer.

Installation

npm i artplayer-plugin-assjs

Usage

More usage in assjs

import Artplayer from "artplayer";
import artplayerPluginAssJS from "artplayer-plugin-assjs";

const art = new Artplayer({
  container: ".artplayer-app",
  url: "path/to/video.mp4",
  plugins: [
    artplayerPluginAssJS({
      content: assContent,
    }),
  ],
});

// art.plugins.artplayerPluginAssJS.switch(newContent)

Options

  • content (string): ASS subtitle content.
  • delay (number): Subtitle delay time in seconds.
  • resampling (string): Subtitle resampling method, can be "video_width", "video_height", "script_width", "script_height".

Methods

  • switch(content: string): Switch subtitle content.
  • show(): Show subtitles.
  • hide(): Hide subtitles.
  • destroy(): Destroy subtitle instance.
0.1.3

5 months ago

0.1.2

6 months ago

0.1.1

6 months ago

0.1.0

6 months ago