asciinema-player-ce
TypeScript icon, indicating that this package has built-in type declarations

0.3.3 • Public • Published

Asciinema player custom element

This library wraps asciinema-player in a custom element, so it can be used in any framework without needing to run AsciinemaPlayer.create for each player you want to spawn.

Installation

npm

You can use your preferred package manager

npm i asciinema-player-ce
# or
pnpm i asciinema-player-ce
# or
yarn add asciinema-player-ce

import it and use it to define a custom element on your window.

import { useAsciinemaCe } from 'asciinema-player-ce'

useAsciinemaCe()

html

Add the following script to your document

<script src="https://cdn.jsdelivr.net/npm/asciinema-player-ce@latest/lib/asciinema-player.iife.min.js"></script>
<script defer>
  asciinemaPlayerCe.useAsciinemaCe()
</script>

Usage

You can simply use asciinema-player tag.

<!-- put your cast id inside src -->
<asciinema-player src=""></asciinema-player>

Readme

Keywords

none

Package Sidebar

Install

npm i asciinema-player-ce

Weekly Downloads

463

Version

0.3.3

License

MIT

Unpacked Size

550 kB

Total Files

6

Last publish

Collaborators

  • vospel