Tuesday, 27 July 2021

embed local asciinema file in html

I'm trying to embed a local asciinema session in html. here is my directory layout:

$ tree
.
├── asciinema
│   └── demo.cast
├── css
│   └── asciinema-player.css
├── index.html
├── js
│   └── asciinema-player.js
└── makefile

And here is my html file, just like it says in here:

$ cat index.html
<html>
<head>
<link rel="stylesheet" type="text/css" href="/css/asciinema-player.css" />
</head>
<body>
ABCDE
<asciinema-player src="/asciinema/demo.cast"></asciinema-player>
<script src="/js/asciinema-player.js"></script>
</body>
</html>

When I drag-and-drop this file to Mozilla, it only shows ABCDE



from embed local asciinema file in html

No comments:

Post a Comment