返回排行榜

asciinema/asciinema-player

JavaScriptdocs.asciinema.org/manual/player/

Web player for terminal session recordings and live streams

playerasciicastterminalrecordingasciinema
Star 增长趋势
Star
2.9k
Forks
291
周增长
Issues
1
1k2k
2014年6月2018年6月2022年7月2026年7月
制品库npmnpm install asciinema-player
README

asciinema player

Build status

asciinema player is a web player for terminal sessions recordings.

Unlike typical web video players, which play heavyweight video files (.mp4, .mov), asciinema player plays lightweight terminal session recordings in the text-based asciicast format (.cast), such as those produced by the asciinema recorder.

The player is built from the ground up with JavaScript and Rust (WASM), and is available as npm package and a standalone JS bundle.

You can use it on any HTML page - in a project documentation, on a blog, or in a conference talk presentation.

It's as easy as adding a single line of Javascript code to your web page:

AsciinemaPlayer.create('demo.cast', document.getElementById('demo'));

Check out the quick start guide for basic setup overview.

You can see the player in action in asciinema documentation.

Notable features:

Building

Building asciinema player from source requires:

To build the project run:

git clone https://github.com/asciinema/asciinema-player
cd asciinema-player
rustup target add wasm32-unknown-unknown
npm install
npm run build

This produces following output files:

  • dist/index.js - monolithic ES module, to be import-ed in your JS bundle
  • dist/bundle/asciinema-player.js - standalone monolithic player script (IIFE), to be linked directly from a website
  • dist/bundle/asciinema-player.min.js - minimized version of the above
  • dist/bundle/asciinema-player.css - stylesheet, to be linked directly from a website or included in a CSS bundle

The monolithic version of the player covers majority of use cases, and it's all you need to use the player.

In addition, the split version of the player is built with npm run build, producing the following files:

  • dist/ui.js - UI ES module, to be import-ed in your JS bundle
  • dist/bundle/asciinema-player-ui.js - standalone UI script (IIFE), to be linked directly from a website
  • dist/bundle/asciinema-player-ui.min.js - minimized version of the above
  • dist/bundle/asciinema-player-worker.js - standalone web worker script (IIFE), to be linked directly from a website
  • dist/bundle/asciinema-player-worker.min.js - minimized version of the above

The split version runs the UI and data crunching (parsing, terminal emulation) in separate OS threads, which improves UI's responsiveness during playback. In this setup the UI code runs in the window context, while the processing code runs in a WebWorker. The benefit of this configuration is typically observed only for high frame-rate / high bandwidth recordings. For typical demos/sessions it's not worth the setup hassle.

Donations

Sustainability of asciinema development relies on donations and sponsorships.

Please help the software project you use and love. Become a supporter or a corporate sponsor.

asciinema is sponsored by:

Consulting

If you're interested in integration or customization of asciinema player to suit your needs, check asciinema consulting services.

License

© 2011 Marcin Kulik.

All code is licensed under the Apache License, Version 2.0. See LICENSE file for details.

相关仓库
mifi/lossless-cut

The swiss army knife of lossless video/audio editing

TypeScriptnpmGNU General Public License v2.0videoeditor
losslesscut.app
42.3k2.1k
videojs/video.js

Video.js - open source HTML5 video player

JavaScriptnpmOthervideoplayer
videojs.com
39.8k7.5k
bilibili/ijkplayer

Android/iOS video player based on FFmpeg n3.4, with MediaCodec, VideoToolbox support.

CGNU General Public License v2.0ijkplayerandroid
33.2k8.2k
qier222/YesPlayMusic

高颜值的第三方网易云播放器,支持 Windows / macOS / Linux :electron:

VueMIT Licensevuevuex
music.qier222.com
33.1k4.7k
CarGuo/GSYVideoPlayer

Video players (IJKplayer, ExoPlayer, MediaPlayer), HTTPS, 16k page size, danmaku (bullet chat) support, external subtitles, support for filters, watermarks, and GIF screenshots, pre-roll and mid-roll ads, multiple simultaneous playback, basic seeking/dragging, volume and brightness adjustment, play-while-cache support

JavaMavenApache License 2.0androidvideo
21.5k4.3k
open-ani/animeko

集找番、追番、看番的一站式弹幕追番平台,云收藏同步 (Bangumi),离线缓存,BitTorrent,弹幕云过滤。100% Kotlin/Compose Multiplatform

KotlinGNU Affero General Public License v3.0animecompose
animeko.org
19k517
video-dev/hls.js

HLS.js is a JavaScript library that plays HLS in browsers with support for MSE.

TypeScriptnpmOtherhlshtml5
hlsjs.video-dev.org/demo
16.8k2.7k
DIYgod/DPlayer

:lollipop: Wow, such a lovely HTML5 danmaku video player

JavaScriptnpmMIT Licensedplayervideo
dplayer.diygod.dev
16.5k2.5k
Hunlongyu/ZY-Player

▶️ 跨平台桌面端视频资源播放器.简洁无广告.免费高颜值. 🎞

VueMIT Licensevideoelectron
14.5k2.2k
daniulive/SmarterStreaming

业内为数不多致力于极致体验的超强全自研跨平台(windows/linux/android/iOS)流媒体内核,通过模块化自由组合,支持实时RTMP推流、RTSP推流、RTMP播放器、RTSP播放器、录像、多路流媒体转发、音视频导播、动态视频合成、音频混音、直播互动、内置轻量级RTSP服务等,比快更快,业界真正靠谱的超低延迟直播SDK(延迟低至100~200ms)。

JavaMavenrtmp-pusherrtmp-player
daniusdk.com
11.2k2.8k
cookpete/react-player

A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion

TypeScriptnpmMIT Licensereactmedia
cookpete.github.io/react-player
10.3k1.2k
bytedance/xgplayer

A HTML5 video player with a parser that saves traffic

JavaScriptnpmMIT Licensemp4mp4box
h5player.bytedance.com
9.3k942